Class: TechnicalAnalysis::IchimokuValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::IchimokuValue
- Defined in:
- lib/technical_analysis/indicators/ichimoku.rb
Overview
The value class to be returned by calculations
Instance Attribute Summary collapse
-
#chikou_span ⇒ Float
The chikou_span calculation value.
-
#date_time ⇒ String
The date_time of the obversation as it was provided.
-
#kijun_sen ⇒ Float
The kijun_sen calculation value.
-
#senkou_span_a ⇒ Float
The senkou_span_a calculation value.
-
#senkou_span_b ⇒ Float
The senkou_span_b calculation value.
-
#tenkan_sen ⇒ Float
The tenkan_sen calculation value.
Instance Method Summary collapse
-
#initialize(date_time: nil, tenkan_sen: nil, kijun_sen: nil, senkou_span_a: nil, senkou_span_b: nil, chikou_span: nil) ⇒ IchimokuValue
constructor
A new instance of IchimokuValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, tenkan_sen: nil, kijun_sen: nil, senkou_span_a: nil, senkou_span_b: nil, chikou_span: nil) ⇒ IchimokuValue
Returns a new instance of IchimokuValue.
157 158 159 160 161 162 163 164 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 157 def initialize(date_time: nil, tenkan_sen: nil, kijun_sen: nil, senkou_span_a: nil, senkou_span_b: nil, chikou_span: nil) @date_time = date_time @tenkan_sen = tenkan_sen @kijun_sen = kijun_sen @senkou_span_a = senkou_span_a @senkou_span_b = senkou_span_b @chikou_span = chikou_span end |
Instance Attribute Details
#chikou_span ⇒ Float
Returns the chikou_span calculation value.
155 156 157 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 155 def chikou_span @chikou_span end |
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
140 141 142 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 140 def date_time @date_time end |
#kijun_sen ⇒ Float
Returns the kijun_sen calculation value.
146 147 148 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 146 def kijun_sen @kijun_sen end |
#senkou_span_a ⇒ Float
Returns the senkou_span_a calculation value.
149 150 151 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 149 def senkou_span_a @senkou_span_a end |
#senkou_span_b ⇒ Float
Returns the senkou_span_b calculation value.
152 153 154 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 152 def senkou_span_b @senkou_span_b end |
#tenkan_sen ⇒ Float
Returns the tenkan_sen calculation value.
143 144 145 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 143 def tenkan_sen @tenkan_sen end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/technical_analysis/indicators/ichimoku.rb', line 167 def to_hash { date_time: @date_time, tenkan_sen: @tenkan_sen, kijun_sen: @kijun_sen, senkou_span_a: @senkou_span_a, senkou_span_b: @senkou_span_b, chikou_span: @chikou_span } end |