Class: IB::Bar

Inherits:
Model show all
Includes:
BaseProperties
Defined in:
lib/models/ib/bar.rb

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

Methods included from BaseProperties

#==, #content_attributes, #default_attributes, #invariant_attributes, #set_attribute_defaults, #update_missing

Instance Method Details

#to_humanObject Also known as: to_s



24
25
26
27
# File 'lib/models/ib/bar.rb', line 24

def to_human
  "<Bar: #{time} wap #{wap} OHLC #{open} #{high} #{low} #{close} " +
    (trades ? "trades #{trades}" : "") + " vol #{volume}>"
end