/// <summary> /// To create a rule for the event of candle closing price reduction below a specific level. /// </summary> /// <param name="candleManager">The candles manager.</param> /// <param name="candle">The candle to be traced for the event of candle closing price reduction below a specific level.</param> /// <param name="price">The level. If the <see cref="Unit.Type"/> type equals to <see cref="UnitTypes.Limit"/>, specified price is set. Otherwise, shift value is specified.</param> /// <returns>Rule.</returns> public static MarketRule <Candle, Candle> WhenClosePriceLess(this ICandleManager candleManager, Candle candle, Unit price) { return(new ChangedCandleRule(candleManager, candle, candle.CreateCandleCondition(price, c => c.ClosePrice, true)) { Name = LocalizedStrings.Str1068Params.Put(candle, price) }); }