-
Hey, I was wondering what happens if you set both take profit and stop loss on an order, and the next candle fluctuates in a manner that should trigger both. What gets priority according to the backtest? (given the fact we cant know the order of events within the candle). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you enter with a plain market order, SL has priority (the framework takes an adversarial, rather than an optimistic stance). If you enter with a stop/limit order, a warning is emitted: backtesting.py/backtesting/backtesting.py Lines 905 to 915 in a49122c |
Beta Was this translation helpful? Give feedback.
If you enter with a plain market order, SL has priority (the framework takes an adversarial, rather than an optimistic stance).
If you enter with a stop/limit order, a warning is emitted:
backtesting.py/backtesting/backtesting.py
Lines 905 to 915 in a49122c