Support Board
Date/Time: Sun, 24 Nov 2024 21:57:17 +0000
Post From: DTC SUBMIT_NEW_SINGLE_ORDER does not submit order
[2024-05-08 04:05:48] |
Zorin - Posts: 19 |
Just for anyone who'll be playing with DTC::s_SubmitNewSingleOrder The working line is: {"Type":208,"Symbol":"ESM24-CME","Exchange":"","TradeAccount":"Sim3","ClientOrderID":"123592","OrderType":2,"BuySell":1,"Price1":5200.5,"Price2":0.0,"Quantity":1.0,"TimeInForce":0,"GoodTillDateTime":0,"IsAutomatedOrder":0,"IsParentOrder":0,"FreeFormText":"","OpenOrClose":0,"MaxShowQuantity":0.0,"Price1AsString":"","Price2AsString":"","IntendedPositionQuantity":0.0} In the DTC::s_SubmitNewSingleOrder dtcNewSingleOrd; // By whatever reason, copying from another order - like below - does NOT work dtcNewSingleOrd.OrderType = dtcMsgTEMP.GetOrderType(); // ?? dtcNewSingleOrd.BuySell = dtcMsgTEMP.GetBuySell(); // ?? dtcNewSingleOrd.Price1 = dtcMsgTEMP.GetPrice1(); // ?? dtcNewSingleOrd.Quantity = dtcMsgTEMP.OrderQuantity; dtcNewSingleOrd.TimeInForce = dtcMsgTEMP.GetTimeInForce(); dtcNewSingleOrd.GoodTillDateTime = dtcMsgTEMP.GetGoodTillDateTime(); // Proper syntax - use values, not functions: dtcNewSingleOrd.OrderType = dtcMsgTEMP.OrderType; // ?? dtcNewSingleOrd.BuySell = dtcMsgTEMP.BuySell; // ?? dtcNewSingleOrd.Price1 = dtcMsgTEMP.Price1 / 100; // ?? dtcNewSingleOrd.Quantity = dtcMsgTEMP.OrderQuantity; dtcNewSingleOrd.TimeInForce = dtcMsgTEMP.TimeInForce; dtcNewSingleOrd.GoodTillDateTime = dtcMsgTEMP.GoodTillDateTime; // The values of following fields should be explicitly assigned dtcNewSingleOrd.SetClientOrderID ("123592"); You should see your new order on your SierraChart screen - if/when submitted [and accepted] successfully. Date Time Of Last Edit: 2024-05-08 08:06:45
|