Class TrailingStopOrder
Trailing stop orders allow you to continuously and automatically keep updating the stop price threshold based on the stock price movement.
See https://alpaca.markets/docs/trading/orders/#trailing-stop-orders
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public sealed class TrailingStopOrder : SimpleOrderBase
Properties
| Improve this Doc View SourceTrailOffset
Gets order trail offset value (in dollars or percent).
Declaration
public TrailOffset TrailOffset { get; }
Property Value
Type | Description |
---|---|
Alpaca.Markets.TrailOffset |
Methods
| Improve this Doc View SourceBuy(String, OrderQuantity, TrailOffset)
Creates new buy market order using specified symbol and quantity.
Declaration
public static TrailingStopOrder Buy(String symbol, OrderQuantity quantity, TrailOffset trailOffset)
Parameters
Type | Name | Description |
---|---|---|
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Alpaca.Markets.TrailOffset | trailOffset | Trailing stop order offset. |
Returns
Type | Description |
---|---|
TrailingStopOrder | The new TrailingStopOrder object instance. |
Sell(String, OrderQuantity, TrailOffset)
Creates new sell market order using specified symbol and quantity.
Declaration
public static TrailingStopOrder Sell(String symbol, OrderQuantity quantity, TrailOffset trailOffset)
Parameters
Type | Name | Description |
---|---|---|
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Alpaca.Markets.TrailOffset | trailOffset | Trailing stop order offset. |
Returns
Type | Description |
---|---|
TrailingStopOrder | The new TrailingStopOrder object instance. |