Show / Hide Table of Contents

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

Inheritance
System.Object
OrderBase
SimpleOrderBase
TrailingStopOrder
Inherited Members
SimpleOrderBase.TakeProfit(Decimal)
SimpleOrderBase.StopLoss(Decimal)
SimpleOrderBase.StopLoss(Decimal, Decimal)
SimpleOrderBase.Bracket(Decimal, Decimal)
SimpleOrderBase.Bracket(Decimal, Decimal, Decimal)
OrderBase.Symbol
OrderBase.Quantity
OrderBase.Side
OrderBase.Type
OrderBase.Duration
OrderBase.ClientOrderId
OrderBase.ExtendedHours
OrderBase.PositionIntent
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 Source

TrailOffset

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 Source

Buy(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.

| Improve this Doc View Source

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.

Extension Methods

OrderBaseExtensions.WithDuration<TOrder>(TOrder, TimeInForce)
OrderBaseExtensions.WithClientOrderId<TOrder>(TOrder, String)
OrderBaseExtensions.WithExtendedHours<TOrder>(TOrder, Boolean)
OrderBaseExtensions.WithPositionIntent<TOrder>(TOrder, PositionIntent)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX