Module: IB::Pegged2Primary

Extended by:
OrderPrototype
Defined in:
lib/ib/order_prototypes/pegged.rb

Class Method Summary collapse

Methods included from OrderPrototype

aliases, alternative_parameters, defaults, optional, order, parameters, requirements

Class Method Details

.aliasesObject



10
11
12
# File 'lib/ib/order_prototypes/pegged.rb', line 10

def aliases
	super.merge  limit_price: :price_cap, aux_price: :offset_amount
end

.defaultsObject



6
7
8
# File 'lib/ib/order_prototypes/pegged.rb', line 6

def defaults
	  super.merge order_type: 'REL' , tif: :day
end

.optionalObject



19
20
21
# File 'lib/ib/order_prototypes/pegged.rb', line 19

def optional
	 super
end

.requirementsObject



14
15
16
17
# File 'lib/ib/order_prototypes/pegged.rb', line 14

def requirements
	super.merge aux_price: 'also aliased as :offset_amount',
limit_price: 'aliased as :price_cap'
end

.summaryObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ib/order_prototypes/pegged.rb', line 23

def summary
	<<-HERE
	Relative (a.k.a. Pegged-to-Primary) orders provide a means for traders
	to seek a more aggressive price than the National Best Bid and Offer
	(NBBO). By acting as liquidity providers, and placing more aggressive
	bids and offers than the current best bids and offers, traders increase
	their odds of filling their order. Quotes are automatically adjusted as
	the markets move, to remain aggressive. For a buy order, your bid is
	pegged to the NBB by a more aggressive offset, and if the NBB moves up,
	your bid will also move up. If the NBB moves down, there will be no
	adjustment because your bid will become even more aggressive and
	execute. For sales, your offer is pegged to the NBO by a more
	aggressive offset, and if the NBO moves down, your offer will also move
	down. If the NBO moves up, there will be no adjustment because your
	offer will become more aggressive and execute. In addition to the
	offset, you can define an absolute cap, which works like a limit price,
	and will prevent your order from being executed above or below a
	specified level. 
	Supported Products:  Stocks, Options and Futures
	------ 
	not available on paper trading 
	HERE
end