Why does backtesting fall off at the end on an EA ? - page 3

 

But why question something that is so obvious ?

Anyone who looks at that graph will conclude a zero end balance and thus a crashed account.

compare it to for example this one:


 
Consider withdrawal as a part of the strategy
 

This is why I have asked people on this site to confirm the issue.

I have not used MT4 before.

Some Graphs do fall off but they can be corrected by the account balance or the closing date.

Thanks very much for everyones advice.

 
Fred7777:

I have seen this a few times backtesting a few EAs. It works fine then at the end it will just fall off a cliff.

Have been trying to work this out. Most of the times its because there was not enough equity in the account or the EA closes off at the last date.

But this one I cant figure out. It is for the <name removed> :

<ink removed>

Ive asked the Developer why this is so and said its to do with the Stops and have tried to adjust them but nothing works. And then he wont reply anyway.

Does anyone know how this can be fixed or their views on this ?


Thanks 


Hi, It's normal. The last day in the test, the tester is getting ready to end the test, so he closes all the positions, the winners and the ones that drew the equity down. If your EA is good, and if the test would have last one more day after the one you chose for the test, those positions would have ended up positive maybe. So if you are looking to solve this problem, first look at the end of the test by choosing a last day where, right at closure, there is no draw down. I have the same issue, and this is what I do. So if you want your test to last a certain time, start by looking at the last day first. If you find a good one, then go back in time and choose your first day of the test. Like this, you won't have the crash on the graph. You can also add a function that stops your EA from trading "so many days" before the last day of the test, like this the EA hast time during the test to close all the positions positively so that the last day in the test, no more opened positions can draw the equity down. Hope this helps. Cheers!
 
Clement Bongola #:
Hi, It's normal. The last day in the test, the tester is getting ready to end the test, so he closes all the positions, the winners and the ones that drew the equity down. If your EA is good, and if the test would have last one more day after the one you chose for the test, those positions would have ended up positive maybe. So if you are looking to solve this problem, first look at the end of the test by choosing a last day where, right at closure, there is no draw down. I have the same issue, and this is what I do. So if you want your test to last a certain time, start by looking at the last day first. If you find a good one, then go back in time and choose your first day of the test. Like this, you won't have the crash on the graph. You can also add a function that stops your EA from trading "so many days" before the last day of the test, like this the EA hast time during the test to close all the positions positively so that the last day in the test, no more opened positions can draw the equity down. Hope this helps. Cheers!

ignoring that you responded to a very old thread and a post from the year 2018 (haha), this issue would happen at virtually every day/month along the backtest where there is a trade open, as mt4/5 does not report what most traders call as drawdown. To prove this, all you have to do is create an "equity stop" in your ea, Make it close all trades when equity hits 60% of the deposit, and 9 times out of 10, if your backtest would previously finish the full date period in profit, I bet that the equity stop was hit if you do the same settings and period. The reasons for this is because strategy tester does NOT recognise every single tick. Nor, (in general), does it check equity at every tick, only when trades have opend and closed, and even then not every time.

 
Michael Charles Schefe #:

ignoring that you responded to a very old thread and a post from the year 2018 (haha), this issue would happen at virtually every day/month along the backtest where there is a trade open, as mt4/5 does not report what most traders call as drawdown. To prove this, all you have to do is create an "equity stop" in your ea, Make it close all trades when equity hits 60% of the deposit, and 9 times out of 10, if your backtest would previously finish the full date period in profit, I bet that the equity stop was hit if you do the same settings and period. The reasons for this is because strategy tester does NOT recognise every single tick. Nor, (in general), does it check equity at every tick, only when trades have opend and closed, and even then not every time.

Hi, and yes :) I responded to an old thread, but as I was looking for answers, I found yours and thought this could help someone now or in the future. But yes, you are 100% correct. This is why I don't use, what many would call "Stupid", SL nor TP, and now even lesser an equity stop, maybe  combined with a total trade stop etc..., because they limit max profitability. I tried everything and don't have any other solution for the moment. Something else I do though, is go way down with the max number of trades, or increase the time between the trades. That lowers the DD drastically, but it also affects the performance. So for the moment I stick with a balance of those, risk management and tight trailingstop-triggers and stops. I hope, even though the thread is old, that someone out there has a real solution. I'm new to the EA community, so I still need help on lots of issues. Thanks for the every tick info of the tester. That helps. Kind regards!
 
at the end of the backtesting, it will close any open orders, could be the p&l for the open orders are negative