sellLimit()
Previous Top Next
sellLimit( symbol, quantity, limit [, route] [, expiry] )
Submit a limit order to broker.
Parameters
symbol |
the symbol for which to initiate the trade |
quantity |
the number of shares/contracts |
limit |
the limit price |
route |
optional. the route or exchange for the trade (broker specific) |
expiry |
optional. expiration for the order: SB_DAY SB_GTC SB_IOC |
Usage
sellLimit( "IDC", 100, 15.00 );
sellLimit( getSymbol(), 200, 100.00, null, SB_GTC );
Interactive Broker Examples
var myLimit = getMostRecentTrade().toFixed(4);
sellLimit(getSymbol(), 100, myLimit); // Equities
sellLimit(getSymbol(), 1, myLimit, "GLOBEX", "200506"); // Futures