-
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe can't see your broken code.
How To Ask Questions The Smart Way. (2004)
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
-
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 - MQL4 programming forum - Page 3 #26.4 (2019)On MT5: Unless the current chart is that specific pair/TF, you must synchronize the terminal Data from the Server before accessing candle/indicator values.
Error 4806 while using CopyBuffer() - Expert Advisors and Automated Trading - MQL5 programming forum #10 (2020)
Is it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum (2019)
Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data with Terminal Data - Symbols - General - MQL5 programming forum #2 (2018)
SymbolInfoInteger doesn't work - Symbols - General - MQL5 programming forum (2019) - Don't try to use any price (or indicator) or server related functions in OnInit (or on load or in OnTimer before you've received a tick), as there may be no connection/chart yet:
- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- A new tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
-
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe can't see your broken code.
How To Ask Questions The Smart Way. (2004)
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
-
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 - MQL4 programming forum - Page 3 #26.4 (2019)On MT5: Unless the current chart is that specific pair/TF, you must synchronize the terminal Data from the Server before accessing candle/indicator values.
Error 4806 while using CopyBuffer() - Expert Advisors and Automated Trading - MQL5 programming forum #10 (2020)
Is it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum (2019)
Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data with Terminal Data - Symbols - General - MQL5 programming forum #2 (2018)
SymbolInfoInteger doesn't work - Symbols - General - MQL5 programming forum (2019) - Don't try to use any price (or indicator) or server related functions in OnInit (or on load or in OnTimer before you've received a tick), as there may be no connection/chart yet:
- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- A new tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
Thank you for your response.
Any one else with helpful info kindly pitch in.
- 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 created a multi currency EA to work with 3 default symbols. At first the EA was working just fine until I added a 4th symbols and hell broke loose. So the issue is calculation of profits int he tester the values are just wrong. even when working with the 3 default symbols. I fail to understand the issue because when i run the EA on live market, profits calculations are right. please see attached pictures.
in the tester for step index profits are correct base on current price, open price and volume but wrong for profits for the volatility 25/50. if the issue is the code shouldn't there be some kind of consistency? where I get all crazy values.
[Subject edited by moderator to remove ALLCAPS]