Hello, I noticed that some trades are not taken into account in Probacktest.
If in our code the entry conditions are the same and we only change the position closing conditions, the performances will be different but the number of trades should be similar.
For example, there is a difference in the number of trades:
CASE 1, end of the trade if: the lowest is less than the Lower Bollinger Band (or if the highest is greater than or equal to the moving average 20) = 132 trades.
1
2
3
4
5
6
7
8
indicator11=Average[20](close)
c8=(high>=indicator11)
indicator12=BollingerDown[20](close)
c9=(low<indicator12)
IFc8ORc9THEN
SELLATMARKET
ENDIF
CASE 2, End of the trade if: the candle closes below the Lower Bollinger Band (or if the highest is higher or equal to the moving average 20)= 181 trades
1
2
3
4
5
6
7
8
indicator11=Average[20](close)
c8=(high>=indicator11)
indicator12=BollingerDown[20](close)
c9=(close<indicator12)
IFc8ORc9THEN
SELLATMARKET
ENDIF
Why is there a difference in the number of trades?
Why is the performance almost the same (+3600$ and 57% winning trades with 132 and with 181 trades)?
Yet I did not put any restriction for new trades to be refused as long as there are open trades.
But you’re probably right.
I’ll study the code and the track record of the trades.
Thank you Nicolas