Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 14:09:00 +0000



[Programming Help] - Quantity Distribution from Parent Order to Multiple Attached Orders in ACSIL

View Count: 1623

[2018-12-11 03:10:36]
User718622 - Posts: 57
According to: Attached Orders: General Management of Attached Orders

The order quantity of the Attached Orders will be equal to the quantity of the parent order.

If, in ACSIL, I define the sc_NewOrder parent order quantity as 5 and then set make 5 targets and 5 stops, does that mean that each target and stop has a quantity of 1?

Edit for clarification:

I mean if parent order has quantity of 5 and there 5 separate target orders and 5 separate stop orders.
Date Time Of Last Edit: 2018-12-12 01:20:16
[2018-12-11 06:47:04]
Sierra Chart Engineering - Posts: 104368
Correction and update: The answer is yes. If you have 5 separate targets and 5 separate stops, and the parent order has a quantity of 5, each of the targets and stops will have an order quantity of 1.


And when using the Attached Order interface in Sierra Chart, the Attached Orders can have a lower quantity than the parent order but the parent order in this case would be split into two orders. One order matching the attached orders and another order with the remaining quantity.
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
Date Time Of Last Edit: 2018-12-12 01:12:42
[2018-12-11 16:32:25]
User718622 - Posts: 57
Then, how would I make an order that has a quantity of 3 and make sure that each of the targets and stops has a quantity of one distributing the parent order accordingly?
[2018-12-11 21:40:28]
Sierra Chart Engineering - Posts: 104368
This can be done by making sure there are 3 separate target orders. So you just need to set three separate target orders.
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
Date Time Of Last Edit: 2018-12-11 21:40:45
[2019-03-26 13:21:36]
User525733 - Posts: 126
folks, i have a follow up on this,

I want to create the following in ACSIL: a parent order with 3 lots, two separate targets each having quantity = 1, and the final contract should exit using triggered trailing stop that triggers on 2nd target fill. I also want the common stop to move to BE once the 1st target fills. The below code didn't work...can you please advise:

s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 3;
  NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
  NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
  
  //Define the Attached Orders to be attached to the main Market order
  //Target 1
  NewOrder.Target1Offset = 4 * sc.TickSize;
  NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;

  //Target 2
  NewOrder.Target2Offset = 20 * sc.TickSize;
  NewOrder.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT;

  //Common Stop
  NewOrder.StopAllOffset = 16 * sc.TickSize;
  NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_LIMIT_3_OFFSETS;
  NewOrder.TriggeredTrailStopTriggerPriceOffset = 8 * sc.TickSize;
  NewOrder.TriggeredTrailStopTrailPriceOffset = 4 * sc.TickSize;

  //Set up a move to breakeven action for the common stop. When Target 1 is filled, the order will be moved to breakeven +1
  NewOrder.MoveToBreakEven.Type = MOVETO_BE_ACTION_TYPE_OCO_GROUP_TRIGGERED;
  NewOrder.MoveToBreakEven.BreakEvenLevelOffsetInTicks = 0;
  NewOrder.MoveToBreakEven.TriggerOCOGroup = OCO_GROUP_1;

[2019-03-27 01:14:12]
Sierra Chart Engineering - Posts: 104368
You also need to set NewOrder.OCOGroup1Quantity and NewOrder.OCOGroup2Quantity
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
Date Time Of Last Edit: 2019-03-27 01:14:18
[2019-03-27 12:41:13]
User525733 - Posts: 126
I tried the below and it didn't work:


// Create an s_SCNewOrder object.
  s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 3;
  NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
  NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
  
  //Define the Attached Orders to be attached to the main Market order
  //Target 1
  NewOrder.Target1Offset = In_target1.GetFloat() * sc.TickSize;
  NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;

  //Target 2
  NewOrder.Target2Offset = In_target2.GetFloat() * sc.TickSize;
  NewOrder.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT;

  //Common Stop
  NewOrder.StopAllOffset = In_commonstop.GetFloat() * sc.TickSize;
  NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_LIMIT_3_OFFSETS;
  NewOrder.TriggeredTrailStopTriggerPriceOffset = In_TriggeredTrailStopTriggerPriceOffset.GetFloat() * sc.TickSize;
  NewOrder.TriggeredTrailStopTrailPriceOffset = In_TriggeredTrailStopTrailPriceOffset.GetFloat() * sc.TickSize;

  //Set up a move to breakeven action for the common stop. When Target 1 is filled, the order will be moved to breakeven +1
  NewOrder.MoveToBreakEven.Type = MOVETO_BE_ACTION_TYPE_OCO_GROUP_TRIGGERED;
  NewOrder.MoveToBreakEven.BreakEvenLevelOffsetInTicks = 0;
  NewOrder.MoveToBreakEven.TriggerOCOGroup = OCO_GROUP_1;

  NewOrder.OCOGroup1Quantity = 1;
  NewOrder.OCOGroup2Quantity = 1;
  NewOrder.OCOGroup3Quantity = 1;

please pay attention to the requirements mentioned in post #5. Only TWO contracts should exit on fixed targets, the THIRD one should exit on the trailing stop. not sure what i am doing wrong/how to implement it?

thanks
[2019-03-28 02:15:15]
User525733 - Posts: 126
?
[2019-03-28 02:41:29]
Sierra Chart Engineering - Posts: 104368
We do not provide programming help. If you are looking for help it is 75 USD per hour in our available time. You have an expired account on top of that.

We are not here to pay attention to your details because this is not within the scope of our support. You have to pay for that. Don't you understand that?
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
Date Time Of Last Edit: 2019-03-28 02:41:52
[2019-03-28 10:23:57]
User525733 - Posts: 126
why don't you do a better job documenting your product so that we don't have to ask questions and endure your snarky comments?

don't you understand that?
[2019-03-30 08:21:28]
Sierra Chart Engineering - Posts: 104368
This is not a fair comment for several reasons. Our documentation is absolutely superb. You require detailed programming level support which does have an associated cost.

Anyone who agrees with you is simply not aware of the facts. You have an unpaid account with 100 posts on it.

At this point in time you have consumed hundreds of dollars of unpaid support.

So here we are providing excellent support for free and excellent documentation, and when the user is bothering us with an unclear question, that takes away time from our development, then we are met up with this kind of response. Why should we even bother helping.

There is no point with us even providing further help.

For an answer, please put 25 USD on your account and let us know when that is done.


And furthermore, when you say something like "it does not work". What are we supposed to do with this? Answering questions like this, requires us to review the code, test the code, debug the code, understand what you want to do, and then finally provide an answer. This takes time and has an associated cost. And more importantly it takes time away from the development for our entire user base.
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
Date Time Of Last Edit: 2019-03-30 08:22:21

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account