예제 #1
0
        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;
        }
예제 #2
0
        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;
            }

        }