[][src]Function twsapi::examples::order_samples::pegged_to_market

pub fn pegged_to_market(
    action: &str,
    quantity: f64,
    market_offset: f64
) -> Order

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 Products: STK