You can attach one-time adjustments to stop, stop limit, trailing stop and trailing stop limit orders. When you attach an adjusted order, you set a trigger price that triggers a modification of the original (or parent) order, instead of triggering order transmission.
Adjusted to Stop
-
Order order = Stop(parent.Action.Equals("BUY") ? "SELL" : "BUY", parent.TotalQuantity, attachedOrderStopPrice);
order.ParentId = parent.OrderId;
order.TriggerPrice = triggerPrice;
order.AdjustedOrderType = "STP";
order.AdjustedStopPrice = adjustStopPrice;
-
Order order = new Order();
order.action("BUY".equals(parent.getAction()) ? "SELL" : "BUY");
order.totalQuantity(parent.totalQuantity());
order.auxPrice(attachedOrderStopPrice);
order.parentId(parent.orderId());
order.triggerPrice(triggerPrice);
order.adjustedOrderType(OrderType.STP);
order.adjustedStopPrice(adjustStopPrice);
-
'Attached order Is a conventional STP order in opposite direction
Dim action As String = "BUY"
If (parent.Action.Equals("BUY")) Then
action = "SELL"
End If
Dim order As Order = StopOrder(action, parent.TotalQuantity, attachedOrderStopPrice)
order.ParentId = parent.OrderId
'When trigger price Is penetrated
order.TriggerPrice = triggerPrice
'The parent order will be turned into a STP order
order.AdjustedOrderType = "STP"
'With the given STP price
order.AdjustedStopPrice = adjustStopPrice
-
Order order;
order.action = (parent.action == "BUY") ? "SELL": "BUY";
order.orderType = "STP";
order.totalQuantity = parent.totalQuantity;
order.auxPrice = attachedOrderStopPrice;
order.parentId = parent.orderId;
order.triggerPrice = triggerPrice;
order.adjustedOrderType = "STP";
order.adjustedStopPrice = adjustStopPrice;
-
2 order = OrderSamples.Stop(
"SELL" if parent.action ==
"BUY" else "BUY",
3 parent.totalQuantity, attachedOrderStopPrice)
4 order.parentId = parent.orderId
6 order.triggerPrice = triggerPrice
8 order.adjustedOrderType =
"STP"
10 order.adjustedStopPrice = adjustStopPrice
Adjusted to Stop Limit
-
Order order = Stop(parent.Action.Equals("BUY") ? "SELL" : "BUY", parent.TotalQuantity, attachedOrderStopPrice);
order.ParentId = parent.OrderId;
order.TriggerPrice = triggerPrice;
order.AdjustedOrderType = "STP LMT";
order.AdjustedStopPrice = adjustedStopPrice;
order.AdjustedStopLimitPrice = adjustedStopLimitPrice;
-
Order order = new Order();
order.action("BUY".equals(parent.getAction()) ? "SELL" : "BUY");
order.totalQuantity(parent.totalQuantity());
order.auxPrice(attachedOrderStopPrice);
order.parentId(parent.orderId());
order.triggerPrice(triggerPrice);
order.adjustedOrderType(OrderType.STP_LMT);
order.adjustedStopPrice(adjustStopPrice);
order.adjustedStopLimitPrice(adjustedStopLimitPrice);
-
'Attached order Is a conventional STP order
Dim action As String = "BUY"
If (parent.Action.Equals("BUY")) Then
action = "SELL"
End If
Dim order As Order = StopOrder(action, parent.TotalQuantity, attachedOrderStopPrice)
order.ParentId = parent.OrderId
'When trigger price Is penetrated
order.TriggerPrice = triggerPrice
'The parent order will be turned into a STP LMT order
order.AdjustedOrderType = "STP LMT"
'With the given stop price
order.AdjustedStopPrice = adjustedStopPrice
'And the given limit price
order.AdjustedStopLimitPrice = adjustedStopLimitPrice
-
Order order;
order.action = (parent.action == "BUY") ? "SELL": "BUY";
order.orderType = "STP";
order.totalQuantity = parent.totalQuantity;
order.auxPrice = attachedOrderStopPrice;
order.parentId = parent.orderId;
order.triggerPrice = triggerPrice;
order.adjustedOrderType = "STP LMT";
order.adjustedStopPrice = adjustStopPrice;
order.adjustedStopLimitPrice = adjustedStopLimitPrice;
-
2 order = OrderSamples.Stop(
"SELL" if parent.action ==
"BUY" else "BUY",
3 parent.totalQuantity, attachedOrderStopPrice)
4 order.parentId = parent.orderId
6 order.triggerPrice = triggerPrice
8 order.adjustedOrderType =
"STP LMT"
10 order.adjustedStopPrice = adjustedStopPrice
12 order.adjustedStopLimitPrice = adjustedStopLimitPrice
Adjusted to Trail
-
Order order = Stop(parent.Action.Equals("BUY") ? "SELL" : "BUY", parent.TotalQuantity, attachedOrderStopPrice);
order.ParentId = parent.OrderId;
order.TriggerPrice = triggerPrice;
order.AdjustedOrderType = "TRAIL";
order.AdjustedStopPrice = adjustedStopPrice;
order.AdjustableTrailingUnit = trailUnit;
order.AdjustedTrailingAmount = adjustedTrailAmount;
-
Order order = new Order();
order.action("BUY".equals(parent.getAction()) ? "SELL" : "BUY");
order.totalQuantity(parent.totalQuantity());
order.auxPrice(attachedOrderStopPrice);
order.parentId(parent.orderId());
order.triggerPrice(triggerPrice);
order.adjustedOrderType(OrderType.TRAIL);
order.adjustedStopPrice(adjustStopPrice);
order.adjustableTrailingUnit(trailUnit);
order.adjustedTrailingAmount(adjustedTrailAmount);
-
'Attached order Is a conventional STP order
Dim action As String = "BUY"
If (parent.Action.Equals("BUY")) Then
action = "SELL"
End If
Dim order As Order = StopOrder(action, parent.TotalQuantity, attachedOrderStopPrice)
order.ParentId = parent.OrderId
'When trigger price Is penetrated
order.TriggerPrice = triggerPrice
'The parent order will be turned into a TRAIL order
order.AdjustedOrderType = "TRAIL"
'With a stop price of...
order.AdjustedStopPrice = adjustedStopPrice
'traling by And amount (0) Or a percent (100)...
order.AdjustableTrailingUnit = trailUnit
'of...
order.AdjustedTrailingAmount = adjustedTrailAmount
-
Order order;
order.action = (parent.action == "BUY") ? "SELL": "BUY";
order.orderType = "STP";
order.totalQuantity = parent.totalQuantity;
order.auxPrice = attachedOrderStopPrice;
order.parentId = parent.orderId;
order.triggerPrice = triggerPrice;
order.adjustedOrderType = "TRAIL";
order.adjustedStopPrice = adjustStopPrice;
order.adjustableTrailingUnit = trailUnit;
order.adjustedTrailingAmount = adjustedTrailAmount;
-
2 order = OrderSamples.Stop(
"SELL" if parent.action ==
"BUY" else "BUY",
3 parent.totalQuantity, attachedOrderStopPrice)
4 order.parentId = parent.orderId
6 order.triggerPrice = triggerPrice
8 order.adjustedOrderType =
"TRAIL"
10 order.adjustedStopPrice = adjustedStopPrice
12 order.adjustableTrailingUnit = trailUnit
14 order.adjustedTrailingAmount = adjustedTrailAmount