NetTrap Metatrader Expert Advisor

This is a discussion on NetTrap Metatrader Expert Advisor within the Forex Net Trap forums, part of the T2W Archive category; Originally Posted by SpindriftUK I believe you can you use the import function in the History Centre to convert the ...

Reply
 
LinkBack Thread Tools Search this Thread
Old Oct 30, 2010, 1:03pm   #106
Joined May 2010
Re: NetTrap Metatrader Expert Advisor

Quote:
Originally Posted by SpindriftUK View Post
I believe you can you use the import function in the History Centre to convert the csv.

In what way is the 1-minute data on Alapri.ru horrible? It seems reasonably accurate to me - certainly good enough for comparison purposes.
Thanks for the tip, I will give it a try. I am talking about the fibre - it's ok only since August this year, all previous data is crap.
Tanguero is offline   Reply With Quote
Old Oct 30, 2010, 1:33pm   #107
Joined May 2010
Re: NetTrap Metatrader Expert Advisor

I have dropped into a book store to pick some ideas about system backtesting and hopefully have found something of interest. Some guys show how they backtest a system for the cable.

Having 6 years of 30 min history data, they:

1. optimise the system on various variables for 1 year;
2. then they walk it forward for 3 months to see whether the newly-found settings keep working;
3. they apply the settings for the next 3 months for live-trading;
4. after 3 months of trading, they run the whole procedure again.

For backtesting various variants, we may adopt a similar strategy. This brings up two issues:

1. What time periods to choose for those steps 1. to 4. I note that from my backtesting, VNT and other variants became profitable in 2008 in different months (VNT in October). So we may choose the data for 2009 and 2010. For the other periods, my gut feeling is that the optimisation or training period should be 6 months, 2 months for walk-forward and 2 months for trading.

I prefer this approach as apposed to using only the most recent results, say last 2 months or 1 months to pick the top dog: it puts you on the edge both for winnings and loosers should the tide change. The 6-2-2 method is unlikely to be the top performer in any given month but should be the ultimate winner during the system's lifetime.

2. What settings to test. I suppose we can focus on these variables: SL, TP, NT/INT, Open 6:00 with 15 minutes step, Close 8:00 with 15 minutes step, TF 10, 15, 30; MA.

As Spin noted, it is a lot of work and the best approach is for a few people to get involved and test different parameters. Again, this should be done through two stages, one to check the 6-2-2 method and whether some other numbers work better, and then run the various settings on that basis.
Tanguero is offline   Reply With Quote
Old Oct 30, 2010, 2:47pm   #108
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by Tanguero View Post
Thanks for the tip, I will give it a try. I am talking about the fibre - it's ok only since August this year, all previous data is crap.
Ah - you mean EUR/USD I must admit, I'd never heard it referred to as that before. Apparently, the name comes from the fact that Euro notes are made from cotton fibre.

Looks like the Dukascopy data is limited to a maximum of 2500 bars of data for each download; i.e. you'd have to create quite a lot of files to get a reasonable size backtest.

I was reading that Oanda have some good data. I've got a live account with them, although I haven't used it for a couple of years - I'll check it out.
SpindriftUK is offline   Reply With Quote
Old Oct 30, 2010, 2:56pm   #109
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by Dubai View Post
Got there in the end, it was due to MBTrading trading in mini lots...it was sending 1.2 lots for a $1500 account and I couldn't work out why!
Glad you got it sorted, although I'm a bit confused as to the problem you were having. The program should cope with the different lot sizes; i.e. it works out a divisor by dividing lot size by 10000 and uses it to convert $ per pip to lots.

E.g. on a mini account, lot size is 10000, so the divisor is 1. $10 per pip would be divided by 1 to get 10 lots per pip. On a standard account, lot size is $100000 and the divisor would be calculated as 10. $10 per pip then becomes 1 lot per pip.

Let me know if you think it's not working correctly...
SpindriftUK is offline   Reply With Quote
Old Oct 31, 2010, 7:17am   #110
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by Tanguero View Post
I have dropped into a book store to pick some ideas about system backtesting and hopefully have found something of interest. Some guys show how they backtest a system for the cable.

Having 6 years of 30 min history data, they:

1. optimise the system on various variables for 1 year;
2. then they walk it forward for 3 months to see whether the newly-found settings keep working;
3. they apply the settings for the next 3 months for live-trading;
4. after 3 months of trading, they run the whole procedure again.

For backtesting various variants, we may adopt a similar strategy. This brings up two issues:

1. What time periods to choose for those steps 1. to 4. I note that from my backtesting, VNT and other variants became profitable in 2008 in different months (VNT in October). So we may choose the data for 2009 and 2010. For the other periods, my gut feeling is that the optimisation or training period should be 6 months, 2 months for walk-forward and 2 months for trading.

I prefer this approach as apposed to using only the most recent results, say last 2 months or 1 months to pick the top dog: it puts you on the edge both for winnings and loosers should the tide change. The 6-2-2 method is unlikely to be the top performer in any given month but should be the ultimate winner during the system's lifetime.

2. What settings to test. I suppose we can focus on these variables: SL, TP, NT/INT, Open 6:00 with 15 minutes step, Close 8:00 with 15 minutes step, TF 10, 15, 30; MA.

As Spin noted, it is a lot of work and the best approach is for a few people to get involved and test different parameters. Again, this should be done through two stages, one to check the 6-2-2 method and whether some other numbers work better, and then run the various settings on that basis.
Sounds like a good plan. Another thing we might want to include in the optimisation step is the slope of the MA. Quite by accident, I noticed that the EA is more profitable, in VNT mode, when the required difference between MA value at the start and end of the assessment period is checked to be >= 1.1
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 8:41am   #111
 
mark120169's Avatar
Joined Apr 2010
Re: NetTrap Metatrader Expert Advisor

Have been running FNT trader all week @ 10p pip for 5 different settings in parrellel.

VNT
HNT40
SNT33S
INT40/30
INT23/22


All I can say is MT4 is not happy running 5 scripts with basically the same rules off 5 different charts.

Had entry bugs all week, today was the fist day all 5 went live, but one appeared pending @ 6.30, then one @ 6.31 then one at 6.32 but all timed on MT4 as 6.30. The two INT trades did not appear live at all until 6.38 at the 6.38 open price which was 2 pips higher than the 6.30 price.

40 stops adjusting to 30 worked fine, but as INT23/22 got stopped out four orders had to autoclose @ 8.30, and one did autoclose the the other three trying to close at the same time caused MT4 to crash back to desktop with an error message and apology. I relaunched immediately and closed them off manually @ 8.31.

I think 2 trades might be the safe maximum for MT4. so just going to do 2 tomorrow and friday to check before I use it for full stake come Monday again.

M
mark120169 is offline   Reply With Quote
Old Nov 3, 2010, 9:17am   #112
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by mark120169 View Post
Have been running FNT trader all week @ 10p pip for 5 different settings in parrellel.

VNT
HNT40
SNT33S
INT40/30
INT23/22


All I can say is MT4 is not happy running 5 scripts with basically the same rules off 5 different charts.

Had entry bugs all week, today was the fist day all 5 went live, but one appeared pending @ 6.30, then one @ 6.31 then one at 6.32 but all timed on MT4 as 6.30. The two INT trades did not appear live at all until 6.38 at the 6.38 open price which was 2 pips higher than the 6.30 price.

40 stops adjusting to 30 worked fine, but as INT23/22 got stopped out four orders had to autoclose @ 8.30, and one did autoclose the the other three trying to close at the same time caused MT4 to crash back to desktop with an error message and apology. I relaunched immediately and closed them off manually @ 8.31.

I think 2 trades might be the safe maximum for MT4. so just going to do 2 tomorrow and friday to check before I use it for full stake come Monday again.

M
I think I can probably improve the management of the trade server within the EA. That said, we are limited by the fact that there's only one trade server per MT instance. If I put in code that says "wait until the trade server is free", all I am changing is that the EA will not keep hammering the server until it's free. That might prevent MT crashing (although I've had recently has other occasions where SML MT has crashed, running different EAs) but there will still be the problem that we want to open and close numerous trades simultaneously.

Something we could try is to have more than one instance of MT running and logged onto the same account. You could go as far as having a separate MT instance for every variant but that might be going too far!

Cheers,
Spin
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 9:55am   #113
 
mark120169's Avatar
Joined Apr 2010
Re: NetTrap Metatrader Expert Advisor

Quote:
Originally Posted by SpindriftUK View Post
I think I can probably improve the management of the trade server within the EA. That said, we are limited by the fact that there's only one trade server per MT instance. If I put in code that says "wait until the trade server is free", all I am changing is that the EA will not keep hammering the server until it's free. That might prevent MT crashing (although I've had recently has other occasions where SML MT has crashed, running different EAs) but there will still be the problem that we want to open and close numerous trades simultaneously.

Something we could try is to have more than one instance of MT running and logged onto the same account. You could go as far as having a separate MT instance for every variant but that might be going too far!

Cheers,
Spin
This is just mucking around. live I will never want to trade more than 2 trades in TNT.

M
mark120169 is offline   Reply With Quote
Old Nov 3, 2010, 10:31am   #114
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by mark120169 View Post
This is just mucking around. live I will never want to trade more than 2 trades in TNT.

M
I will try to improve the trade context handling in the next release of the EA. Even with only two potential simultaneous trades, we need it to perform as well as possible.

Cheers,
Spin
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 10:53am   #115
 
mark120169's Avatar
Joined Apr 2010
Re: NetTrap Metatrader Expert Advisor

Quote:
Originally Posted by SpindriftUK View Post
I will try to improve the trade context handling in the next release of the EA. Even with only two potential simultaneous trades, we need it to perform as well as possible.

Cheers,
Spin
And do we really need the EA ident? surely as you can onlt have one script per chart if you load two 15 min charts with the EA you must be aware that you want to trade two trades?

Seems pointless to me. Caused me grief for a while, the I saved each .set file with a different EA_Ident which kinda makes it pointless, Because when I drag the EA to the chart the "load" my .set template it adds the ammended EA_indent saved removing any saftety feature.

Uoit now supposed to change this number daily are you? Could this be the error? Using the same EA_Indent each day?

M
mark120169 is offline   Reply With Quote
Old Nov 3, 2010, 11:16am   #116
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by mark120169 View Post
And do we really need the EA ident? surely as you can onlt have one script per chart if you load two 15 min charts with the EA you must be aware that you want to trade two trades?

Seems pointless to me. Caused me grief for a while, the I saved each .set file with a different EA_Ident which kinda makes it pointless, Because when I drag the EA to the chart the "load" my .set template it adds the ammended EA_indent saved removing any saftety feature.

Uoit now supposed to change this number daily are you? Could this be the error? Using the same EA_Indent each day?

M
The EA_ident is used to identify the trades created by that instance of the EA, which allows the separate management those trades.

Say, for example, you had the EA running on different charts with different end times. Without the ident, the EA would not be able to tell which trade to close at which time.

If you are referring to the error whereby trades are not being executed at the set times, I thought I had explained that that is caused by the different instances of the program contending for a single resource; i.e. the so-called trade context.

Cheers,
Spin
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 1:54pm   #117
Joined May 2010
Re: NetTrap Metatrader Expert Advisor

Quote:
Originally Posted by SpindriftUK View Post
I will try to improve the trade context handling in the next release of the EA. Even with only two potential simultaneous trades, we need it to perform as well as possible.

Cheers,
Spin
Introducing a sleep function for a few seconds for each variant when sending each order may solve the issue.
Tanguero is offline   Reply With Quote
Old Nov 3, 2010, 2:12pm   #118
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by Tanguero View Post
Introducing a sleep function for a few seconds for each variant when sending each order may solve the issue.
The program has a function, "isTradeAllowed", which it's just not calling at the moment. What this does is loop for a supplied number of seconds, waiting for the built-in boolean IsTradeAllowed to become true, which happens when the trade context is free.

This will help to a degree but if there are five different instances of the EA waiting to open a trade, it could still be a minute or two before the trade is placed.
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 4:38pm   #119
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread
Quote:
Originally Posted by mark120169 View Post
Have been running FNT trader all week @ 10p pip for 5 different settings in parrellel.

VNT
HNT40
SNT33S
INT40/30
INT23/22


All I can say is MT4 is not happy running 5 scripts with basically the same rules off 5 different charts.

Had entry bugs all week, today was the fist day all 5 went live, but one appeared pending @ 6.30, then one @ 6.31 then one at 6.32 but all timed on MT4 as 6.30. The two INT trades did not appear live at all until 6.38 at the 6.38 open price which was 2 pips higher than the 6.30 price.

40 stops adjusting to 30 worked fine, but as INT23/22 got stopped out four orders had to autoclose @ 8.30, and one did autoclose the the other three trying to close at the same time caused MT4 to crash back to desktop with an error message and apology. I relaunched immediately and closed them off manually @ 8.31.

I think 2 trades might be the safe maximum for MT4. so just going to do 2 tomorrow and friday to check before I use it for full stake come Monday again.

M
You're not the only one to have problems getting instant mode trades filled this morning. Furthermore, I notice that even on demo just now, the program had to try a few times to get filled on an "instant mode" trade.

I will see what I can do to improve the situation - watch this space

Cheers,
Spin
SpindriftUK is offline   Reply With Quote
Old Nov 3, 2010, 5:47pm   #120
Joined Dec 2006
Re: NetTrap Metatrader Expert Advisor

SpindriftUK started this thread Attached is an amended version of the EA, which I hope will work better for instant trades. Please give it a try and let me know how it goes.

Cheers,
Spin
Attached Files
File Type: ex4 FNTTrader.ex4 (52.4 KB, 173 views)
SpindriftUK is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metatrader Expert advisor losses money automatically oildaytrader Trading Software 3 Oct 5, 2009 4:11pm
expert advisor anguel First Steps 0 Apr 10, 2009 10:54am
Expert Advisor Help mozillan Trading Software 0 Mar 1, 2007 4:49pm

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)