# indie:force_py_runner# indie:lang_version = 5from indie import indicator, format, param, plot, colorfrom indie.algorithms import SinceLowest, SinceHighest@indicator('Aroon', format=format.PRICE) # TODO: format=format.PERCENT@param.int('length', default=14, min=1)@plot.line(color=color.BLUE, title='Aroon Down')@plot.line(color=color.YELLOW, title='Aroon Up')def Main(self, length):lo_offset = SinceLowest.new(self.low, length)hi_offset = SinceHighest.new(self.high, length)down = 100 * (length - lo_offset[0]) / lengthup = 100 * (length - hi_offset[0]) / lengthreturn down, up
x
bold it 123123


Be the first to comment
Publish your first comment to unleash the wisdom of crowd.