Navigation

    Backtrader Community

    • Register
    • 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/

    order execution price

    General Code/Help
    2
    4
    899
    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.
    • bb2
      bb2 last edited by

      Hello,

      I have a data with timeframe 1 Day and compression 1. My strategy is catching signals based on 1 Day data and actually is making orders instantly (let's suppose 1 second period). I do not have the 1 second data for now but know that my order will be executed instantly (1 second).

      How will it be possible to execute the order instantly before waiting the next 1-Day candle at the right price(which I can specify).

      I thought of creating some random 1 second data to simulate a 1 day candle compliant with that day's OHLC. Is there any other option do you think?

      Thank you in advance.

      B 1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators @bb2 last edited by

        @eduedix said in order execution price:

        I have a data with timeframe 1 Day and compression 1. My strategy is catching signals based on 1 Day data and actually is making orders instantly (let's suppose 1 second period). I do not have the 1 second data for now but know that my order will be executed instantly (1 second).

        The execution speed of your order has nothing to do with signal generation. When you see the 1-Day candle, the candle is gone (you already see the close price, which means it is closed).

        You may use cheat-on-close: Docs - Broker

        bb2 1 Reply Last reply Reply Quote 0
        • bb2
          bb2 @backtrader last edited by

          @backtrader is it possible to cheat on market order to force it for a specified price?

          1 Reply Last reply Reply Quote 0
          • B
            backtrader administrators last edited by

            If you already know the price you are going to get from the market, what's the purpose of backtesting?

            In any case see: Blog - Evaluating external historical performance

            This is not the same as backtesting, this is meant to analyze your past and already existing performance.

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