lib/ib-ruby/models/order.rb in ib-ruby-0.4.20 vs lib/ib-ruby/models/order.rb in ib-ruby-0.4.22

- old
+ new

@@ -226,10 +226,12 @@ @designated_location = '' @exempt_code = -1 @delta_neutral_order_type = '' @what_if = false @not_held = false + @algo_strategy = '' + @algo_params = [] # TODO: Initialize with nil instead of Max_Value, or change # Order sending code in IB::Messages::Outgoing::PlaceOrder #@min_quantity = Max_Value #@percent_offset = Max_Value # -"- @@ -253,9 +255,19 @@ #@reference_price_type = Max_Value # -"- #@reference_price_type = Max_Value # -"- #@reference_price_type = Max_Value # -"- super opts + end + + def serialize_algo(*args) + if algo_strategy.empty? || algo_strategy.nil? + [''] + else + [algo_strategy, + algo_params.size, + algo_params.to_a] + end end end # class Order end # module Models end # module IB