Skip to content

Price for stop loss/tp for order execution under next() function #570

Answered by kernc
Cory-DeDell asked this question in Q&A
Discussion options

You must be logged in to vote

Imagine you're working with daily data, running your next() procedure every day after market close. You're contemplating next day's orders. There's no tomorrow's Open price yet to help you.

It's the same regardless of candle timeframe.

You can, however, run the backtest with Backtest(..., trade_on_close=True), which is like running that procedure "a few milliseconds" before market close.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Cory-DeDell
Comment options

Answer selected by Cory-DeDell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants