Indicators self.datas feed amount
-
Hello,
have an issue with accessing all feeds of self.datas in the indicator.
I added 11 data feeds to cerebro and ran the strategy, if I set a breakpoint inside the strategy, self.datas contains all the 11 feeds but in my indicator, self.datas contains only the first feed.
I add all datafeed with adddata with a different name and can loop trough them in the strategy correctly.
Thank you
-
@kumzy highly likely the indicator is applied only once for the first data feed. Hard to say more without seeing the actual code.
-
@ab_trader Thought that the indicators worked like the strategy where self.datas is accessible. Instead only the first is accessible. You were right
Thank you, found the answer there https://community.backtrader.com/topic/730/non-0th-data-feed-unexpected-behavior-in-indicator-multiple-data-feeds