Support Board
Date/Time: Mon, 13 Jan 2025 07:30:43 +0000
Post From: Trading - error w/ Issuing an order
[2017-04-06 06:47:29] |
Sierra Chart - Max - Posts: 5778 |
Sent by Email: I have developed a studt for algo-trading and now in the phase where i'm issuing trading orders (th ebroker is IB) I have created a ticket at the support board but sorrily asked not to bother you any more w/ this issue putting aside the very unpolite attitude ... today i have deeply investigated the issue w/ the assistance of Interactive Brokers support reps It came out that may be there is a problem/bug w/ Sierra's code and i'll explain 1. the following is the NewOrder parameters for the buy/sell orders pstn_order.OrderQuantity = MINI_SLOT_VALUE; // 10,000 pstn_order.OrderType = SCT_ORDERTYPE_MARKET; pstn_order.TimeInForce = SCT_TIF_GTC; pstn_order.Symbol = "EUR.USD-CASH-IDEALPRO"; // as defined fro IB symbols 2. w/ the assistnce of IB support - TWS was configured to keep very detailed information in it log file 3. Sierrachart was executing my study that sent trading orders to TWS next will see the information gathered from Seirra and TWS to understand the problem 4. the following info gathered from TWS log file pls notice the information provided by in red bold text 1. the time 2. the ID 3. The Symbol - which is OK 4. The Type which is wrong (=STK) - but should have been CASH 5. The Exchange is wrong (=SMART) - but should have been IDEALPRO 6. The amount is correct 10000 7. An error has been sent back to Sierra 2017-04-05 17:09:33.547 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:INFO] Handling incoming PlaceOrder(3) message. 2017-04-05 17:09:33.547 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Started reading message: 2017-04-05 17:09:33.548 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Finished reading message: 2017-04-05 17:09:33.548 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] PlaceOrder(3)::[version=40,ID=198,reqDesc=Symbol=EURUSD Type=STK Expiry=null Strike=0.0 Put/Call=? Exchange=SMART CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=NULL SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,transmit=true,combo=null] 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] [40;198;0;EURUSD;STK;null;0;2;null;SMART;null;USD;null;null;NULL;null;1;10000;MKT;Default;1.7976931348623157E308;Default;1.7976931348623157E308;1.7976931348623157E308;1.7976931348623157E308;1;DU647692.;true;0;null;ExpireDateTime [null];Reduce on Fill without Block;null;false;null;null;None;1.7976931348623157E308;1.7976931348623157E308;1.7976931348623157E308;SweepToFill=false;BlockOrder=false;Volatility=1.7976931348623157E308;OutsideRth=true;ContinuousUpdate=false;StartingPrice=1.7976931348623157E308;TriggerMethod=Default;NotHeld=false;OptionAcctAttrib=c;Hidden=false;DeltaNeutralAuxPrice=1.7976931348623157E308;OpenCloseAttrib=O;StockRefPrice=1.7976931348623157E308;DeltaNeutralOrderType=None;AllOrNone=false;ETradeOnly=true;VolatilityType=None;MinimumQuantity=2147483647;NbboPriceCap=1.7976931348623157E308;StockRangeLower=1.7976931348623157E308;OptOutSmartRouting=false;Clearing=null/IB;ReferencePriceType=None;DisplaySize=2147483647;PercentOffset=1.7976931348623157E308;StockRangeUpper=1.7976931348623157E308;FirmQuoteOnly=true;Delta=1.7976931348623157E308] 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Start validating message: 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Finished validating message: 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Started processing message: 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:INFO] Placing orderId - 198 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:INFO] Processing of order {198} completed. 2017-04-05 17:09:33.549 [BV] INFO [JTS-EServerSocket-679] - [9368395:62:76:1:0:0:0:DET] Finished processing message: 2017-04-05 17:09:33.711 [BV] INFO [JTS-CCPDispatcherS2-34] - [9368395:62:76:1:0:4:2:DET] Sending error. 2017-04-05 17:09:33.711 [BV] INFO [JTS-CCPDispatcherS2-34] - [9368395:62:76:1:0:4:2:DET] [4;2;198;200;No security definition has been found for the request] 2017-04-05 17:09:33.711 [BV] INFO [JTS-CCPDispatcherS2-34] - [9368395:62:76:1:0:4:2:DET] Error sent. 5. the following info gathered from Sierra's log window Symbol Error - (unknown symbol with ID 198) is unknown, unavailable, or improperly formatted. | 2017-04-05 10:09:32 6. The above leads to the conclusion that Sierra contructs a defective message (carrying the trading order) for TWS causing TWS to reject the trading order. TWS returns an error message to Sierra (we can see the same ID and time stamp) below you can find a snippet from an email sent to me by IB support Inline image 1 Inline image 2 ======================================================================== If my code should be corrected - pls let me know - i'll be happy to correct whatever is required I have invested a lot of money and many months to develop my software relying on Sierra ... I hope we agree that this should be handled. The missing snippet of ib support email --------------------------------------- IB API Services 9:10 PM (1 hour ago) to me Dear Mr. Persky, The TWS log file indicates that TWS is receiving contracts with the 'secType' field set to 'STK' rather than 'CASH', the exchange as 'SMART' rather than 'IDEALPRO', and the symbol as 'EURUSD' rather than 'EUR'. This contract would need to be defined and sent differently from Sierra Charts in order to be properly read from the TWS API. \ Sierra Chart Support Date Time Of Last Edit: 2017-04-06 06:48:40
|