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

How to query data from InfluxDB into Backtrader?

  • As the topic, I would like to import data from influxDB into my Strategy, In backtrader.
    And i saw the, I don't understand how to use that class with my Strategy,
    The import data step, It's should have ETL or config right ?
    No idea how to work with Influx.

    class InfluxDB(btfeeds.DataBase):
    params = (
        ('host', 'localhost'),
        ('port', '8086'),
        ('username', None),
        ('password', None),
        ('database', 'backtest'),
        ('timeframe', bt.TimeFrame.Days),
        ('startdate', None),
        ('high', 'high'),
        ('low', 'low'),
        ('open', 'open'),
        ('close', 'close'),
        ('volume', 'volume'),
        ('ointerest', 'oi'),
    if __name__ == "__main__":
    cerebro = bt.Cerebro()
    data = InfluxDB()

    Anyone have tutorial for this?

Log in to reply