For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Help with referencing multiple data feeds

  • Hi,

    I have been looking everywhere but I don't understand how to reference the data feeds i am looking for.

    e.g. I have 2 data feeds:


    the first data in adddata is minute data and the resampled is hourly.

    I want to now be able to refer to the data in my strategy as


    is this possible?

  • Are you possibly looking for something like replay?

  • you can refer to your data feeds inside the strategy as

    self.datas[0].close[0] # minute data feed
    self.datas[1].close[0] # hour data feed


    self.data0.close[0] # minute data feed
    self.data1.close[0] # hour data feed

  • I managed to do this and it seems to work:

            self.minutes = self.data0
            self.hours = self.data1

Log in to reply