For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Time missing from Cerebro runs
-
Hello,
I got a csv file like this:
Date,Open,High,Low,Close,Volume2019-01-01 22:00:00,1.14657,1.14972,1.1325,1.13442,203974 2019-01-02 22:00:00,1.13436,1.14114,1.13084,1.13948,249340 2019-01-03 22:00:00,1.13932,1.14193,1.13454,1.13944,206911
and settings like:
data = btfeeds.GenericCSVData( dataname='data/eurusd.csv', nullvalue=0.0, dtformat=('%Y-%m-%d %H:%M:%S'), timeframe=bt.TimeFrame.Minutes, datetime=0, time=-1, high=2, low=3, open=1, close=4, volume=5, openinterest=-1)
But time never gets shown when I run Cerebro:
Starting Portfolio Value: 1000.00 2019-01-01, Close, 1.13442 2019-01-02, Close, 1.13948 2019-01-03, Close, 1.13944
Where is my misstake?
Thanks -
My guess would be that in your script you are printing only date, but not time, therefore you don't have it printed.
cerebro
prints nothing by itself.Also your data feed seems daily.
-
@ab_trader You were right , I needed to access it like:
self.datas[0].datetime.time(0)