Is it not possible to display indicators during backtesting in MT5?

 

Hello there!

Is it not possible to display indicators during backtesting in MT5?

In MT4, indicators could be displayed on the backtest screen.

However, it is not possible with MT5.


MA could be displayed on the backtest screen by applying the following code.


int handle = iMA(....)

double buf[]

copy buffer


However, I would like to display more and more indicators on the backtest screen without code.

Also, with the backtest screen is 15 minutes,

Suppose we want to display the MA for the hourly timeframe, computed using ibarshift.


I was able to get MA values at different times,

It was not possible to draw that MA to the screen.

Please let me know if these are possible.

 
  1. valenciaorange: However, it is not possible with MT5.

    Wrong.

  2. valenciaorange:

    int handle = iMA(....)

    double buf[]

    copy buffer

    Your posted code has nothing to do with what you see on the chart.

    Your posted code is without context. Are those lines together, or is the iMA/iCustom call in OnInit (where it should be) and the others not? Always post all relevant code (using Code button) or attach the source file.

  3. Start the backtest, pause, set up the chart the way you want it. Save the template tester.tpl or «EAname».tpl.

    The template ordering for new charts is «EAname».tpl, (if tester) tester.tpl, (if debugging) debug.tpl (if offline chart) offline.tpl, and then Default.tpl.

 
William Roeder #:
  1. Wrong.

  2. Your posted code has nothing to do with what you see on the chart.

    Your posted code is without context. Are those lines together, or is the iMA/iCustom call in OnInit (where it should be) and the others not? Always post all relevant code (using Code button) or attach the source file.

  3. Start the backtest, pause, set up the chart the way you want it. Save the template tester.tpl or «EAname».tpl.

    The template ordering for new charts is «EAname».tpl, (if tester) tester.tpl, (if debugging) debug.tpl (if offline chart) offline.tpl, and then Default.tpl.

Sorry for providing incomplete code.

The handle is declared outside ONTICK.

Copy buffer is in ONTICK.

Then, MA could be displayed during the backtest.

However, I would like to be able to manually insert it into the chart as it would be easier.


Regarding indicator insertion and templates,

Although it is displayed on the main chart,

It could not be displayed in the backtest.

Attached is the backtest screen.



Reason: