Generic PandasDirectData (and others) ?
I see that you have enabled the possibility to add custom data lines using GenericCSVData (see the blog post) - however, I think it would be beneficial to enable custom data lines for other feeds as well (e.g., PandasDirectData etc.).
I tried to naivly adopt the code of GenericCSVData for PandasDirectDate, i.e.:
class GenericPandas(bt.feeds.PandasDirectData): lines = ('feature',) params = (('feature', 3),)
data = GenericPandas(dataname=df,...)
But this does not seem to work. The question is whether I am doing something wrong or if it is currently just not possible.
Any help is very much appreciated. Thank you.
I see that you have enabled the possibility to add custom data lines using GenericCSVData (see the blog post)
That's not right. Defining line hierarchies is the basis of platform. Each indicator defines its own set of lines.
The linked blog post doesn't even mention the topic. It simply describes how to use the
Pandasbased data feeds can also be extended. See here Community - Pandas DataFeed Example
Thanks for the clarification. I had a few misleading conceptual ideas about backtrader but the reference cleared things up.