I have this code & i am trying to get the High for the next higher timeframe. If it is M1 then M15 ; if M15 then M30 etc.
however this is not working. please help
int timeFrame[] = {1,5,15,30,60,240,360,1440,10080,43200},nextTF;
int init()
{
for(int i=0;i<ArraySize(timeFrame);i++){
if(i==ArraySize(timeFrame)-1){nextTF=timeFrame[i];Print("Sorry maximum time frame reached");break;}
if(timeFrame[i]==Period()){nextTF=timeFrame[i+1];break;Print("i "+i);}
}
}
I have this code & i am trying to get the High for the next higher timeframe. If it is M1 then M15 ; if M15 then M30 etc.
however this is not working. please help