Open makovez opened 1 year ago
When SL and TP are hit within the same bar, backtesting.py acts pessimistically, that is considering SL as hit first. https://github.com/kernc/backtesting.py/blob/0ce24d80b1bcb8120d95d31dc3bb351b1052a27d/backtesting/backtesting.py#L843-L848 Have to double check if this code works correctly with stop-limit orders. :thinking:
What does backtesting.py consider first? The low price or the high price of a candle to determine stop loss or take profit first?