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/

    Plotting indicator of data1 on data0

    General Code/Help
    1
    1
    56
    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.
    • eugenetwc
      eugenetwc last edited by

      My kfsentiment indicator is calculated from another data feed (self.datas[1]). I'm trying to plot only kfsentiment2 onto datas[0].
      I've done data1.plotinfo.plotmaster = data1 and managed to get the plots onto one observer. But I only want kfsentiment2 to show. Whenever I try to set data1.plot = False, nothing will show.

      def __init__(self):
              self.dataclose = self.datas[0].close
              self.sentiment_balance = self.datas[1].sentiment_balance
              self.kfsentiment1 = KalmanMovingAverage(self.datas[1].sentiment_balance)
              self.kfsentiment2 = KalmanMovingAverage(self.kfsentiment1, plotname='kfsentiment2', plot=True)
      
      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors