Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

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

    General Code/Help
    3
    3
    541
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sasha last edited by Sasha

      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?

      1 Reply Last reply Reply Quote 0
      • A
        ab_trader last edited by

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

        • If my answer helped, hit reputation up arrow at lower right corner of the post.
        • Python Debugging With Pdb
        • New to python and bt - check this out
        1 Reply Last reply Reply Quote 0
        • C
          cwse last edited by

          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)?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors