strategy tester restart the equity value resulting huge drawdown

 

Hi,

I just backtesting my EA and I saw an abnormal behavior in the graph shown below,

After looking into the chart there isn't any particular trade that resulting in that drawdown. I looked into the journal log and found that after 2022.06.30 the strategy tester restart the equity of the strategy tester.

CS 0 12:20:38.974 Core 1 2022.06.30 22:25:59   order performed buy 0.65 at 1.04713 [#1013 buy 0.65 EURUSD at 1.04711]

CS 0 12:20:38.974 Core 1 final balance 65563.82 pips

CS 0 12:20:38.974 Core 1 EURUSD,H1: 32904116 ticks, 9334 bars generated. Test passed in 0:01:03.365 (including ticks preprocessing 0:00:01.828).

CS 0 12:20:39.201 Tester quality of analyzed history is 99%

CS 0 12:20:45.144 Core 1 calculate profit in pips, initial deposit 50000, leverage 1:50

CS 0 12:20:45.144 Core 1 EURUSD: symbol to be synchronized

CS 0 12:20:45.144 Core 1 EURUSD: symbol synchronized already, 18 bytes received

CS 0 12:20:45.144 Core 1 EURUSD: load 27 bytes of history data to synchronize in 0:00:00.001

CS 0 12:20:45.144 Core 1 EURUSD: history synchronized from 2016.01.04 to 2023.01.17

CS 0 12:20:45.144 Core 1 EURUSD,H1: history cache allocated for 12471 bars and contains 9334 bars from 2021.01.04 00:00 to 2022.06.30 23:00

CS 0 12:20:45.144 Core 1 EURUSD,H1: history begins from 2021.01.04 00:00

......

CS 0 12:20:45.144 Core 1 2022.07.01 00:00:00   EA will process EURUSD only

CS 0 12:20:45.144 Core 1 2022.07.01 00:00:00   All arrays sized to accomodate 1 symbols

CS 0 12:20:45.144 Core 1 2022.07.01 00:00:00   Handle for Entry Indicator / EURUSD / PERIOD_H1 successfully created

CS 0 12:20:45.144 Core 1 2022.07.01 00:00:00   Handle for ATR Indicator / EURUSD / PERIOD_H1 successfully created

CS 0 12:20:45.144 Core 1 2022.07.01 00:00:00   Handle for filter Indicator / EURUSD / PERIOD_H1 successfully created

CS 0 12:20:45.144 Core 1 2022.07.01 19:00:00   market buy 0.5 EURUSD (1.04069 / 1.04079 / 1.04069)


Does anyone ever experience this issue? and if there's a solution to this problem?
 
Luandre Ezra:

CS 0 12:20:38.974 Core 1 2022.06.30 22:25:59   order performed buy 0.65 at 1.04713 [#1013 buy 0.65 EURUSD at 1.04711]


I would say stop loss hit. And you get a drawdown. (Buy order could be stop loss of a sell order.)

 
Luandre Ezra: I just backtesting my EA and I saw an abnormal behavior in the graph shown below, After looking into the chart there isn't any particular trade that resulting in that drawdown. I looked into the journal log and found that after 2022.06.30 the strategy tester restart the equity of the strategy tester.Does anyone ever experience this issue? and if there's a solution to this problem?

If you use Grids or Martingale, sooner or later you will be hit by large drops in your account and eventually blow it completely.

The Strategy Tester is showing you that and warning you. Instead of understanding that, you are choosing to believe that the tester is wrong, which it is not.

 
Fernando Carreiro #:

If you use Grids or Martingale, sooner or later you will be hit by large drops in your account and eventually blow it completely.

The Strategy Tester is showing you that and warning you. Instead of understanding that, you are choosing to believe that the tester is wrong, which it is not.

Thanks for the remainder but just like I said above this issue happened at 2022.07.01 and before this date there's no open position. I understand if the problem is loss because of loss in position but this is not, strategy tester just revert the equity and start again at initial equity.
 

Disable forward testing.

Also do not use profit in pips. It is useless for - martingale / hedge / recovery / always never lose - strategies because it does not take into accounbt margin requirements.

 
Enrique Dangeroux #:

Disable forward testing.

Also do not use profit in pips. It is useless for - martingale / hedge / recovery / always never lose - strategies because it does not take into accounbt margin requirements.

Thank you the problem is resolved, but could you elaborate me more about using margin requirements for profit taking in those type of strategy?

 

Regarding margin requirements, please google, i am not going to repeat it here.

The profit in pips mode is suitable to check the profitability of the bare bone strategy without money management only. It does not take into account if you trade 0.01 lots or 10 lots, just the difference in the open and close price of a trade.

Reason: