docstr: Adds a resistance line to the QuantFigure
  
  Parameters:
          date0 : string
                  The resistance line will be drawn at the 'y' level 
                  value that corresponds to this date. 
          on : string
                  Indicate the data series in which the 
                  resistance should be based.
                          'close'
                          'high'
                          'low'
                          'open'
          mode : string
                  Defines how the support/resistance will 
                  be drawn
                          'starttoened' : (x0,x1)
                          'fromstart' : (x0,date)
                          'toend' : (date,x1)
          text : string
                  If passed, then an annotation will be added 
                  to the resistance (at mid point)
  
  kwargs: 
          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'            
docstr_tok: ["Adds","a","resistance","line","to","the","QuantFigure","Parameters",":","date0",":","string","The","resistance","line","will","be","drawn","at","the","'","y","'","level","value","that","corresponds","to","this","date",".","on",":","string","Indicate","the","data","series","in","which","the","resistance","should","be","based",".","'close'","'high'","'low'","'open'","mode",":","string","Defines","how","the","support\/resistance","will","be","drawn","'starttoened","'",":","(","x0",",","x1",")","'fromstart","'",":","(","x0",",","date",")","'toend","'",":","(","date",",","x1",")","text",":","string","If","passed",",","then","an","annotation","will","be","added","to","the","resistance","(","at","mid","point",")","kwargs",":","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","'"]
code: def add_resistance(
      self, date, on="high", mode="starttoend", text=None, **kwargs
  ):
      """
      Adds a resistance line to the QuantFigure
  
      Parameters:
              date0 : string
                      The resistance line will be drawn at the 'y' level
                      value that corresponds to this date.
              on : string
                      Indicate the data series in which the
                      resistance should be based.
                              'close'
                              'high'
                              'low'
                              'open'
              mode : string
                      Defines how the support/resistance will
                      be drawn
                              'starttoened' : (x0,x1)
                              'fromstart' : (x0,date)
                              'toend' : (date,x1)
              text : string
                      If passed, then an annotation will be added
                      to the resistance (at mid point)
  
      kwargs:
              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'
      """
      d = {
          "kind": "resistance",
          "date": date,
          "mode": mode,
          "on": on,
          "text": text,
      }
      d.update(**kwargs)
      self.trendlines.append(d)
  
imports: from __future__ import absolute_import
  import plotly.graph_objs
  import json
  import copy
  import pandas
  from .plotlytools import iplot
  from .None import tools
  from .None import ta
  from .None import utils
  from .None import colors
  from .None import auth
  from .None import date_tools
label_desc: Use image node_id 12 for calling the QuantFig obj's underlying member method code with example usage: obj.add_resistance(date, on, mode, text) without return types