Class: IbRubyProxy::Client::Ib::Bar
- Inherits:
-
Struct
- Object
- Struct
- IbRubyProxy::Client::Ib::Bar
- Defined in:
- lib/ib_ruby_proxy/client/ib/bar.rb
Instance Attribute Summary collapse
-
#close ⇒ Object
Returns the value of attribute close.
-
#count ⇒ Object
Returns the value of attribute count.
-
#high ⇒ Object
Returns the value of attribute high.
-
#low ⇒ Object
Returns the value of attribute low.
-
#open ⇒ Object
Returns the value of attribute open.
-
#time ⇒ Object
Returns the value of attribute time.
-
#volume ⇒ Object
Returns the value of attribute volume.
-
#wap ⇒ Object
Returns the value of attribute wap.
Instance Method Summary collapse
-
#initialize(time: nil, open: 0, high: 0, low: 0, close: 0, volume: nil, count: 0, wap: 0) ⇒ Bar
constructor
A new instance of Bar.
- #to_ib ⇒ Object
Constructor Details
#initialize(time: nil, open: 0, high: 0, low: 0, close: 0, volume: nil, count: 0, wap: 0) ⇒ Bar
Returns a new instance of Bar.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 9 def initialize(time: nil, open: 0, high: 0, low: 0, close: 0, volume: nil, count: 0, wap: 0) self.time = time self.open = open self.high = high self.low = low self.close = close self.volume = volume self.count = count self.wap = wap end |
Instance Attribute Details
#close ⇒ Object
Returns the value of attribute close
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def close @close end |
#count ⇒ Object
Returns the value of attribute count
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def count @count end |
#high ⇒ Object
Returns the value of attribute high
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def high @high end |
#low ⇒ Object
Returns the value of attribute low
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def low @low end |
#open ⇒ Object
Returns the value of attribute open
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def open @open end |
#time ⇒ Object
Returns the value of attribute time
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def time @time end |
#volume ⇒ Object
Returns the value of attribute volume
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def volume @volume end |
#wap ⇒ Object
Returns the value of attribute wap
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 8 def wap @wap end |
Instance Method Details
#to_ib ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ib_ruby_proxy/client/ib/bar.rb', line 20 def to_ib ib_object = Java::ComIbClient::Bar.new ib_object.time(time).to_java ib_object.open(open).to_java ib_object.high(high).to_java ib_object.low(low).to_java ib_object.close(close).to_java ib_object.volume(volume).to_java ib_object.count(count).to_java ib_object.wap(wap).to_java ib_object end |