tinivini: I use two time frame in Strategy Tester. with function ChartID() i can find first chart id . who can i find second time frame (in this screenshot M30) Chart ID ?
By looping through all open charts with ChartNext and filtering to only the charts you want.

Documentation on MQL5: Chart Operations / ChartNext
- www.mql5.com
ChartNext - Chart Operations - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Fernando Carreiro #:
By looping through all open charts with ChartNext and filtering to only the charts you want.
i test with simple code :
long chartID=ChartFirst(); while(chartID >= 0) { Print(chartID); chartID = ChartNext(chartID); }
this code work in real time , but in ST output is only : 12345 (this is for first chart ID) .
I think the second chart in ST is an indicator with a different time frame than the main chart. In this case you should have the values already in your EA.
But you can start the EA on the timeframe of the indicator or you can change the indicator to m5 but showing the values of M30 - search for multi timeframe.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I use two time frame in Strategy Tester.
with function ChartID() i can find first chart id . who can i find second time frame (in this screenshot M30) Chart ID ?