Exemplo n.º 1
0
        private bool IsLongSetup(PriceBars priceBar)
        {
            int  lastBearishCandle = LastBearishCandle(priceBar);
            bool closedMidCandle   = lastBearishCandle != int.MinValue;

            if (lastBearishCandle > 0)
            {
                closedMidCandle = priceBar.Last(lastBearishCandle).High > priceBar.Last(lastBearishCandle - 1).Close&& priceBar.Last(lastBearishCandle).Low > priceBar.Last(lastBearishCandle - 1).Close;
            }

            return(rsi.Value() < 50 && stoch.PercentD() < 50 && CrossesAbove(stoch.PercentK(1), stoch.PercentK(), stoch.PercentD(1), stoch.PercentD()) && closedMidCandle);
        }
Exemplo n.º 2
0
        private TrendDirectionMode GetMajorTrend()
        {
            TrendDirectionMode trend;

            if (CrossesAbove(stochMajor.PercentK(1), stochMajor.PercentK(), stochMajor.PercentD(1), stochMajor.PercentD()))
            {
                trend = TrendDirectionMode.Bullish;
            }
            else if (CrossesBelow(stochMajor.PercentK(1), stochMajor.PercentK(), stochMajor.PercentD(1), stochMajor.PercentD()))
            {
                trend = TrendDirectionMode.Bearish;
            }
            else
            {
                trend = TrendDirectionMode.Neutral;
            }
            return(trend);
        }
Exemplo n.º 3
0
        private ChartPoint[] CreateStochChartPoints()
        {
            ChartPoint[] chartPoints = new ChartPoint[STOCH_LOOPBACK_PERIOD];
            for (int i = 0; i < STOCH_LOOPBACK_PERIOD; i++)
            {
                chartPoints[i] = new ChartPoint((double)i, stoc.PercentD((STOCH_LOOPBACK_PERIOD - 1) - i));
            }

            return(chartPoints);
        }
Exemplo n.º 4
0
        private bool IsLongSetup(PriceBars priceBar)
        {
            if (!crossedBelow20)
            {
                crossedBelow20 = stoch.PercentD() < 20;
            }

            if (!reached10)
            {
                reached10 = crossedBelow20 && stoch.PercentD() >= 10;
            }

            return(reached10 && stoch.PercentD() > 20);
        }
Exemplo n.º 5
0
 private bool IsLongSetup(PriceBars priceBar)
 {
     return(majorTrend == TrendDirectionMode.Bullish && CrossesAbove(stochRetrace.PercentK(1), stochRetrace.PercentK(), stochRetrace.PercentD(1), stochRetrace.PercentD()));
 }
Exemplo n.º 6
0
 private bool IsLongSetup(PriceBars priceBar)
 {
     return(stoch.PercentD() < 50 && CrossesAbove(ema2.Value(1), ema2.Value(), ema4.Value(1), ema4.Value()));
 }
Exemplo n.º 7
0
 private bool IsLongSetup(PriceBars priceBar)
 {
     return(emaCrossed && ema5CrossedAboveEMA10 && RisingStochasticLines() && stoch.PercentD() <= 80 & stoch.PercentD() >= 20 & rsi.Value() > 50);
 }
Exemplo n.º 8
0
 private bool IsLongSetup(PriceBars priceBar)
 {
     return(CrossesAbove(stoch.PercentK(1), stoch.PercentK(), stoch.PercentD(1), stoch.PercentD()));
 }
Exemplo n.º 9
0
 private bool IsLongSetup(PriceBars priceBar)
 {
     return(cci.Value() > 0 && stoch.PercentD() > 50 && (macd.MACDValue() > 0 || adx.PlusDI() > adx.MinusDI()));
 }