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/

    Data Delay after launching live trading using backtrader

    General Discussion
    3
    2
    173
    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.
    • Z
      zuj last edited by

      Consider this scenario, I am trying to backtest a simple sma crossover strategy with moving average of 30 days. It will be fine in backtesting the strategy and backtrader actually waits for 30 days before it starts trading. But what about when you make that strategy live? You already have enough data to start trading but when we run the same code for live trading, is it gonna wait for 30 days to get sma values? If so, what should I do to use all the past available data on the first day of running the code live?

      R 1 Reply Last reply Reply Quote 0
      • R
        rajanprabu @zuj last edited by

        @zuj

        Have a look here

        One can either request from broker or use the local date to backfill the required data.

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