Then I have found a weird behavior of the backtesting engine that results in many less trades in the mirrored version. As you can see in the attached screenshots, the upper chart has all the correct long trades according to the strat. But the lower chart has only some of the reversed trades of the mirrored strat. Many are missing, which should be there according to the code. In the first comparison you can see the first 4 trades are exactly mirrored from long to short, but the next 8 trades are missing. The next trade should reenter short at 4379.75, exactly where in the lower chart the long entry takes place. THen in other sections all the mirrored trades are there as they should as seen on the other picture.
I cannot see any reason why those trades are missing. The properties are set exactly the same, the code is just changes, so the short strat does the opposite compared to the long strat. In the historical 1 year performance you can also see that the long version has 11942 trades, while the short version has only 1565 trades, although entry criteria are the same only short instead of long.
Why could this be happening?
Comment