Download MetaTrader 5
To add comments, please log in or register
MQL5.community allows users to store their source codes in MQL5 Storage. Try it!
waza123
125
waza123 2014.08.26 14:57 

When I use a several pairs and run it in strategy tester, the two window will be created, EURUSD D1 and USDJPY D1:

MqlRates d1[];
ArraySetAsSeries(d1, true);
CopyRates("EURUSD", PERIOD_D1, 0, count_bars+1 ,d1);

MqlRates d2[];
ArraySetAsSeries(d2, true);
CopyRates("USDJPY", PERIOD_D1, 0, count_bars+1 ,d2);



How to get the ChartID for created windows ?


Thanks

Stanislav Korotky
17335
Stanislav Korotky 2014.08.26 20:06  
waza123:

When I use a several pairs and run it in strategy tester, the two window will be created, EURUSD D1 and USDJPY D1:

MqlRates d1[];
ArraySetAsSeries(d1, true);
CopyRates("EURUSD", PERIOD_D1, 0, count_bars+1 ,d1);

MqlRates d2[];
ArraySetAsSeries(d2, true);
CopyRates("USDJPY", PERIOD_D1, 0, count_bars+1 ,d2);



How to get the ChartID for created windows ?


Thanks

Why do you assume that calling CopyRates should open charts for corresponding symbol in the tester? I don't think it works like this.
Alain Verleyen
Moderator
30299
Alain Verleyen 2014.08.26 20:24  
marketeer:
Why do you assume that calling CopyRates should open charts for corresponding symbol in the tester? I don't think it works like this.
Yes it is.
Alain Verleyen
Moderator
30299
Alain Verleyen 2014.08.26 20:30  
waza123:

When I use a several pairs and run it in strategy tester, the two window will be created, EURUSD D1 and USDJPY D1:

MqlRates d1[];
ArraySetAsSeries(d1, true);
CopyRates("EURUSD", PERIOD_D1, 0, count_bars+1 ,d1);

MqlRates d2[];
ArraySetAsSeries(d2, true);
CopyRates("USDJPY", PERIOD_D1, 0, count_bars+1 ,d2);



How to get the ChartID for created windows ?


Thanks

I don't think you can. You only have access to the current chart (the one you set by choosing Symbol/Period in the Strategy Tester).

By the way, what to do ?

waza123
125
waza123 2014.08.27 00:03  
angevoyageur:

I don't think you can. You only have access to the current chart (the one you set by choosing Symbol/Period in the Strategy Tester).

By the way, what to do ?

sad.

i just want to draw my lines and texts on both charts.

Stanislav Korotky
17335
Stanislav Korotky 2014.08.27 13:43  
angevoyageur:
Yes it is.
Any reference for this?
Alain Verleyen
Moderator
30299
Alain Verleyen 2014.08.27 14:32  
marketeer:
Any reference for this?
Just try it. I don't know if it's documented somewhere.
/
To add comments, please log in or register