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



  • 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.


  • administrators

    @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



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


  • administrators

    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.