Download MetaTrader 5

I want to get the High price for the next higher timeframe

To add comments, please log in or register
Launch agents on an idle PC. It is profitable!
Ash 2016.02.23 02:01 

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);}
if( Period() == PERIOD_M5 )

      whroeder1 2016.02.23 12:27  
      Where do you set the variable t?
      To add comments, please log in or register