Adjusted to Trail

View as MarkdownOpen in Claude

TriggerPrice: Price threshold for when the order type should just to the AdjustedOrderType value.

AdjustedOrderType: Resulting order type in the event an order passes the triggerPrice threshold.
This can be “STP”, “STP LMT”, “TRAIL”, “TRAILING LIMIT”.

AdjustedStopPrice: The trail order’s trigger price after being adjusted.

AdjustableTrailingUnit: Dictate how trail should be adjusted.
This can be “amt” or ”%”.

AdjustedTrailingAmount: The value to trail by. This will be a set amount or percentage based on the AdjustedTrailingUnit.

1order = Order()
2order.action = action
3order.orderType = "STP"
4order.auxPrice = stopPrice
5order.totalQuantity = quantity
6
7order.triggerPrice = triggerPrice
8order.adjustedOrderType = "TRAIL"
9order.adjustedStopPrice = adjustedStopPrice
10order.adjustableTrailingUnit = trailUnit
11order.adjustedTrailingAmount = adjustedTrailAmount