Discovered issue with sending option order with symbol name passed as reference .
Procedure SellOption1() works fine, result in IBController window shown with blue arrow.
Procedure SellOption2(&Symbol) caused an error, result in IBController window shown with red arrow.
procedure doTradeIB(inTicker)
{
ibc = GetTradingInterface("IB");
ibAttributes = "outsideRTH";
ibTickSize = 100;
inLots = 1;
inPrice = 20.5;
inOpr = "SELL";
brokerAccount = "UXXXXXXX";
lOrderId = ibc.PlaceOrder(inTicker, inOpr, inLots, "LMT", inPrice, 0, "GTC", True, ibTickSize, ibAttributes, "", "", "", "",brokerAccount);
}
procedure SellOption1()
{
inTicker = "AAPL 211119C00130000-SMART-OPT";
doTradeIB(inTicker);
}
procedure SellOption2(inTicker)
{
inTicker = "AAPL 211119C00130000-SMART-OPT";
doTradeIB(inTicker);
}
SellOption1(); // no issue
SellOption2(&inTicker); // Error 321. Error validation request.-'bN': cause - The symbol or the local-symbol or the security id must be entered