Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    How to query data from InfluxDB into Backtrader?

    General Discussion
    1
    1
    104
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bozz srinikorn
      Bozz srinikorn last edited by

      As the topic, I would like to import data from influxDB into my Strategy, In backtrader.
      And i saw the influxfeed.py, 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()
      cerebro.addstrategy(Strategy)
      data = InfluxDB()
      cerebro.adddata(data)
      

      Anyone have tutorial for this?

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
      $(document).ready(function () { app.coldLoad(); }); }