kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.04k stars 987 forks source link

Is there a way to enter a bracket order? #1104

Open erdult opened 5 months ago

erdult commented 5 months ago

Is there a way to enter a bracket order

For reference:

Bracket order is a type of market order that is placed during intraday trading only. Such orders combine a buy order with a stop-loss and target order. Bracket orders are meant to help stock market traders square off a favourable position by the end of the trading session.

So this order is path dependent (need to determine if profit taking limit or stop-loss will trigger first), with OHLC data I am not sure how it could work.