Login Page - Create Account

Support Board


Date/Time: Wed, 01 May 2024 23:48:47 +0000



[User Discussion] - How to enter two orders(no contracts)at the same time but with different targets/stop/trai

View Count: 598

[2020-08-12 22:52:48]
User712062 - Posts: 14
Can somebody please assist me on how to enter two orders (no contracts)at the same time but with different targets,stop trailing etc. I do have 1 block working fine see bellow the block structure NewOrder.
s_SCNewOrder NewOrder;
NewOrder.OrderQuantity
NewOrder.OrderType
NewOrder.TimeInForce
NewOrder.Target1Offset
NewOrder.Target2Offset
NewOrder.StopAllOffset  
NewOrder.TriggeredTrailStopTriggerPriceOffset
NewOrder.MoveToBreakEven.Type = MOVETO_BE_ACTION_TYPE_OCO_GROUP_TRIGGERED;

I thought that declaring the new bracket with a different name like s_SCNewOrder NewOrder1 sierra would accept that as a different order block but it does not . I have try a variation but the further I got was to trigger the other entry but no child's or limit orders as the first one.So the first order perform as it suppose to but the new entry block don't . I need assistance.Regards. and Thanks in advance.
PD:yes I am using sc.AllowMultipleEntriesInSameDirection = true;sc.SupportTradingScaleIn = 1;
[2020-08-14 17:12:44]
Hammerhead - Posts: 14
Hi,

Your puzzle here is a bit of a doozy, but I'll take a crack at it.

You should be able to use the same order structure for different orders, and set the structure members individually. Also, you probably would have to set what you're trying to accomplish up as a one triggers the other so as to have two separate code blocks where you are able to set structure members.

For example, and hopefully this makes some sense:

s_SCNewOrder NewOrder;

if (Submit 1st order = true)
{
NewOrder.OrderQuantity;
NewOrder.OrderType;
etc...
etc...

int Result = (int)sc.BuyEntry(NewOrder);

if (Result that would trigger another order = true)
{
NewOrder.OrderQuantity;
NewOrder.OrderType;
etc...
etc...

sc.BuyEntry(NewOrder);
}
}

Maybe this will help you out a little, but if not, I apologize in advance.

Regards,
Date Time Of Last Edit: 2020-08-14 17:15:29

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

Login

Login Page - Create Account