Download MetaTrader 5

How to get today's high/low?

To add comments, please log in or register
Sherif Hasan
7293
Sherif Hasan  

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]);
      }    
honest_knave
Moderator
2420
honest_knave  

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)
Sherif Hasan
7293
Sherif Hasan  
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.
To add comments, please log in or register