Module: IB::Pegged2Market
- 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
.aliases ⇒ Object
56
57
58
|
# File 'lib/ib/order_prototypes/pegged.rb', line 56
def aliases
Limit.aliases.merge aux_price: :market_offset
end
|
.defaults ⇒ Object
52
53
54
|
# File 'lib/ib/order_prototypes/pegged.rb', line 52
def defaults
super.merge order_type: 'PEG MKT' , tif: :day
end
|
.optional ⇒ Object
64
65
66
|
# File 'lib/ib/order_prototypes/pegged.rb', line 64
def optional
super
end
|
.requirements ⇒ Object
60
61
62
|
# File 'lib/ib/order_prototypes/pegged.rb', line 60
def requirements
super.merge aux_price: :decimal
end
|
.summary ⇒ Object
68
69
70
71
72
73
74
75
76
77
78
79
|
# File 'lib/ib/order_prototypes/pegged.rb', line 68
def summary
<<-HERE
A pegged-to-market order is designed to maintain a purchase price relative to the
national best offer (NBO) or a sale price relative to the national best bid (NBB).
Depending on the width of the quote, this order may be passive or aggressive.
The trader creates the order by entering a limit price which defines the worst limit
price that they are willing to accept.
Next, the trader enters an offset amount which computes the active limit price as follows:
Sell order price = Bid price + offset amount
Buy order price = Ask price - offset amount
HERE
end
|