Class: IB::Bar
Overview
This is a single data point delivered by HistoricData or RealTimeBar messages. Instantiate with a Hash of attributes, to be auto-set via initialize in Model.
Instance Method Summary collapse
- #to_human ⇒ Object (also: #to_s)
Methods included from BaseProperties
#==, #as_table, #content_attributes, #default_attributes, #invariant_attributes, #set_attribute_defaults, #table_header, #table_row, #update_missing
Instance Method Details
#to_human ⇒ Object Also known as: to_s
24 25 26 27 |
# File 'lib/models/ib/bar.rb', line 24 def to_human "<Bar: #{time.strftime("(%d.%m.%y)%X")} wap #{wap.round(3)} OHLC #{open} #{high} #{low} #{close} " + (trades ? "trades #{trades}" : "") + " vol #{volume}>" end |