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

How to execute(buy or sell) create and execute operations at one time?

  • For instance,
    2016-02-23, SELL CREATE 24.20
    2016-02-24, SELL EXECUTED Price: 24.76
    24.24 and 24.76 are the close price of each day.
    It is daily trading. Execute operation is performed the next day, on 24.
    I want to create and execute the operation in 2016-02-23.
    I mean that the action was created and executed at a price of 24.24. Is it possible to perform such operation?

  • Check out cheat-on-open and cheat-on-close features in the documentation.

  • Is it possible to apply "Cheat on Open" and Cheat on close" for specific trades (i.e. for select order placements), as opposed to applying it across the board in cerebro: cerebro = bt.Cerebro(cheat_on_open=True)?

Log in to reply