Class: Quant::Indicators::Pivots::PivotPoint
Instance Attribute Summary
#indicator, #tick
Instance Method Summary
collapse
#initialize, #initialize_data_points, #oc2
Methods included from Attributes
deregister, included, register, registry
Instance Method Details
#[](band) ⇒ Object
19
20
21
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 19
def [](band)
bands[band]
end
|
#[]=(band, value) ⇒ Object
23
24
25
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 23
def []=(band, value)
bands[band] = value
end
|
#bands ⇒ Object
15
16
17
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 15
def bands
@bands ||= { 0 => input }
end
|
#key?(band) ⇒ Boolean
27
28
29
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 27
def key?(band)
bands.key?(band)
end
|
#midpoint ⇒ Object
Also known as:
h0, l0
31
32
33
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 31
def midpoint
bands[0]
end
|
#midpoint=(value) ⇒ Object
Also known as:
h0=, l0=
37
38
39
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 37
def midpoint=(value)
bands[0] = value
end
|