Support Board
Date/Time: Fri, 22 Nov 2024 18:47:54 +0000
parent order issue ver 971
View Count: 1911
[2013-05-16 10:03:38] |
User32496 - Posts: 26 |
when running my code i get this error which has to do with parent and attached orders, yet 2 min. later the signal shows on chart and order is sent correctly (buy/sell 2 mkt + target 1 +2 on limit + stop + trailing_stop_limit + oco all) what have i done wrong? thanks Error log Trade Order Error: The order quantity for the Parent is 1 and this is less than the total order quantity of 2 for the Attached Orders. Please adjust the order quantities so the parent is greater or equal to the Attached Orders. | 2013-05-16 05:48:49 here is the orders code (which was copied from an example) // Create an s_SCNewOrder object. s_SCNewOrder NewOrder; NewOrder.OrderQuantity = OrderQuantity.GetInt(); NewOrder.OrderType = SCT_MARKET; //Define the Attached Orders to be attached to the main Market order //Target 1 NewOrder.Target1Offset = tPriceInput.GetFloat()*sc.TickSize; NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT; //Target 2 NewOrder.Target2Offset = target2PriceInput.GetFloat()*sc.TickSize; NewOrder.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT; //Common Stop NewOrder.StopAllOffset = stopPriceInput.GetFloat()*sc.TickSize; NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_LIMIT_3_OFFSETS; NewOrder.TriggeredTrailStopTriggerPriceOffset=stopPriceInput.GetFloat()*sc.TickSize; NewOrder.TriggeredTrailStopTrailPriceOffset=trailPriceInput.GetFloat()*sc.TickSize; //Set up a move to breakeven action for the common stop NewOrder.MoveToBreakEven.Type=MOVETO_BE_ACTION_TYPE_OCO_GROUP_TRIGGERED; NewOrder.MoveToBreakEven.BreakEvenLevelOffsetInTicks= bePriceInput.GetFloat(); //When Target 1 is filled, the order will be moved to breakeven +1 NewOrder.MoveToBreakEven.TriggerOCOGroup= OCO_GROUP_1; |
[2013-05-17 09:25:28] |
Sierra Chart Engineering - Posts: 104368 |
It looks clear that you are setting this to 1 : NewOrder.OrderQuantity Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2013-05-18 20:05:29] |
User32496 - Posts: 26 |
i set the order quantity to be an input. the input # is 2 (which i eneter on the settings screen)
|
[2013-05-21 02:11:19] |
Sierra Chart Engineering - Posts: 104368 |
And what are you setting the order quantity to? Please provide very clear evidence that there is a problem.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2013-05-21 12:14:21] |
User32496 - Posts: 26 |
here is the settings of the study set for 2 and the error msg on the log
|
parent issue order.jpg / V - Attached On 2013-05-21 12:13:51 UTC - Size: 309.6 KB - 603 views |
[2013-05-21 18:37:03] |
Sierra Chart Engineering - Posts: 104368 |
We have thoroughly tested this and could not duplicate the issue.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: