How can I get data from a time frame other than period setting in strategy tester (MT4)

 

Hello

I want to know How can I get data from a time frame other than period setting in strategy tester (MT4),using the sample code below, I get zero results for op2 & EMA2 whenever I choose period setting other than M5 in strategy tester.

any opinion on how can I fix it?

void OnTick()

  {

   string print="\n\n\n\n\n\n"+

                "\n op1= " + iOpen(NULL,PERIOD_CURRENT,0) +

                "\n op2= " + iOpen(NULL,PERIOD_M5,0) +

                "\n EMA1 : " +  iMA(NULL,PERIOD_CURRENT,21,0,MODE_EMA,PRICE_CLOSE,0) +

                "\n EMA2 : " +  iMA(NULL,PERIOD_M5,21,0,MODE_EMA,PRICE_CLOSE,0);

   Comment(print);

  }
Files:
000.JPG  57 kb
Reason: