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 disable plotting specific resample data, but not all

    General Discussion
    2
    2
    300
    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.
    • Mariano Bengeldorf
      Mariano Bengeldorf last edited by

      Re: how to disable plotting resample data

      Hi, Regarding this old post, I have a doubt.

      Let's say that I have CVS minute data and I want to use 15 minute data and 30 minutes data, but not the 1 minute data. Then I will be resampling the data feed like this:

      data = readCVS()
      cerebro.resampledata(data, timeframe=bt.TimeFrame.Minutes, compression=15)
      cerebro.resampledata(data, timeframe=bt.TimeFrame.Minutes, compression=30)
      

      At the time of plotting I only want to plot the 15 minutes resampled datafeed and not the 30 minutes one.

      My question is: where should I enter the "plot=False" for the 30 minutes data?

      Thanks

      1 Reply Last reply Reply Quote 2
      • Denz Mind
        Denz Mind last edited by

        Hi, quite old but...

        data1 = cerebro.resampledata(data, timeframe=bt.TimeFrame.Minutes, compression=30)
        data1.plotinfo.plot = False
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors