How to get ChartID's in Strategy Tester ?

 

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

 
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.
 
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.
 
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 ?

 
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.

 
angevoyageur:
Yes it is.
Any reference for this?
 
marketeer:
Any reference for this?
Just try it. I don't know if it's documented somewhere.
Reason: