Module: IB::Pegged2Benchmark
- Extended by:
- OrderPrototype
- Defined in:
- lib/ib/order_prototypes/pegged.rb
Class Method Summary
collapse
aliases, alternative_parameters, defaults, optional, order, parameters, requirements
Class Method Details
.defaults ⇒ Object
133
134
135
|
# File 'lib/ib/order_prototypes/pegged.rb', line 133
def defaults
super.merge order_type: 'PEG BENCH'
end
|
.optional ⇒ Object
157
158
159
160
161
|
# File 'lib/ib/order_prototypes/pegged.rb', line 157
def optional
super.merge stock_ref_price: 'starting price of the reference contract',
stock_range_lower: 'Lowest acceptable Price of the reference contract',
stock_range_upper: 'Highest accepable Price of the reference contract'
end
|
.requirements ⇒ Object
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
# File 'lib/ib/order_prototypes/pegged.rb', line 141
def requirements
super.merge total_quantity: :decimal,
delta: 'required Delta of the Option',
starting_price: 'initial Limit-Price for the Option' ,
is_pegged_change_amount_decrease: 'increase(true) / decrease(false) Price',
pegged_change_amount: ' (increase/decrceas) by... (and likewise for price moving in opposite direction)',
reference_change_amount: ' ... whenever there is a price change of...',
reference_contract_id: 'the conid of the reference contract',
reference_exchange: "Exchange of the reference contract"
end
|
.summary ⇒ Object
163
164
165
166
167
168
169
170
|
# File 'lib/ib/order_prototypes/pegged.rb', line 163
def summary
<<-HERE
The Pegged to Benchmark order is similar to the Pegged to Stock order for options,
except that the Pegged to Benchmark allows you to specify any asset type as the
reference (benchmark) contract for a stock or option order. Both the primary and
reference contracts must use the same currency.
HERE
end
|