Support Board
Date/Time: Fri, 31 Jan 2025 19:02:54 +0000
Post From: Order for different symbol - supported for IB with Equity options?
[2019-05-14 19:06:28] |
User177773 - Posts: 4 |
I have not been successful in placing orders for different symbols in using IB with equity options. Is this supported by SC? If I execute code with partial snippet below, it works for different symbols like ETFs: chart with SPY symbol and trade rules applied, executing trade on QQQ, but if I instead use option symbol instead of QQQ (see below), it does not work. Is this a known limitation or am I doing something wrong? Thanks! if (TradingAllowed && sc.CrossOver(Subgraph1Reference, Subgraph2Reference) == CROSS_FROM_BOTTOM) { // mark the crossover on the chart Subgraph_BuyEntry[sc.Index] = sc.Low[sc.Index]; // Create a market order and enter long. s_SCNewOrder NewOrder; NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_MARKET; NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED; NewOrder.Symbol = "SPY-OPT-20190515-285-C-SMART-100-USD"; //NewOrder.Symbol = "SPY 190515C00285000"; //NewOrder.Symbol = "QQQ"; //sc.BuyEntry(NewOrder); sc.BuyOrder(NewOrder); |