Download MetaTrader 5
To add comments, please log in or register
Your broker does not support mobile MetaTrader 5? Ask him to buy them!
Sherif Hasan
7283
Sherif Hasan 2015.02.03 07:15 

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
1837
honest_knave 2015.02.03 07:59  

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
7283
Sherif Hasan 2015.02.03 11:07  
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