New Chart at the same pair in Strategy Tester

 

Hi!

I'm using the strategy tester to evaluate some setups (via EA) but I'm restricted to a timeframe only (5 minutes). I would like to add others to assess the general scenario, such as 30 minutes or 1 hour. I've seen several examples of iterations with multiple tabs in the tester using timeframes from the same asset. How to add these additional charts? Note: ChartOpen does not work in Strategy Tester.

 
moderado_ba:

Hi!

I'm using the strategy tester to evaluate some setups (via EA) but I'm restricted to a timeframe only (5 minutes). I would like to add others to assess the general scenario, such as 30 minutes or 1 hour. I've seen several examples of iterations with multiple tabs in the tester using timeframes from the same asset. How to add these additional charts? Note: ChartOpen does not work in Strategy Tester.

They show up as other tabs ,which will appear on the Strategy Tester, each one of a different Timeframe. 


Your EA should have severals indicators loaded inside it.. for default most people use PERIOD_CURENT, as a parameter,

which will correspond to the Tester Parameter window choosen Timeframe (e.g. 5 minutes as you mentioned)


To make the EA work on multiple timeframes, having its indicator collecting data from several timeframes, this is what you have to do:


you must determine the timeframe on which those additional indicators must run, inside your EA. e.g:

// first MA indicator, to be executed for your EA on M15 timeframe
Handle1 = iMA(_Symbol, PERIOD_M15, inpMAPeriod, 0, inpMAMethod, inpMAPrice);


// Another MA which will be executed on H1
Handle2 = iMA(_Symbol, PERIOD_H1, 20, 0, MODE_LWMA, PRICE_MEDIAN);


//Third MA which will be executed on M5
Handle3 = iMA(_Symbol, PERIOD_M5, 120, 0, MODE_SMA, PRICE_CLOSE);


Once done, the multiple tabs will automatically appear on the Strategy Tester. 


PS: When testing an EA which works on several timeframes, always choose [1 minute] timeframe on the Tester parameter window.

M1


Tabs show automatically.. in my case there are 6 tabs, since I am using 6 different timeframes inside the EA.


tabs

 
moderado_ba:

Hi!

I'm using the strategy tester to evaluate some setups (via EA) but I'm restricted to a timeframe only (5 minutes). I would like to add others to assess the general scenario, such as 30 minutes or 1 hour. I've seen several examples of iterations with multiple tabs in the tester using timeframes from the same asset. How to add these additional charts? Note: ChartOpen does not work in Strategy Tester.

Thanks, rrocchi!

I thought I would have to solve it with some artifice: using profile, template, etc. Simple and effective. Grateful for the agility/availability.

Reason: