Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. prnvat8197
    3. Best
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 8
    • Best 3
    • Groups 0

    Best posts made by prnvat8197

    • RE: How to work with 15min ticks and resample it to 1h data

      @prnvat8197 Aah, finally read the documentation thoroughly and did some tickering around, the Generic csv data is required as input

      data = btfeeds.GenericCSVData(
          dataname=datapath,
          fromdate=datetime.datetime(2021, 7, 1),
          todate=datetime.datetime(2021, 7, 16),
          nullvalue=0.0,
          dtformat=('%Y-%m-%d %H:%M:%S'), 
          timeframe = bt.TimeFrame.Minutes, 
          compression = 15,
          Datetime=0,
          High=2,
          Low=3,
          Open=1,
          Close=4,
          Volume=7,
          Adj_Close=6)
      
      

      Thanks to everyone who replied to this thread! Really appreciate the community :D

      posted in General Code/Help
      prnvat8197
      prnvat8197
    • RE: How to work with 15min ticks and resample it to 1h data

      @vladisld Its just a space. Can you share a sample csv/txt file in the correct format, I can try running my code on it and format my data based on that. Thanks!

      posted in General Code/Help
      prnvat8197
      prnvat8197
    • RE: How to work with 15min ticks and resample it to 1h data

      @lixiaomai001 Nope :(
      Can you try running on your machine maybe? I'm really stuck with this basic step for a while

      posted in General Code/Help
      prnvat8197
      prnvat8197
    • 1 / 1