docs: def _get_trendline(self,date0=None,date1=None,on=None,kind='trend',to_strfmt='%Y-%m-%d',from_strfmt='%d%b%y',**kwargs):
  		"""
  		Returns a trendline (line), support or resistance
  
  		Parameters:
  			date0 : string
  				Trendline starting date			
  			date1 :  string
  				Trendline end date
  			on : string
  				Indicate the data series in which the 
  				trendline should be based.
  					'close'
  					'high'
  					'low'
  					'open'			
  			kind : string
  				Defines de kind of trendline
  					'trend'
  					'resistance'
  					'support'			
  			mode : string
  				Defines how the support/resistance will 
  				be drawn
  					'starttoened' : (x0,x1)
  					'fromstart' : (x0,date0)
  					'toend'	: (date0,x1)
  			text : string
  				If passed, then an annotation will be added 
  				to the trendline (at mid point)
  			from_strfmt : string
  				Defines the date formating in which 
  				date0 and date1 are stated. 
  				default: '%d%b%y'				
  			to_strfmt : string
  				Defines the date formatting 
  				to which it should be converted. 
  				This should match the same format as the timeseries index. 
  				default : '%Y-%m-%d'		
  		"""
  		ann_values=copy.deepcopy(get_annotation_kwargs())
  		ann_values.extend(['x','y'])
  		ann_kwargs=utils.check_kwargs(kwargs,ann_values,{},clean_origin=True)
  		def position(d0,d1):
  			return d0+(d1-d0)/2
  
  		date0=kwargs.pop('date',date0)    
  		date0=date_tools.stringToString(date0,from_strfmt,to_strfmt) if '-' not in date0 else date0
  		
  		if kind=='trend':
  			date1=date_tools.stringToString(date1,from_strfmt,to_strfmt) if '-' not in date1 else date1
  			on='close' if not on else on
  			df=pd.DataFrame(self.df[self._d[on]])
  			y0=kwargs.get('y0',df.ix[date0].values[0])
  			y1=kwargs.get('y1',df.ix[date1].values[0])
  			
  		
  		if kind in ('support','resistance'):
  			mode=kwargs.pop('mode','starttoend')
  			if not on:
  				on='low' if kind=='support' else 'high'
  			df=pd.DataFrame(self.df[self._d[on]])
  			y0=kwargs.get('y0',df.ix[date0].values[0])
  			y1=kwargs.get('y1',y0)
  			if mode=='starttoend':
  				date0=df.index[0]
  				date1=df.index[-1]
  			elif mode=='toend':
  				date1=df.index[-1]
  			elif mode=='fromstart':
  				date1=date0
  				date0=df.index[0]
  
  		if isinstance(date0,pd.Timestamp):
  			date0=date_tools.dateToString(date0,to_strfmt)
  		if isinstance(date1,pd.Timestamp):
  			date1=date_tools.dateToString(date1,to_strfmt)
  		d={'x0':date0,'x1':date1,'y0':y0,'y1':y1}
  		d.update(**kwargs)
  		shape=tools.get_shape(**d)        
  
  		
  		if ann_kwargs.get('text',False):
  			ann_kwargs['x']=ann_kwargs.get('x',date_tools.dateToString(position(date_tools.stringToDate(date0,to_strfmt),date_tools.stringToDate(date1,to_strfmt)),to_strfmt))
  			ann_kwargs['y']=ann_kwargs.get('y',position(shape['y0'],shape['y1']))
  		else:
  			ann_kwargs={}
  		return {'shape':shape,'annotation':ann_kwargs}