コード例 #1
0
        private void JudgeStrategy(string strategyName, IStockValues values)
        {
            SignalValidationCalc calc = new SignalValidationCalc();
            calc.HoldValues = _HoldValues;

            DateTime curDate = _MinDate;
            while (curDate < _MaxDate)
            {
                OperType tp = values.GetOperationSignal(curDate);

                calc.AddSignal(curDate, tp);

                curDate = DateFunc.GetNextWorkday(curDate);
            }

            _Scores.SetScore(strategyName, calc.TotalScore);
            _BuyScores.SetScore(strategyName, calc.BuyScore);
            _SellScores.SetScore(strategyName, calc.SellScore);
        }
コード例 #2
0
        private void JudgeStrategy(string strategyName, IStockValues values)
        {
            SignalValidationCalc calc = new SignalValidationCalc();

            calc.HoldValues = _HoldValues;

            DateTime curDate = _MinDate;

            while (curDate < _MaxDate)
            {
                OperType tp = values.GetOperationSignal(curDate);

                calc.AddSignal(curDate, tp);

                curDate = DateFunc.GetNextWorkday(curDate);
            }

            _Scores.SetScore(strategyName, calc.TotalScore);
            _BuyScores.SetScore(strategyName, calc.BuyScore);
            _SellScores.SetScore(strategyName, calc.SellScore);
        }