How to : Multi Time Frame Analysis

 

I want to do something like this

if period current is H1 then entry period should be m5

I tried this but not working

int OnInit()
  {
//---

   if(PERIOD_CURRENT == PERIOD_H1) MTA_Entry = PERIOD_M5;

   h_MA    = iDEMA(Symbol(), MTA_Entry, 3, 0, PRICE_CLOSE);
   h_Bands = iBands(Symbol(), 0, BB_Prd, 0, BB_Dev, PRICE_CLOSE);
 
doshur:

I want to do something like this

if period current is H1 then entry period should be m5

I tried this but not working

PERIOD_CURRENT can't never be equal to PERIOD_H1. These are predefined constants.

   if(Period() == PERIOD_H1) MTA_Entry = PERIOD_M5;
 
Thank you