kmnatarajan: i mean, from 0 hour to current hour, i want to select the highest and lowest.
#define HR2400 86400 // 24 * 3600 datetime TimeOfDay(datetime when){ return( when % HR2400 ); } datetime DateOfDay(datetime when){ return( when - TimeOfDay(when) ); } datetime now = TimeCurrent(), bod = DateOfDay(now); // Beginning of the day int iBod = iBarShift(NULL,0, bod), iHi = iHighest(NULL,0,MODE_HIGH,iBod+1,0); // +1 include bar 0 double Hod = High[iHi];
thanks WHRoeder, the code snippet u gave me works nicely.......
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi, the following is the code i am trying to use in my EA, i just wanna know how to select the intraday bars alone?
i mean, from 0 hour to current hour, i want to select the highest and lowest.