I need to get the value of a particular candle, for example H1 10:00 today or the previous day. How do I get the size anytime during the day, Low, High, some specific candle?
- How to specify a particular candle by time?
- Highest
- can anybody show me exactly how every new price is subtracted from the price of some ten minutes ago.
Get the shift for the time you want. Then get what you want from that candle. | #define SECONDS int #define HR2400 86400 // PERIOD_D1 * 60 SECONDS time(datetime when=0){ return SECONDS((when == 0) ? TimeCurrent() : when) % HR2400; } datetime date(datetime when=0){ return ((when == 0) ? TimeCurrent() : when) - time(when); } /////// #define HR1000 36000 // 10 AM datetime when = date() + HR1000; int iBar = iBarShift(NULL,0, when); double h = High[iBar]; |
Thanks for info.
MQL can not, so your design can not be used. But we helped iBarShift command that I used to what is already known and works it.
double A = iHigh(NULL,PERIOD_M1,iBarShift(NULL,PERIOD_M1,D'10:31')); double B = iLow (NULL,PERIOD_M1,iBarShift(NULL,PERIOD_M1,D'10:31')); double X = A - B; // size candle M1 10:31 today
THX for idea

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