Can you use the close of the previous week?
iClose(NULL, PERIOD_W1, 1);This should suffice unless there's something I'm missing.
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)
Yup, you definitely want to check for these codes, even moreso if you're running an EA that places trades since you're not around to cycle through timeframes and download the data for that symbol+timeframe.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to check the close price of Last Friday (time xxxxxxx)
For example, now Thirthday and 14:00
I want to know the close price of 16:00 on Last Friday.
Below is basic code but I am not sure how to know the time gap between current xxxx and Last Friday time xxxxx.
Please advise!