Backtest on MT5

 

Hi all!

I tried to backtest some indicators with a null ea on mt5, this is very useful for prepare a good manual strategy.

On mt4 after run a backtest, you can simply pause the simulation and attach all your indicators than play...instead of on mt5 it's not possible, you can only see the ea but you cannot attach any indicators.

Could you please help me on this? I need to call indicators from a null ea or what?

Best regards

doc

 

...

Set up a chart (a regular chart) with inidcators you wish visual back tested and save it as template under the name of the EA you are going to test. As soon as you start the test all is going to be loaded (indicators and settings) and running

You can use the "EA" attached (it does nothing) for that purpose, and whatever indicator(s) you wish to test simply set up on the chart and save the template as "for visual test". That is all.

dr.house7:
Hi all!

I tried to backtest some indicators with a null ea on mt5, this is very useful for prepare a good manual strategy.

On mt4 after run a backtest, you can simply pause the simulation and attach all your indicators than play...instead of on mt5 it's not possible, you can only see the ea but you cannot attach any indicators.

Could you please help me on this? I need to call indicators from a null ea or what?

Best regards

doc
Files:
 
mladen:
Set up a chart (a regular chart) with inidcators you wish visual back tested and save it as template under the name of the EA you are going to test. As soon as you start the test all is going to be loaded (indicators and settings) and running You can use the "EA" attached (it does nothing) for that purpose, and whatever indicator(s) you wish to test simply set up on the chart and save the template as "for visual test". That is all.

Thanks mladen!

I really don't understand why they try everything to complicate our lives with the new platform...is terrible cannot change inputs during a backtest.

I tried what you explain here, but if I use your snapshot (here attached) saved on template, at start of a null ea, mt5 doesn't take any pictures

transl_snapshot_mladen_v_1-02.ex5

This file is in ex5 cause my coder has not finish the job yet, sorry.

doc

 

...

Doc

I really did not try the snapshot from metatrader 5. What I noticed that some indicators will not work in visual back test in metatrader 5 as they work in usual work and without being able to look at the code I have no idea what could go wrong in the one you have.

dr.house7:
Thanks mladen!

I really don't understand why they try everything to complicate our lives with the new platform...is terrible cannot change inputs during a backtest

I tried what you explain here, but if I use your snapshot (here attached) saved on template, at start of a null ea, mt5 doesn't take any pictures

transl_snapshot_mladen_v_1-02.ex5

This file is in ex5 cause my coder has not finish the job yet, sorry.

doc
 
mladen:
Doc I really did not try the snapshot from metatrader 5. What I noticed that some indicators will not work in visual back test in metatrader 5 as they work in usual work and without being able to look at the code I have no idea what could go wrong in the one you have.

Anyway thank you very much, I'll come back with mq5 version.

Best regards

doc

 

...

Doc

You are right. For some reason in visual test mode it does nothing with the ChartScreenShot() (that is how it is called now) in metatrader 5. Attaching the indicator that works in real time but the same as your case, does not work in back test. Maybe it helps your coder to locate what is going on

Files:
snapshot.mq5  2 kb
 
mladen:
Doc You are right. For some reason in visual test mode it does nothing with the ChartScreenShot() (that is how it is called now) in metatrader 5. Attaching the indicator that works in real time but the same as your case, does not work in back test. Maybe it helps your coder to locate what is going on

This is the mq5 version that I pay for it, the code has some differences but results are the same...I put it here for free so maybe someone could help me on use it during backtest or almost tell me why mt5 doesn't allow it

snapshot_mladen.mq5

Thanks all

doc

Files:
 

...

Also, a difference compared to metatrader 4 version : snapshot function does not create a sub-folder if specified by the name of the file to save. But, exactly the same as the metatrader 4 counterpart, it does not raise any error (it should return false in the case of error, but it does not), so from the code it looks as if everything is working OK while in fact, it did not save the snapshot at all in any case of an error. User can notice that there was an error only because the file that was supposed to be crated does not exist

Just some of my observations of what is going on ...

dr.house7:
This is the mq5 version that I pay for it, the code has some differences but results are the same...I put it here for free so maybe someone could help me on use it during backtest or almost tell me why mt5 doesn't allow it

snapshot_mladen.mq5

Thanks all

doc
 
mladen:
Also, a difference compared to metatrader 4 version : snapshot function does not create a sub-folder if specified by the name of the file to save. But, exactly the same as the metatrader 4 counterpart, it does not raise any error (it should return false in the case of error, but it does not), so from the code it looks as if everything is working OK while in fact, it did not save the snapshot at all in any case of an error. User can notice that there was an error only because the file that was supposed to be crated does not exist Just some of my observations of what is going on ...

And what about calculation?

In mt5, a useless (because it don't save any pictures) backtest with snapshot attached to the chart and nothing else, is about 100 time slower than same in mt4

 

...

Metatrader 5 still needs maturing time before we can tell that it is fully usable ... My expectations were, when it was announced and promoted what will it and how will it do, different than what we are delivered so far

dr.house7:
And what about calculation? In mt5, a useless (because it don't save any pictures) backtest with snapshot attached to the chart and nothing else, is about 100 time slower than same in mt4
 
mladen:
Set up a chart (a regular chart) with inidcators you wish visual back tested and save it as template under the name of the EA you are going to test. As soon as you start the test all is going to be loaded (indicators and settings) and running You can use the "EA" attached (it does nothing) for that purpose, and whatever indicator(s) you wish to test simply set up on the chart and save the template as "for visual test". That is all.

thank u very much for sharing ,working very nice and helpful

Reason: