Class: Quant::Indicators::Pivots::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
21
22
23
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 21
def [](band)
bands[band]
end
|
#[]=(band, value) ⇒ Object
25
26
27
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 25
def []=(band, value)
bands[band] = value
end
|
#bands ⇒ Object
17
18
19
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 17
def bands
@bands ||= { 0 => input }
end
|
#key?(band) ⇒ Boolean
29
30
31
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 29
def key?(band)
bands.key?(band)
end
|
#midpoint ⇒ Object
Also known as:
h0, l0
33
34
35
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 33
def midpoint
bands[0]
end
|
#midpoint=(value) ⇒ Object
Also known as:
h0=, l0=
39
40
41
|
# File 'lib/quant/indicators/pivots/pivot.rb', line 39
def midpoint=(value)
bands[0] = value
end
|