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); }
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); }
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); }
private bool IsLongSetup(PriceBars priceBar) { if (!crossedBelow20) { crossedBelow20 = stoch.PercentD() < 20; } if (!reached10) { reached10 = crossedBelow20 && stoch.PercentD() >= 10; } return(reached10 && stoch.PercentD() > 20); }
private bool IsLongSetup(PriceBars priceBar) { return(majorTrend == TrendDirectionMode.Bullish && CrossesAbove(stochRetrace.PercentK(1), stochRetrace.PercentK(), stochRetrace.PercentD(1), stochRetrace.PercentD())); }
private bool IsLongSetup(PriceBars priceBar) { return(stoch.PercentD() < 50 && CrossesAbove(ema2.Value(1), ema2.Value(), ema4.Value(1), ema4.Value())); }
private bool IsLongSetup(PriceBars priceBar) { return(emaCrossed && ema5CrossedAboveEMA10 && RisingStochasticLines() && stoch.PercentD() <= 80 & stoch.PercentD() >= 20 & rsi.Value() > 50); }
private bool IsLongSetup(PriceBars priceBar) { return(CrossesAbove(stoch.PercentK(1), stoch.PercentK(), stoch.PercentD(1), stoch.PercentD())); }
private bool IsLongSetup(PriceBars priceBar) { return(cci.Value() > 0 && stoch.PercentD() > 50 && (macd.MACDValue() > 0 || adx.PlusDI() > adx.MinusDI())); }