Re: Looping the Historical ticks request
yes thank you! 
toggle quoted message
Show quoted text
Hi,
It's done so: start with one call
? ? ?self.reqHistoricalData(self.hisID, self.contract, self.lastxDay, "1800 S", "1 secs", BID_TYPE, 0, 1, False, [])
? ? ?def historicalData(self, reqId, bar): ? ? ? ? ?# do your stuff Here come the magic ###################
? ? def historicalDataEnd(self, reqId: int, start: str, end: str): ? ? # once the data ends, you issue a new request, after altering the time? ? ? ?self.historicDate += datetime.timedelta(minutes=30) ? ? ?self.reqHistoricalData(self.hisID, self.contract, self.historicDate?, "1800 S", "1 secs", BID_TYPE, 0, 1, False, [])
Hope this helps
|