Ejemplo n.º 1
0
        public static List <CandlePatternCode> CandlePatterns(this IEnumerable <ICandle> candles, decimal?dojiSize = null)
        {
            dojiSize ??= 0.05m;

            CandlePatternsOptions config = new CandlePatternsOptions(dojiSize.Value);
            CandlePatterns        cp     = new CandlePatterns();

            return(cp.Get(candles, config));
        }
        public TradeType?OpenOrder()
        {
            var candles = new CandlePatterns(_m5);

            if (candles.IsHigherHigh())
            {
                return(TradeType.Sell);
            }
            else if (candles.IsLowerLow())
            {
                return(TradeType.Buy);
            }
            return(null);
        }