Class: IbRubyProxy::Client::Ib::TickAttribBidAsk

Inherits:
Struct
  • Object
show all
Defined in:
lib/ib_ruby_proxy/client/ib/tick_attrib_bid_ask.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bid_past_low: false, ask_past_high: false) ⇒ TickAttribBidAsk

Returns a new instance of TickAttribBidAsk.



9
10
11
12
# File 'lib/ib_ruby_proxy/client/ib/tick_attrib_bid_ask.rb', line 9

def initialize(bid_past_low: false, ask_past_high: false)
  self.bid_past_low = bid_past_low
  self.ask_past_high = ask_past_high
end

Instance Attribute Details

#ask_past_highObject

Returns the value of attribute ask_past_high

Returns:

  • (Object)

    the current value of ask_past_high



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/tick_attrib_bid_ask.rb', line 8

def ask_past_high
  @ask_past_high
end

#bid_past_lowObject

Returns the value of attribute bid_past_low

Returns:

  • (Object)

    the current value of bid_past_low



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/tick_attrib_bid_ask.rb', line 8

def bid_past_low
  @bid_past_low
end

Instance Method Details

#to_ibObject



14
15
16
17
18
19
20
# File 'lib/ib_ruby_proxy/client/ib/tick_attrib_bid_ask.rb', line 14

def to_ib
  ib_object = Java::ComIbClient::TickAttribBidAsk.new
  ib_object.bidPastLow(bid_past_low).to_java
  ib_object.askPastHigh(ask_past_high).to_java

  ib_object
end