Discussion of article "Debugging MQL5 Programs" - page 3

 

Question about debugging on real data:

In the real data debugging mode will trades be executed for real? Or their execution will be simulated as in the strategy tester?

 
rel18:

Question about debugging on real data:

In the real data debugging mode will trades be executed for real? Or their execution will be simulated as in the strategy tester?

In order not to make a mess (terminology mismatch), please describe in detail WHERE and WHAT you are clicking.

 
Vladimir Karputov:

In order not to make a mess (terminology mismatch), please describe in detail WHERE and WHAT you are clicking.

There is an Expert Advisor code opened in MetaEditor. I set breakpoints and launch the debugger. The debugger has two modes: debugging on historical data and debugging on real data. And there are two corresponding buttons on the MetaEditor panel. MetaEditor launches debugging on historical data in the tester, and debugging on real data - in the trading terminal, as it is written in the help, on a "special chart". Will the Expert Advisor launched in debugging on real data on this special chart trade for real?

Отладка кода - Разработка программ - MetaTrader 5
Отладка кода - Разработка программ - MetaTrader 5
  • www.metatrader5.com
В MetaEditor встроен отладчик — инструмент, который позволяет проверить работу программы по шагам (по отдельным функциям). Вы расставляете в коде программы точки останова — места, в которых исполнение программы должно быть приостановлено. Затем запускаете программу на обычном графике или в тестере стратегий. Как только исполнение программы...
 
rel18:

There is an Expert Advisor code opened in MetaEditor. I set breakpoints and start the debugger. The debugger has two modes: debugging on historical data and debugging on real data. And there are two corresponding buttons on the MetaEditor panel. MetaEditor launches debugging on historical data in the tester, and debugging on real data - in the trading terminal, as it is written in the help, on a "special chart". Will an Expert Advisor launched in debugging on real data on this special chart trade for real?

Yes, it will. You just need to decide on which account everything will be done on, demo or real.

 
The same indicator on the same candlestick, timeframe and with the same values of parameters shows different values when testing on real data and when testing on historical data.
Debugging on real data shows the same value as in the chart in the terminal window, there is a signal, but debugging on historical data "moves", the signal is lost.

How to cure?
 
Veresk710:
The same indicator on the same candlestick, timeframe and with the same values of parameters shows different values when testing on real data and when testing on historical data.
Debugging on real data shows the same value as in the chart in the terminal window, there is a signal, but debugging on historical data "moves", the signal is lost.

How to cure?

Cure: at least test on history in the"Every tick based on real ticks" mode. Treatment two: fix errors in your code.