public bool IsBelow(Candlestick candlestick, enCandlestickPart part) { if (part == enCandlestickPart.All) { return(this.IsBelow(candlestick, enCandlestickPart.High) && this.IsBelow(candlestick, enCandlestickPart.Low) && this.IsBelow(candlestick, enCandlestickPart.RealBodyHigh) && this.IsBelow(candlestick, enCandlestickPart.RealBodyLow)); } else if (part == enCandlestickPart.High) { return(this.High < candlestick.High); } else if (part == enCandlestickPart.Low) { return(this.Low < candlestick.Low); } else if (part == enCandlestickPart.RealBodyHigh) { return(this.RealBodyHigh < candlestick.RealBodyHigh); } else if (part == enCandlestickPart.RealBodyLow) { return(this.RealBodyLow < candlestick.RealBodyLow); } return(false); }
public bool IsAbove(Candlestick candlestick) { return(IsAbove(candlestick, enCandlestickPart.All)); }
public bool IsBelow(Candlestick candlestick) { return(this.IsBelow(candlestick, enCandlestickPart.All)); }
/// <summary> /// To compare between 2 Candlesticks whether it's same. /// </summary> /// <param name="comparer"></param> /// <returns></returns> public bool Same(Candlestick comparer) { return(comparer != null && this.High == comparer.High && this.Low == comparer.Low && this.Open == comparer.Open && this.Close == comparer.Close && this.OpenTime == comparer.OpenTime); }