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/

    How can I restrict trading in backtesting to a certain number of bars?

    General Code/Help
    ema sma dates
    1
    1
    20
    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.
    • B
      BazsiBazsi last edited by

      I tried specifying negative index to the closing data at the opening trade condition, where the given negative number is the amount of bars i would want to skip over(for eg: -1000 > 0 because at beginning below the first 1000 bars we dont have data, but afterwards it okay). But this has no effect at all, trades still happen. Are there any ways to solve this?

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