Moved to right section.
That's a lot of code to debug...not sure you will get an answer.
Snelle Moda: I think the reason is the excessive use of the CopyClose() function is the blame but i'm not sure. Now the function is called 7 times for each M1 bar foreach symbol in a double loop function, see the code.
On MT4: Unless the current chart is the specific pair/TF referenced, you must handle
4066/4073 errors.
if(CopyClose(sSymbol, PERIOD_M1, var.adTimeDate_Data[nIndex_nr], 1, dClose_Data) == -1) {bFail = true;};
Can anybody explain why this is not working correct.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
Timeseries and Indicators Access / Data Access -
Reference on algorithmic/automated trading language for MetaTrader 5
whroeder1:
On MT4: Unless the current chart is the specific pair/TF referenced, you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
On MT4: Unless the current chart is the specific pair/TF referenced, you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
Thanks whroeder1.
The problem is solved with your suggestions.
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 all.
I'm trying to built a 'relative price index' based on a number of major world Indexes: S&P500, DAX30, EUR50, CAC40, SWISS20, JPN225 and UK100.
My problem is that the calculated output is not reliable. Sometimes it works but often the indicator skips data and the average price is not correct. (The CopyClose() function is not working properly)
I think the reason is the excessive use of the CopyClose() function is the blame but i'm not sure. Now the function is called 7 times for each M1 bar foreach symbol in a double loop function, see the code.
Can anybody explain why this is not working correct.