Method: Quant::Indicators::Pivots::Atr#compute_bands
- Defined in:
- lib/quant/indicators/pivots/atr.rb
#compute_bands ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/quant/indicators/pivots/atr.rb', line 26 def compute_bands ATR_SERIES.each_with_index do |ratio, index| offset = ratio * atr_value p0[index + 1] = p0.midpoint + offset p0[-index - 1] = p0.midpoint - offset end end |