I am making good progress on writing my own strategy; I am currently in the final testing stages.
My strategy uses 65-Renko bars and I automated entry, StopLoss, Breakeven and trail. I allow two long positions (called LLA1 and LLA2) to be open at the same time. I use a second timeframe of one Tick for finer granularity and my positions are opened on that one.
I am backtesting (nothing goes live yet) and for testing purposes I switched TraceOrders on.
I noticed that sometimes my initial StopLoss is not being registered during backtesting. This causes my long position to go far below the stoploss I set and only to be closed at the end of the trading day.
See, for example screenshots 1 (chart) and 2 (output):
- position LLA2 opened around 0529 AM, and my StopLoss (called 'InitialStopLLA2') was set at 172.025. As you can clearly see price went against me fairly quickly but I was not stopped out until around 0842 AM, Price had been below my SL for a lengthy period already. Can anyone please shed some light on how this is possible ??
And, for screenshots 3 and 4:
- a different LLA2 opened at 1950 PM, but my initial stopLoss was never sent to or accepted by the 'server', but my trail was, but did not get accepted. The reason stated is "Reason='SignalName does not have a matching FromEntrySignal to exit'". I don't get this either: I have hundreds of different LLA2's being opened and closed during the same backtest and they all react well to my SL/Trail/BE. What could be the problem here ??
Both of these trades were during 'normal' trading times, so I do not think spread or lack of volume are the issue here.
I am not very proficient in this backtesting-business and would like to find out if others have this problem (or similar ones) as well and how I can fix them. Or just give me a good reason not to be bothered by all this
Comment