Skip to content

Commit 01e0a5d

Browse files
committed
DOC: Explain that after Strategy.buy, the order is filled upon next open
#1173
1 parent 925006f commit 01e0a5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backtesting/backtesting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ def buy(self, *,
229229
"""
230230
Place a new long order and return it. For explanation of parameters, see `Order`
231231
and its properties.
232+
Unless you're running `Backtest(..., trade_on_close=True)`,
233+
market orders are filled on next bar's open,
234+
whereas other order types (limit, stop-limit, stop-market) are filled when
235+
the respective conditions are met.
232236
233237
See `Position.close()` and `Trade.close()` for closing existing positions.
234238

0 commit comments

Comments
 (0)