-
Hi everyone, I backtested a simple strat with TP and SL on crypto. Crypto can have some big moves and in doing so the limit price of my TP(stop profit) is between the "close" of the current bar and the "open" of the next bar. The issue is that the backtesting module will use the next bar open as the trigger and as a limit-filled price. In reality, my TP is a working limit order that would have been filled at the exact price. Any idea to force the limit price to be used? It increased my PnL and show incorrect results that are not reliable. Thanks for any support. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The running recommendation is: if you'd like to trade the price between candles, you should be using more fine-grained data (e.g. if you use daily candles, use 15-minute candles instead). AFAIK most brokers honor your stop limit prices while the market is open, but they are not immune to price gapping on market open! But then, crypto is another story. The market is always open, and your limit order normally would have been picked at the price. I'm therefore willing to see this feature added as a parameter passed to |
Beta Was this translation helpful? Give feedback.
The running recommendation is: if you'd like to trade the price between candles, you should be using more fine-grained data (e.g. if you use daily candles, use 15-minute candles instead). AFAIK most brokers honor your stop limit prices while the market is open, but they are not immune to price gapping on market open!
But then, crypto is another story. The market is always open, and your limit order normally would have been picked at the price. I'm therefore willing to see this feature added as a parameter passed to
Backtest
constructor.