Multi 10:4 Trader EA

Post Reply
nonlinear
Trader
Posts: 293
Joined: Fri Jun 01, 2012 2:56 pm
Location: Washington DC

Re: Multi 10:4 Trader EA

Post by nonlinear »

Nice work, Snail. Thank you.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Market Closed Symbol suffix issue

Post by snailbeard »

I'm still not getting any forward test trades on Global Prime...

The problem is the code for detecting market open/closed
I used "GBPUSD" which of course is incomplete for some brokers. :roll:

If you are with one of these then the following changes should fix it:

Find:
extern string symbolsToTrade = "GBPNZD,EURNZD,GBPAUD,GBPCAD,GBPJPY,GBPCHF,CADJPY,EURCAD,EURAUD,USDCHF,GBPUSD,EURJPY,NZDJPY,AUDCHF,AUDJPY,USDJPY,EURUSD,NZDCHF,CADCHF,AUDNZD,NZDUSD,CHFJPY,AUDCAD,USDCAD,NZDCAD,AUDUSD,EURCHF,EURGBP";
Add:
string glbSymbolSuffix = "";

Find:
string AddChar = StringSubstr(Symbol(), 6, 4);
Add:
glbSymbolSuffix = AddChar;

Find(several):
bTradeAllowed = MarketInfo("GBPUSD", MODE_TRADEALLOWED);
Replace:
bTradeAllowed = MarketInfo("GBPUSD" + glbSymbolSuffix, MODE_TRADEALLOWED);

Yes, its a kludge but there doesn't seem to be an MQL function like IsMarketClosed() :o
currymonster
Trader
Posts: 99
Joined: Wed Nov 16, 2011 8:37 pm

Re: Multi 10:4 Trader EA

Post by currymonster »

Thanks snail, I made the changes and the EA is indeed now detecting the market as open on my GP Demo, your help is most appreciated, will trial the EA,

Cheers
atharmian
Trader
Posts: 169
Joined: Tue Oct 16, 2012 7:43 am

Re: Multi 10:4 Trader EA

Post by atharmian »

Andy,

After being unable to display the data in v2.04a, I found your earlier v1.03 dash (see attached and screenshot.)

Looks like, regardless of screen or font sizing, I only get 24 not the full 28 pairs.
Any suggestions?

Regards,
Athar.
You do not have the required permissions to view the files attached to this post.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

atharmian wrote:Andy,

After being unable to display the data in v2.04a, I found your earlier v1.03 dash (see attached and screenshot.)

Looks like, regardless of screen or font sizing, I only get 24 not the full 28 pairs.
Any suggestions?

Regards,
Athar.

Hi,

Try YAD, that is the latest version that was modified by Candletiger: http://www.stevehopwoodforex.com/phpBB3 ... &hilit=YAD

Andy
MrLong

Re: Market Closed Symbol suffix issue

Post by MrLong »

snailbeard wrote:I'm still not getting any forward test trades on Global Prime...

The problem is the code for detecting market open/closed
I used "GBPUSD" which of course is incomplete for some brokers. :roll:

If you are with one of these then the following changes should fix it:

Find:
extern string symbolsToTrade = "GBPNZD,EURNZD,GBPAUD,GBPCAD,GBPJPY,GBPCHF,CADJPY,EURCAD,EURAUD,USDCHF,GBPUSD,EURJPY,NZDJPY,AUDCHF,AUDJPY,USDJPY,EURUSD,NZDCHF,CADCHF,AUDNZD,NZDUSD,CHFJPY,AUDCAD,USDCAD,NZDCAD,AUDUSD,EURCHF,EURGBP";
Add:
string glbSymbolSuffix = "";

Find:
string AddChar = StringSubstr(Symbol(), 6, 4);
Add:
glbSymbolSuffix = AddChar;

Find(several):
bTradeAllowed = MarketInfo("GBPUSD", MODE_TRADEALLOWED);
Replace:
bTradeAllowed = MarketInfo("GBPUSD" + glbSymbolSuffix, MODE_TRADEALLOWED);

Yes, its a kludge but there doesn't seem to be an MQL function like IsMarketClosed() :o
Hi Brian,

You sure have put a lot of work into the EA, many thanks.

If you can send me your latest version including this code, I'll rename in version 2.05 and that can be the final version.

Many Thanks
Andy
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

latest update

Post by snailbeard »

Hi Andy,

I've completed a few more changes and done some historic testing
The results are very promising!!! :D

Did you say the 'final release'..
what, no more coding at 3 in the morning and bloodshot eyes???
I'm sure our partners will be very pleased to hear that :lol:

All the best
Brian

=======================================================
If anyone has access to more historical data it would be useful to know how this performs over several years,
for M1 and/or Every tick - if the results are the same as M5 that is useful to know.
There are ways in which I can optimise performance so that back testing times can be reduced for 'every tick'.
However, if M5 open bars gives the same results then perhaps no need for further optimisation.

Just completed an every tick test as well (at least 15 minutes of processing)
The results are different not as optimistic as M5, so perhaps more realistic?
However, the main result is that losses and draw down are modest!!

It would also be useful to test pairs that behave differently to GU
Also it would be useful to experiment with timezones, trading hours, days not to trade...
=======================================================
Back test GU, M5, Open only bars, 1Feb13 -11May13
-------------------------------------------------------
Bars in test 21356
Ticks modelled 41707
Modelling quality n/a
Mismatched charts errors 0
Initial deposit 10000.00
Total net profit 716.62
Gross profit 720.22
Gross loss -3.60
Profit factor 200.06
Expected payoff 89.58
Absolute drawdown 33.60
Maximal drawdown 91.93 (0.91%)
Relative drawdown 0.91% (91.93)
Total trades 8
Short positions (won %) 4 (100.00%)
Long positions (won %) 4 (75.00%)
Profit trades (% of total) 7 (87.50%)
Loss trades (% of total) 1 (12.50%)
Largest
profit trade 235.04
loss trade -3.60
Average
profit trade 102.89
loss trade -3.60
Maximum
consecutive wins (profit in money) 4 (511.73)
consecutive losses (loss in money) 1 (-3.60)
Maximal
consecutive profit (count of wins) 511.73 (4)
consecutive loss (count of losses) -3.60 (1)
Average
consecutive wins 4
consecutive losses 1
=======================================================
1 2013.02.01 00:00 sell stop 1 0.16 1.58578 1.59761 1.57102 0.00 10000.00
2 2013.02.01 00:20 sell stop 2 0.13 1.58258 1.59761 1.57102 0.00 10000.00
3 2013.02.01 04:10 sell 1 0.16 1.58578 1.59761 1.57102 0.00 10000.00
4 2013.02.01 10:00 sell 2 0.13 1.58258 1.59761 1.57102 0.00 10000.00
5 2013.02.01 19:50 t/p 1 0.16 1.57102 1.59761 1.57102 235.04 10235.04
6 2013.02.01 19:50 t/p 2 0.13 1.57102 1.59761 1.57102 149.37 10384.41
7 2013.02.08 11:00 sell stop 3 0.14 1.57476 1.58912 1.56248 0.00 10384.41
8 2013.02.08 11:05 sell 3 0.14 1.57476 1.58912 1.56248 0.00 10384.41
9 2013.02.08 11:05 close 3 0.14 1.57436 1.58912 1.56248 4.62 10389.03
10 2013.02.10 22:00 sell stop 4 0.15 1.57538 1.58846 1.56713 0.00 10389.03
11 2013.02.11 08:35 sell 4 0.15 1.57538 1.58846 1.56713 0.00 10389.03
12 2013.02.11 13:40 t/p 4 0.15 1.56713 1.58846 1.56713 122.70 10511.73
13 2013.03.15 07:15 sell stop 5 0.17 1.51049 1.52259 1.47949 0.00 10511.73
14 2013.03.15 18:00 delete 5 0.17 1.51049 1.52259 1.47949 0.00 10511.73
15 2013.03.21 08:25 sell stop 6 0.15 1.50326 1.51695 1.48968 0.00 10511.73
16 2013.03.21 09:30 sell stop 7 0.61 1.51355 1.51695 1.48968 0.00 10511.73
17 2013.03.21 09:35 delete 7 0.61 1.51355 1.51695 1.48968 0.00 10511.73
18 2013.03.21 09:35 delete 6 0.15 1.50326 1.51695 1.48968 0.00 10511.73
19 2013.04.15 18:30 buy stop 8 0.18 1.52994 1.51850 1.54300 0.00 10511.73
20 2013.04.15 21:10 buy stop 9 0.13 1.53380 1.51862 1.54300 0.00 10511.73
21 2013.04.15 23:05 buy 8 0.18 1.52994 1.51850 1.54300 0.00 10511.73
22 2013.04.15 23:05 close 8 0.18 1.52981 1.51850 1.54300 -3.60 10508.13
23 2013.04.16 01:10 buy stop 10 0.18 1.52994 1.51874 1.54300 0.00 10508.13
24 2013.04.16 03:55 buy 10 0.18 1.52994 1.51874 1.54300 0.00 10508.13
25 2013.04.16 16:15 buy 9 0.13 1.53380 1.51862 1.54300 0.00 10508.13
26 2013.04.16 21:10 close 10 0.18 1.53593 1.51874 1.54300 106.56 10614.69
27 2013.04.16 21:10 close 9 0.13 1.53593 1.51862 1.54300 26.78 10641.47
28 2013.05.07 14:45 buy stop 11 0.15 1.54969 1.53579 1.56316 0.00 10641.47
29 2013.05.08 09:55 buy 11 0.15 1.54969 1.53579 1.56316 0.00 10641.47
30 2013.05.08 17:40 close 11 0.15 1.55477 1.53579 1.56316 75.15 10716.62
=======================================================
=======================================================
Repeat the above test using every tick
Bars in test 21356
Ticks modelled 4574560
Modelling quality 36.61%
Mismatched charts errors 0
Initial deposit 10000.00
Total net profit 587.43
Gross profit 589.77
Gross loss -2.34
Profit factor 252.04
Expected payoff 83.92
Absolute drawdown 34.88
Maximal drawdown 187.51 (1.83%)
Relative drawdown 1.83% (187.51)
Total trades 7
Short positions (won %) 3 (100.00%)
Long positions (won %) 4 (75.00%)
Profit trades (% of total) 6 (85.71%)
Loss trades (% of total) 1 (14.29%)
Largest
profit trade 170.16
loss trade -2.34
Average
profit trade 98.29
loss trade -2.34
Maximum
consecutive wins (profit in money) 3 (359.40)
consecutive losses (loss in money) 1 (-2.34)
Maximal
consecutive profit (count of wins) 359.40 (3)
consecutive loss (count of losses) -2.34 (1)
Average
consecutive wins 3
consecutive losses 1
----------------------------------------------------------
1 2013.02.01 00:00 sell stop 1 0.16 1.58578 1.59761 1.57102 0.00 10000.00
2 2013.02.01 00:06 sell stop 2 0.13 1.58258 1.59761 1.57102 0.00 10000.00
3 2013.02.01 04:05 sell 1 0.16 1.58578 1.59761 1.57102 0.00 10000.00
4 2013.02.01 09:56 sell 2 0.13 1.58258 1.59761 1.57102 0.00 10000.00
5 2013.02.01 15:03 close 2 0.13 1.57775 1.59761 1.57102 61.88 10061.88
6 2013.02.01 15:03 close 1 0.16 1.57775 1.59761 1.57102 127.36 10189.24
7 2013.02.08 10:59 sell stop 3 0.14 1.57476 1.58912 1.56248 0.00 10189.24
8 2013.02.08 11:03 sell 3 0.14 1.57476 1.58912 1.56248 0.00 10189.24
9 2013.02.12 08:46 t/p 3 0.14 1.56248 1.58912 1.56248 170.16 10359.40
10 2013.03.15 07:12 sell stop 4 0.17 1.51049 1.52259 1.47949 0.00 10359.40
11 2013.03.15 18:00 delete 4 0.17 1.51049 1.52259 1.47949 0.00 10359.40
12 2013.03.21 08:21 sell stop 5 0.15 1.50326 1.51695 1.48968 0.00 10359.40
13 2013.03.21 09:23 sell stop 6 0.60 1.51355 1.51695 1.48968 0.00 10359.40
14 2013.03.21 09:30 delete 6 0.60 1.51355 1.51695 1.48968 0.00 10359.40
15 2013.03.21 09:30 delete 5 0.15 1.50326 1.51695 1.48968 0.00 10359.40
16 2013.04.15 18:27 buy stop 7 0.18 1.52994 1.51850 1.54300 0.00 10359.40
17 2013.04.15 20:03 buy stop 8 0.13 1.53380 1.51862 1.54300 0.00 10359.40
18 2013.04.15 23:03 buy 7 0.18 1.52994 1.51850 1.54300 0.00 10359.40
19 2013.04.15 23:03 close 7 0.18 1.52988 1.51850 1.54300 -2.34 10357.06
20 2013.04.16 00:30 buy stop 9 0.18 1.52994 1.51874 1.54300 0.00 10357.06
21 2013.04.16 03:54 buy 9 0.18 1.52994 1.51874 1.54300 0.00 10357.06
22 2013.04.16 16:11 buy 8 0.13 1.53380 1.51862 1.54300 0.00 10357.06
23 2013.04.16 20:57 close 9 0.18 1.53621 1.51874 1.54300 111.60 10468.66
24 2013.04.16 20:57 close 8 0.13 1.53621 1.51862 1.54300 30.42 10499.08
25 2013.05.07 14:36 buy stop 10 0.15 1.54969 1.53579 1.56316 0.00 10499.08
26 2013.05.08 09:53 buy 10 0.15 1.54969 1.53579 1.56316 0.00 10499.08
27 2013.05.08 16:47 close 10 0.15 1.55565 1.53579 1.56316 88.35 10587.43
========================================================================
You do not have the required permissions to view the files attached to this post.
User avatar
forextrader-radioman
Trader
Posts: 156
Joined: Sun Nov 27, 2011 11:11 am
Location: Hamburg/Germany

Re: latest update

Post by forextrader-radioman »

snailbeard wrote: [...]
I've completed a few more changes and done some historic testing
The results are very promising!
[...]
Hello dear Brian,
very interesting your different backtesting. As there are so many variables in this EA and some of them are not "strict trading 10.4 rules" if activated, can you please post your set-file?

All the best to you and yours,
Dietmar
„Reality is merely an illusion, albeit a very persistent one.” (Albert Einstein) "Realität ist lediglich eine Illusion, allerdings eine sehr hartnäckige."
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

Re: Multi 10:4 Trader EA

Post by kwchau »

Hi Andy, I hope you could help me with this error message. I've been running 2.01a quite successfully. Suddenly today I got the following error message :

2013.05.16 15:23:59 Multi_10_4_EAv2.01a EURUSD,M30: expert stopped
2013.05.16 15:23:59 Multi_10_4_EAv2.01a EURUSD,M30: expert function calls are not allowed; 'stdlib'-'CompareDoubles'

I have no idea what it means, appreciate your help !
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

Re: Multi 10:4 Trader EA

Post by kwchau »

kwchau wrote:Hi Andy, I hope you could help me with this error message. I've been running 2.01a quite successfully. Suddenly today I got the following error message :

2013.05.16 15:23:59 Multi_10_4_EAv2.01a EURUSD,M30: expert stopped
2013.05.16 15:23:59 Multi_10_4_EAv2.01a EURUSD,M30: expert function calls are not allowed; 'stdlib'-'CompareDoubles'

I have no idea what it means, appreciate your help !
After I tried everything, the problem seems to have resolved by re-installing the Empty4 platform. :) :)
Post Reply

Return to “Nanningbob 10.x”