How to get today's high/low?

 

Hi,

How to get today's high/low?

while i run on any timeframe whenever candle closed i need to get today's high/low value!

please suggest me to get the easy idea!

i tried, but it shows alltime high/low:

int   firstbaroftoday=0;
double today_high=+99999,
       today_low=-99999;
for (int j= firstbaroftoday; j>=0; j--) 
      {
      today_high= MathMax(today_high, High[j]);
      today_low= MathMin(today_low, Low[j]);
      }    
 

Unless you plan to use a different start of day than your broker, you get today's high with:

iHigh(NULL,PERIOD_D1,0)

 

And today's low with: 

iLow(NULL,PERIOD_D1,0)
 
honest_knave:

Unless you plan to use a different start of day than your broker, you get today's high with:

 

And today's low with: 

 

 

Yes. Thanks Its cool n easy idea.
Reason: