For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

A way to add next_orderbook

  • We have the next() which works with updates on upcoming/next data bars, which works with OHLC or bid/ask.

    Is there a way I can add a next_orderbook() (say), to push changes in the order book so that the strategy can operate on it?

  • administrators

    No. And it has been discussed in the past several times: backtrader is not a bid/ask platform, even if it can be forced to partially use the values due to built-in extension capabilities.

    But something like next_orderbook has nothing to do with the design per se.

Log in to reply