qtpylib
qtpylib copied to clipboard
[BUG] on_bar() event always produces a bar where O=H=L=C always (all ohlc values are same)
I just ran the strategy example with on_bar event, just to print the bar. It always produces each of OHLC value same for every bar
Pandas(Index=Timestamp('2019-05-30 06:22:00+0000', tz='UTC'), asset_class='STK', close=2150.4, high=2150.4, low=2150.4, open=2150.4, symbol='TCS', symbol_group='TCS', volume=5, signal=nan) Pandas(Index=Timestamp('2019-05-30 06:23:00+0000', tz='UTC'), asset_class='STK', close=2134.55, high=2134.55, low=2134.55, open=2134.55, symbol='TCS', symbol_group='TCS', volume=772, signal=nan)
Hello, I get the same bug. It should be 1 Min bars , right ?
150 | 2020-05-08 12:28:00 | 2 | 9174.5 | 9174.5 | 9174.5 | 9174.5 | 2 151 | 2020-05-08 12:28:00 | 1 | 2902.5 | 2902.5 | 2902.5 | 2902.5 | 20 148 | 2020-05-08 12:27:00 | 1 | 2904 | 2904 | 2904 | 2904 | 4 149 | 2020-05-08 12:27:00 | 2 | 9180.5 | 9180.5 | 9180.5 | 9180.5 | 1 146 | 2020-05-08 12:26:00 | 1 | 2904.25 | 2904.25 | 2904.25 | 2904.25 | 11 147 | 2020-05-08 12:26:00 | 2 | 9179.5 | 9179.5 | 9179.5 | 9179.5 | 1 144 | 2020-05-08 12:25:00 | 2 | 9179.25 | 9179.25 | 9179.25 | 9179.25 | 1
Any ideas on how to correct that ?
Do we have to downgrade pandas from 1.0.3 to 0.25 or 0.22 ?
I got the same error today when i was trying to run it.