I use 4hr timeframe. what i need is yesterday daily high/low/close and day before yesterday daily high/low/close?
Especially by running 4hr timeframe how to get day before yesterday daily high/low/close?
Use iHigh(), iLow(), and iClose() functions and specify the timeframe to be the daily chart, PERIOD_D1, and the shift to be 1, which is the previous daily bar.
double y_high = iHigh(Symbol(), PERIOD_D1, 1); double y_low = ilow(Symbol(), PERIOD_D1, 1); double y_close = iClose(Symbol(), PERIOD_D1, 1);
When using the "i"-functions, remember to check for a 4066 error.
For the day before the previous day's high/low/close, change the shift to 2.
Use iHigh(), iLow(), and iClose() functions and specify the timeframe to be the daily chart, PERIOD_D1, and the shift to be 1, which is the previous daily bar.
When using the "i"-functions, remember to check for a 4066 error.
For the day before the previous day's high/low/close, change the shift to 2.
Thanks. Got it....
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I use 4hr timeframe. what i need is yesterday daily high/low/close and day before yesterday daily high/low/close?
Especially by running 4hr timeframe how to get day before yesterday daily high/low/close?
Please give me suggetion to get!