Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public bool IsAbove(Candlestick candlestick)
 {
     return(IsAbove(candlestick, enCandlestickPart.All));
 }
Esempio n. 3
0
 public bool IsBelow(Candlestick candlestick)
 {
     return(this.IsBelow(candlestick, enCandlestickPart.All));
 }
Esempio n. 4
0
 /// <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);
 }