For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
extending bt.feeds.PandasData
-
I surrender!
I am reading the data from pd.read_sql and all is well and i can run a "generic" strategy
BUT
no matter how many different ways i've tried, I can't figure out how to include the "int1", "int2", etc. columns so that i can call them like ohlc values into the strategy.what and where do i put it?
please? -
Hello,
Here is how I do that :
-
class custom_data_loader(btfeeds.PandasData): lines = ("signal","prediction",) params = (("signal", -1),("prediction", -1)) datafields = btfeeds.PandasData.datafields + (["prediction", "signal",])
Basically, I use regular PandasData.datafields and add the columns I want
Hope it helps
-
@toinou222 said in extending bt.feeds.PandasData:
class custom_data_loader(btfeeds.PandasData):
lines = ("signal","prediction",)
params = (("signal", -1),("prediction", -1))
datafields = btfeeds.PandasData.datafields + (["prediction", "signal",])thanks, i'll try that out