/// <summary> /// To create the initialized order object for sell. /// </summary> /// <param name="strategy">Strategy.</param> /// <param name="price">Price.</param> /// <param name="volume">The volume. If <see langword="null" /> value is passed, then <see cref="Strategy.Volume"/> value is used.</param> /// <returns>The initialized order object.</returns> /// <remarks> /// The order is not registered, only the object is created. /// </remarks> public static Order SellAtLimit(this Strategy strategy, decimal price, decimal?volume = null) { return(strategy.CreateOrder(Sides.Sell, price, volume)); }
/// <summary> /// To create the initialized order object of sell order at market price. /// </summary> /// <param name="strategy">Strategy.</param> /// <param name="volume">The volume. If <see langword="null" /> value is passed, then <see cref="Strategy.Volume"/> value is used.</param> /// <returns>The initialized order object.</returns> /// <remarks> /// The order is not registered, only the object is created. /// </remarks> public static Order SellAtMarket(this Strategy strategy, decimal?volume = null) { return(strategy.CreateOrder(Sides.Sell, null, volume)); }
/// <summary> /// To create initialized object of buy order at market price. /// </summary> /// <param name="strategy">Strategy.</param> /// <param name="volume">The volume. If <see langword="null" /> value is passed, then <see cref="Strategy.Volume"/> value is used.</param> /// <returns>The initialized order object.</returns> /// <remarks> /// The order is not registered, only the object is created. /// </remarks> public static Order BuyAtMarket(this Strategy strategy, decimal? volume = null) { return strategy.CreateOrder(Sides.Buy, null, volume); }
/// <summary> /// To create the initialized order object for buy. /// </summary> /// <param name="strategy">Strategy.</param> /// <param name="price">Price.</param> /// <param name="volume">The volume. If <see langword="null" /> value is passed, then <see cref="Strategy.Volume"/> value is used.</param> /// <returns>The initialized order object.</returns> /// <remarks> /// The order is not registered, only the object is created. /// </remarks> public static Order BuyAtLimit(this Strategy strategy, decimal price, decimal? volume = null) { return strategy.CreateOrder(Sides.Buy, price, volume); }
/// <summary> /// Создать инициализированный объект заявки на покупку по рыночной цене. /// </summary> /// <remarks> /// Заявка не регистрируется, а только создается объект. /// </remarks> /// <param name="strategy">Стратегия.</param> /// <param name="volume">Объем. Если передается значение 0, то используется значение <see cref="Strategy.Volume"/>.</param> /// <returns>Инициализированный объект заявки.</returns> public static Order BuyAtMarket(this Strategy strategy, decimal volume = 0) { return(strategy.CreateOrder(Sides.Buy, 0, volume)); }