Class: IB::Datatypes::Bar
- Inherits:
-
AbstractDatum
- Object
- AbstractDatum
- IB::Datatypes::Bar
- Defined in:
- lib/ib-ruby/datatypes.rb
Overview
This is used within HistoricData messages. Instantiate with a Hash of attributes, to be auto-set via initialize in AbstractDatum.
Instance Attribute Summary collapse
-
#close ⇒ Object
Returns the value of attribute close.
-
#date ⇒ Object
Returns the value of attribute date.
-
#has_gaps ⇒ Object
Returns the value of attribute has_gaps.
-
#high ⇒ Object
Returns the value of attribute high.
-
#low ⇒ Object
Returns the value of attribute low.
-
#open ⇒ Object
Returns the value of attribute open.
-
#volume ⇒ Object
Returns the value of attribute volume.
-
#wap ⇒ Object
Returns the value of attribute wap.
Instance Method Summary collapse
Methods inherited from AbstractDatum
Constructor Details
This class inherits a constructor from IB::Datatypes::AbstractDatum
Instance Attribute Details
#close ⇒ Object
Returns the value of attribute close.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def close @close end |
#date ⇒ Object
Returns the value of attribute date.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def date @date end |
#has_gaps ⇒ Object
Returns the value of attribute has_gaps.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def has_gaps @has_gaps end |
#high ⇒ Object
Returns the value of attribute high.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def high @high end |
#low ⇒ Object
Returns the value of attribute low.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def low @low end |
#open ⇒ Object
Returns the value of attribute open.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def open @open end |
#volume ⇒ Object
Returns the value of attribute volume.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def volume @volume end |
#wap ⇒ Object
Returns the value of attribute wap.
56 57 58 |
# File 'lib/ib-ruby/datatypes.rb', line 56 def wap @wap end |
Instance Method Details
#to_s ⇒ Object
58 59 60 |
# File 'lib/ib-ruby/datatypes.rb', line 58 def to_s "<Bar: #{@date}; OHLC: #{@open.to_digits}, #{@high.to_digits}, #{@low.to_digits}, #{@close.to_digits}; volume: #{@volume}; wap: #{@wap.to_digits}; has_gaps: #{@has_gaps}>" end |