Download MetaTrader 5
To add comments, please log in or register
Find and download Code Base apps via MetaTrader. It is fast!
Jaikanth
8
Jaikanth 2015.10.24 07:05 

HI friends,

 

              I would like to find High Low and open for a 9 hours period like 6:00 to 15:00 . How can I do it?

 

Thanks in Advance 

Carl Schreiber
5952
Carl Schreiber 2015.10.24 07:27  
You have to loop though the hour-bars from 9 to 15:00
Jaikanth
8
Jaikanth 2015.10.24 07:28  
Show me a snippet Example, Please
Carl Schreiber
5952
Carl Schreiber 2015.10.24 09:28  
jayku161:
Show me a snippet Example, Please

Have you looked into the editor's reference?

Taken from there:

for(x=1;x<=7000; x++) 
  { 
   if(IsStopped()) 
      break; 
   Print(MathPower(x,2)); 
  } 

Now amending that:

int noH = 9; // Hours = Bars
double hiHi=High[0],loLo=Low[0]; // ini vars => 1st bar, 1st hour
for(x=1;x<noH; x++) { // loop 8 times
   hiHi = fmax(hiHi,High[x]); // if you are on a h1-chart, otherwise you have to use iHigh() and iLow()
   loLo = fmin(loLo, Low[x]);
} 

/
To add comments, please log in or register