How to find HIGH HELP!

Back to topics list To post a new topic, please log in or register
avatar
2
jayku161 2015.10.24 09: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 

avatar
2017
gooly 2015.10.24 09:27 #
 
You have to loop though the hour-bars from 9 to 15:00
avatar
2
jayku161 2015.10.24 09:28 #
 
Show me a snippet Example, Please
avatar
2017
gooly 2015.10.24 11: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]);
} 

Back to topics list  

To add comments, please log in or register