Пример #1
0
    protected override int GetClass(CandleDataList candleDataList, int index)
    {
        Candle c  = candleDataList.GetCandle(index + 1);
        Candle c1 = candleDataList.GetCandle(index);

        // c : c1 = x : 100
        // 다음날 20% 이상 상승이면 1를 리턴한다.
        double x = (c.Close / c1.Close) * 100;

        if (120 < x)
        {
            return(1);
        }
        else
        {
            return(0);
        }
    }
Пример #2
0
    int GetClass(CandleDataList candleDataList, int index)
    {
        Candle c  = candleDataList.GetCandle(index + 1);
        Candle c1 = candleDataList.GetCandle(index);

        // c : c1 = x : 100
        // 다음날 20% 이상 상승이면 1를 리턴한다.
        double x = c.Close * 100 / c1.Close;

        if (20 < x)
        {
            return(1);
        }
        else
        {
            return(0);
        }
    }