public static bool IsPriceGap(Quotation first, Quotation second) { double firstTop = first.GetTop(); double firstBottom = first.GetBottom(); double secondTop = second.GetTop(); double secondBottom = second.GetBottom(); bool isPriceGap = (secondBottom > firstTop) || (secondTop < firstBottom); return isPriceGap; }
public PriceGap(Quotation first, Quotation second) { First = first; Second = second; double firstTop = First.GetTop(); double firstBottom = First.GetBottom(); double secondTop = Second.GetTop(); double secondBottom = Second.GetBottom(); if (secondBottom > firstTop) { Start = firstTop; End = secondBottom; } else if (secondTop < firstBottom) { Start = firstBottom; End = secondBottom; } }