Ejemplo n.º 1
0
 internal TrailingStopOrder(
     String symbol,
     OrderQuantity quantity,
     OrderSide side,
     TrailOffset trailOffset)
     : base(
         symbol, quantity, side,
         OrderType.TrailingStop) =>
 public static JsonNewOrder WithTrailOffset(
     this JsonNewOrder order,
     TrailOffset trailOffset)
 {
     if (trailOffset.IsInDollars)
     {
         order.TrailOffsetInDollars = trailOffset.Value;
     }
     else
     {
         order.TrailOffsetInPercent = trailOffset.Value;
     }
     return(order);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates new trailing stop order using specified side, symbol, quantity, and trail offset.
 /// </summary>
 /// <param name="orderSide">Order side (buy or sell).</param>
 /// <param name="symbol">Order asset name.</param>
 /// <param name="quantity">Order quantity.</param>
 /// <param name="trailOffset">Order trail offset.</param>
 /// <returns>The new <see cref="TrailingStopOrder"/> object instance.</returns>
 public static TrailingStopOrder TrailingStop(
     this OrderSide orderSide,
     String symbol,
     Int64 quantity,
     TrailOffset trailOffset) =>
 new TrailingStopOrder(symbol, quantity, orderSide, trailOffset);