lib/models/ib/bar.rb in ib-api-972.2 vs lib/models/ib/bar.rb in ib-api-972.3
- old
+ new
@@ -20,10 +20,10 @@
# :has_gaps => :bool # Whether or not there are gaps in the data. ## omitted since ServerVersion 124
validates_numericality_of :open, :high, :low, :close, :volume
def to_human
- "<Bar: #{time} wap #{wap} OHLC #{open} #{high} #{low} #{close} " +
+ "<Bar: #{time.strftime("(%d.%m.%y)%X")} wap #{wap.round(3)} OHLC #{open} #{high} #{low} #{close} " +
(trades ? "trades #{trades}" : "") + " vol #{volume}>"
end
alias to_s to_human
end # class Bar