class_docstr: Defined by J. Welles Wilder, Jr. in 1978 in his book *"New Concepts in
  Technical Trading Systems"*.
  
  Intended to measure trend strength.
  
  ADXR is the average of ADX with a value period bars ago
  
  This indicator shows the ADX and ADXR:
    - Use PlusDirectionalIndicator (PlusDI) to get +DI
    - Use MinusDirectionalIndicator (MinusDI) to get -DI
    - Use Directional Indicator (DI) to get +DI, -DI
    - Use AverageDirectionalIndex (ADX) to get ADX
    - Use DirectionalMovementIndex (DMI) to get ADX, +DI, -DI
    - Use DirectionalMovement (DM) to get ADX, ADXR, +DI, -DI
  
  Formula:
    - upmove = high - high(-1)
    - downmove = low(-1) - low
    - +dm = upmove if upmove > downmove and upmove > 0 else 0
    - -dm = downmove if downmove > upmove and downmove > 0 else 0
    - +di = 100 * MovingAverage(+dm, period) / atr(period)
    - -di = 100 * MovingAverage(-dm, period) / atr(period)
    - dx = 100 * abs(+di - -di) / (+di + -di)
    - adx = MovingAverage(dx, period)
    - adxr = (adx + adx(-period)) / 2
  
  The moving average used is the one originally defined by Wilder,
  the SmoothedMovingAverage
  
  See:
    - https://en.wikipedia.org/wiki/Average_directional_movement_index
class_docstr_tok: ["Defined","by","J.","Welles","Wilder",",","Jr.","in","1978","in","his","book","*","''","New","Concepts","in","Technical","Trading","Systems","''","*",".","Intended","to","measure","trend","strength",".","ADXR","is","the","average","of","ADX","with","a","value","period","bars","ago","This","indicator","shows","the","ADX","and","ADXR",":","-","Use","PlusDirectionalIndicator","(","PlusDI",")","to","get","+DI","-","Use","MinusDirectionalIndicator","(","MinusDI",")","to","get","-DI","-","Use","Directional","Indicator","(","DI",")","to","get","+DI",",","-DI","-","Use","AverageDirectionalIndex","(","ADX",")","to","get","ADX","-","Use","DirectionalMovementIndex","(","DMI",")","to","get","ADX",",","+DI",",","-DI","-","Use","DirectionalMovement","(","DM",")","to","get","ADX",",","ADXR",",","+DI",",","-DI","Formula",":","-","upmove","=","high","-","high","(","-1",")","-","downmove","=","low","(","-1",")","-","low","-","+dm","=","upmove","if","upmove",">","downmove","and","upmove",">","0","else","0","-","-dm","=","downmove","if","downmove",">","upmove","and","downmove",">","0","else","0","-","+di","=","100","*","MovingAverage","(","+dm",",","period",")","\/","atr","(","period",")","-","-di","=","100","*","MovingAverage","(","-dm",",","period",")","\/","atr","(","period",")","-","dx","=","100","*","abs","(","+di","-","-di",")","\/","(","+di","+","-di",")","-","adx","=","MovingAverage","(","dx",",","period",")","-","adxr","=","(","adx","+","adx","(","-period",")",")","\/","2","The","moving","average","used","is","the","one","originally","defined","by","Wilder",",","the","SmoothedMovingAverage","See",":","-","https",":","\/\/en.wikipedia.org\/wiki\/Average_directional_movement_index"]
code: def __init__(self):
      super(AverageDirectionalMovementIndexRating, self).__init__()
  
      self.lines.adxr = (self.l.adx + self.l.adx(-self.p.period)) / 2.0
  
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 1 to create a new AverageDirectionalMovementIndexRating object from inherited base classes: AverageDirectionalMovementIndex with example: obj = AverageDirectionalMovementIndexRating()