Quote from syswizard:
OK Then, what's wrong with this code to submit a stop limit order:
C#/.NET API. I've included my 'test' code below, which should place a stop limit order for 1 share of EW at (43.10,43.00). (I've confirmed I CAN place this order via Laser...)
GTStock myStock = m_Stocks[sSymbol].Stock; // Already instantiated and receiving data
GTSession.GTOrder32 newOrder = new GTSession.GTOrder32();
myStock.InitOrder(newOrder);
myStock.Ask(newOrder, 1, 43.00, GTSession.MakeMMID("AUTO"));
newOrder.dwUserData = 0; // Hardcoded, just for this test
newOrder.chPriceIndicator = '4'; // Stop limit code
newOrder.dblStopLimitPrice = 43.10; // Stop price
newOrder.place = GTSession.MMID_NYSE; // EW is listed on NYSE
myStock.PlaceOrder(newOrder);
Response is "@unsupported".
I've been meaning to get back to you on this. One of these days I'l get around this, however I KNOW that this is not an error.
I believe that I got this error before, that is when I tried to put a stop order on ARCA. I found out that ARCA doesn't support STOP orders. Because of STOP/LIMIT resides on the exchange, there are some exchanges you can't do this to hence that's what your error msg says
I like yourself had a hell of a time placing orders. Do this... go to GTOrder32.h and model your orders exactly how they're doing it and read everything they write.
If I were to Guess don't use this...
myStock.Ask(newOrder, 1, 43.00, GTSession.MakeMMID("AUTO"));
I could be wrong, but this may only be for just a regular Ask.
Use the model example that they provide. That is what I did then then added on.
m_ShortOrder = m_defOrder;
m_ShortOrder.dwTimeInForce = TIF_DAY;
m_ShortOrderPrice = m_Bid - 0.12;
PlaceOrder(m_ShortOrder, 'S', m_ShortAmount,m_ShortOrderPrice, METHOD_BELZ, TIF_DAY);
m_ShortOrder.place = MMID_NYSE;
m_ShortOrder.chPriceIndicator = '2';