Ejemplo n.º 1
0
        }//check

        private short checkGAP(CandleStickData currentData, CandleStickData beforeData)
        {
            if (currentData.Low > beforeData.High || currentData.High < beforeData.Low)
            {
                return((short)CandleGAP.GAP);
            }

            else
            {
                return((short)CandleGAP.NotGAP);
            }
        }//check
Ejemplo n.º 2
0
        }//check

        private short checkLL(CandleStickData current, CandleStickData before)
        {
            double currentMin = Math.Min(current.Open, current.Close);
            double beforeMin  = Math.Min(before.Open, before.Close);

            if (currentMin < beforeMin)
            {
                return((short)TypeTrend.UP);
            }
            else
            {
                return((short)TypeTrend.DOWN);
            }
        }//check
Ejemplo n.º 3
0
        private short checkLowerHigh(CandleStickData current, CandleStickData beforeData)
        {
            double MaxCurrent = Math.Max(current.Open, current.Close);
            double MaxBefore  = Math.Max(beforeData.Open, beforeData.Close);

            if (MaxCurrent <= MaxBefore)
            {
                return((short)TypeTrend.UP);
            }
            else
            {
                return((short)TypeTrend.DOWN);
            }
        }
Ejemplo n.º 4
0
        }//check

        private short checkHH(CandleStickData current, CandleStickData before)
        {
            double currentMax = Math.Max(current.Open, current.Close);
            double beforeMax  = Math.Max(before.Open, before.Close);

            if (currentMax > beforeMax)
            {
                return((short)TypeTrend.UP);
            }
            else
            {
                return((short)TypeTrend.DOWN);
            }
        }//check
Ejemplo n.º 5
0
        }//check

        private short checkHigherLow(CandleStickData current, CandleStickData beforeData)
        {
            double MinCurrent = Math.Min(current.Open, current.Close);
            double MinBefore  = Math.Min(beforeData.Open, beforeData.Close);

            if (MinCurrent >= MinBefore)
            {
                return((short)TypeTrend.UP);
            }
            else
            {
                return((short)TypeTrend.DOWN);
            }
        }