When using the API "Command" function, how can the instrument's Exchange be specified?
From https://ninjatrader.com/support/help...functions.htm:
int Command(string command, string account, string instrument, string action, int quantity, string o rderType, double limitPrice, double stopPrice,
string timeInForce, string oco, string orderId, s tring strategy, string strategyId)
Can the exchange be specified as a prefix to the "instrument" parameter? Ex: NASDAQ.Open or NASDAQ:Open or NASDAQ/Open
("Open", the symbol for Opendoor Technologies Inc, is a problematic for IB through NT not because it is on different exchanges but because it collides with a reserved keyword.)
(I haven't tried the prefixes shown above to see if any will work because I wanted to get a complete definitive answer to the question.)
Here is the only relevant info I could find at IB [https://interactivebrokers.github.io...ontracts.html] :
Stocks
- Contract contract = new Contract();
contract.Symbol = "IBKR";
contract.SecType = "STK";
contract.Currency = "USD";
//In the API side, NASDAQ is always defined as ISLAND in the exchange field
contract.Exchange = "ISLAND";
- Contract contract = new Contract();
contract.Symbol = "MSFT";
contract.SecType = "STK";
contract.Currency = "USD";
contract.Exchange = "SMART";
//Specify the Primary Exchange attribute to avoid contract ambiguity
// (there is an ambiguity because there is also a MSFT contract with primary exchange = "AEB")
contract.PrimaryExch = "ISLAND";
Comment