@adamb032 I solved the issue, the data needs to have at least an open and close value in it for the simulated broker to work, once i made an open/high/low/close dataframe of all close values it works as expected.
@vladisld perhaps I'm not pretty correct but after loading 2 timeframes i see correct data for my indicator when I debug each step and I see an array with correct calculations but it is zero because when i add second timeframe indicator starts to recalculate every time when next starts and all previous data are Nan. SO my question is how to call proper calculations from my indicator and not allow it to recalculate?
@carameldragon I have the same confusion.I guess we are mislead by the sample in documnet.
when in some old version, the order.executed.value of sellorder is depended on sell price ;now, it is depended on buy price
@tianjixuetu I quit this way to speed up. no matter can this way validate . I will find a new way to speed the backtest speed.maybe use numpylines,in the python,when deal with huge number,numpy maybe a good choice.
IBStore is using the IBPy library for communication with Interactive Brokers. This library seems to be thread safe theoretically. However I'm not sure that sharing the IBStore instance between multiple Cerebro instances is supported and/or tested.
For example, I'm not sure how the notification mechanism will work, when multiple instances of the Cerebro engines will have to be somehow connected to the same instance of the IBStore.
@walt This behavior is by design although I would agree is somewhat unexpected.
During first few prenext calls only the first data datas is actually iterated ( since the second data datas is still not started). Getting the 'current' value of the datas doesn't make sense at this point - however the current implementation of GenericCSVData will just return the latest loaded bar value. Other data feed classes may just throw exception for example.
To be on the safe side I'd suggest to just test that the data was actually iterated before trying to access the current bar:
px2 = self.datas.close
the len(self.datas) will be zero unless the first bar of the data will be iterated.