class_docstr: This class serves as the root base class for all "Directional Movement
  System" related indicators, given that the calculations are first common
  and then derived from the common calculations.
  
  It can calculate the +DI and -DI values (using kwargs as the hint as to
  what to calculate) but doesn't assign them to lines. This is left for
  sublcases of this class.
class_docstr_tok: ["This","class","serves","as","the","root","base","class","for","all","``","Directional","Movement","System","''","related","indicators",",","given","that","the","calculations","are","first","common","and","then","derived","from","the","common","calculations",".","It","can","calculate","the","+DI","and","-DI","values","(","using","kwargs","as","the","hint","as","to","what","to","calculate",")","but","does","n't","assign","them","to","lines",".","This","is","left","for","sublcases","of","this","class","."]
code: def __init__(self, _plus=True, _minus=True):
      atr = ATR(self.data, period=self.p.period, movav=self.p.movav)
  
      upmove = self.data.high - self.data.high(-1)
      downmove = self.data.low(-1) - self.data.low
  
      if _plus:
          plus = And(upmove > downmove, upmove > 0.0)
          plusDM = If(plus, upmove, 0.0)
          plusDMav = self.p.movav(plusDM, period=self.p.period)
  
          self.DIplus = 100.0 * plusDMav / atr
  
      if _minus:
          minus = And(downmove > upmove, downmove > 0.0)
          minusDM = If(minus, downmove, 0.0)
          minusDMav = self.p.movav(minusDM, period=self.p.period)
  
          self.DIminus = 100.0 * minusDMav / atr
  
      super(_DirectionalIndicator, self).__init__()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from .None import Indicator, And, If, MovAv, ATR
label_desc: Use image node_id 2 to create a new _DirectionalIndicator object from inherited base classes: Indicator with example: obj = _DirectionalIndicator(_plus, _minus)