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