Exemplo n.º 1
0
def load_pyalgotrade_daily_bars(instrument, barType, fromDateTime, toDateTime):
	ret = []
	dbBars = persistence.Bar.getBars(instrument, barType, fromDateTime, toDateTime)
	for dbBar in dbBars:
		ret.append(ds_bar_to_pyalgotrade_bar(dbBar))
	helpers.set_session_close_attributes(ret)
	return ret
Exemplo n.º 2
0
def load_pyalgotrade_daily_bars(instrument, barType, fromDateTime, toDateTime):
    ret = []
    dbBars = persistence.Bar.getBars(instrument, barType, fromDateTime,
                                     toDateTime)
    for dbBar in dbBars:
        ret.append(ds_bar_to_pyalgotrade_bar(dbBar))
    helpers.set_session_close_attributes(ret)
    return ret
Exemplo n.º 3
0
	def start(self):
		self.__started = True
		# Set session close attributes to bars.
		for instrument, bars in self.__bars.iteritems():
			helpers.set_session_close_attributes(bars)
			self.__barsLeft = max(self.__barsLeft, len(bars))
Exemplo n.º 4
0
 def start(self):
     # Set session close attributes to bars.
     for instrument, bars in self.__bars.iteritems():
         helpers.set_session_close_attributes(bars)
Exemplo n.º 5
0
 def start(self):
     # Set session close attributes to bars.
     for instrument, bars in self.__bars.iteritems():
         helpers.set_session_close_attributes(bars)
Exemplo n.º 6
0
	def start(self):
		self.__started = True
		# Set session close attributes to bars.
		for instrument, bars in self.__bars.iteritems():
			helpers.set_session_close_attributes(bars)
			self.__barsLeft = max(self.__barsLeft, len(bars))