Exemple #1
0
	def chartEMA(self, n, color='red'):

		date = toDateTime(Data.getDates(self,self.interval,self.unit))
		closep = Data.getCloses(self,self.interval,self.unit)
		ema = Indicators.ema(self,closep,n)



		self.p.line(date, ema, color=color)
Exemple #2
0
	def chartSMA(self, n, color='blue'):

		
		date = toDateTime(Data.getDates(self,self.interval,self.unit))
		closep = Data.getCloses(self,self.interval,self.unit)
		sma = Indicators.sma(self,closep,n)



		self.p.line(date, sma, color=color)