Class: IB::Models::Bar
Overview
This is a single data point delivered by HistoricData messages. Instantiate with a Hash of attributes, to be auto-set via initialize in Model.
Constant Summary
Constants inherited from Model
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#to_s ⇒ Object
int: When TRADES data history is returned, represents number of trades that occurred during the time period the bar covers.
Methods inherited from Model
Methods included from ModelProperties
#define_property, #define_property_methods, #prop
Constructor Details
This class inherits a constructor from IB::Models::Model
Instance Method Details
#to_s ⇒ Object
int: When TRADES data history is returned, represents number of trades that occurred during the time period the bar covers
20 21 22 23 |
# File 'lib/ib-ruby/models/bar.rb', line 20 def to_s "<Bar #{time}: wap: #{wap}, OHLC: #{open}, #{high}, #{low}, #{close}, " + (trades ? "trades: #{trades}," : "") + " vol: #{volume}, gaps? #{has_gaps}>" end |