Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Graphical Objects in Testing #
During testing/optimization graphical objects are not plotted. Thus, when referring to the properties of a created object during testing/optimization, an Expert Advisor will receive zero values.
This limitation does not apply to testing in visual mode.
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
- www.mql5.com
Testing Trading Strategies - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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 Guys,
I have a very straight forward code above. When I run in VISUAL mode, everything works perfectly fine.
BUT, in NON-VISUAL mode the x1,x2,y1,y2 are returned constants every time. Here is example of the output.
NOTE: Others values got retrieved correctly as the candle pass.
leftPrice 1.12013 rightPrice 1.10816 time1 2023.07.24 18:00:00 time2 2023.07.19 21:00:00 x1 -1136 x2 -32 y1 -1 y2 -1 statusOne true statusTwo true error code 0
Please help, I have been stuck for days