Backtesting result problems

 

Hi everyone I wrote a trend following strategy. It was firstly tested on python, the results looks good. But when I wrote it in mql5 and the results seems different and bad. The backtesting plots shows entries of trade on places that it never traded in the past. It is way above the high and low.

Can anyone took a look and tell me what's wrong with my code?

<ex5 file deleted>

 

Attach the mq5 file as nobody can read an ex5.

Please post in the correct section in future. I will move this to the EA section.

 
das Leo: Hi everyone I wrote a trend following strategy. It was firstly tested on python, the results looks good. But when I wrote it in mql5 and the results seems different and bad. The backtesting plots shows entries of trade on places that it never traded in the past. It is way above the high and low. Can anyone took a look and tell me what's wrong with my code?

If it was originally written in Python, how do you know which one is good or bad, if there is no common way to test both for comparison. The Strategy Tester can only test MQL and not Python, so how did you compare them?

If you want us to look at the code and compare them, then you will have to supply the source code to both of them, and not executable files.

 
das Leo:

Hi everyone I wrote a trend following strategy. It was firstly tested on python, the results looks good. But when I wrote it in mql5 and the results seems different and bad. The backtesting plots shows entries of trade on places that it never traded in the past. It is way above the high and low.

Can anyone took a look and tell me what's wrong with my code?

<ex5 file deleted>

Only above the high, not the low. It is called the Spread. You buy at the Ask, the chart shows Bid prices only. Most likely your python test does not include the spread. 

You should now that the MT5 tester has many peculiarities, i am confident the python test has its own too, so you are exponentially complicating things

Like Fernando pointed out. If you want help, you should provide more info and or source code.
Reason: