コード例 #1
0
ファイル: TestManager.cs プロジェクト: rlyalko/REVERSALS_v14
        public static void StartBackTest(Strategy.StrategyParameters parameters, List<Strategy.StrategyAdditionalParameter> additionalParameters, List<Tick> ticks)
        {
            _strategyParameterses = parameters;
            _strategyAdditionalParameters = additionalParameters;
            _ticks = ticks;

            InitializeStrategy();

            _strategy.ProgressEvent += NotifyProgressEvent;

            _strategy.Start(0);

            NotifyResultEvent(_strategy);
        }
コード例 #2
0
        private void StartBackTest()
        {
            Invoke((Action)delegate
            {
                TestManager.ProgressEvent += ProgressIncrement;
            });
            var parameters = new Strategy.StrategyParameters(1, _currentSymbolName, "Step Change");

            List<Strategy.StrategyAdditionalParameter> additional = UpdateAdditionalParams();
            TestManager.ResultEvent += DisplayBackTestResult;
            TestManager.StartBackTest(parameters, additional, _data.BarsRange(_inSampleStartTime, _inSampleEndTime, 0).Bars);
            TestManager.ResultEvent -= DisplayBackTestResult;

            Invoke((Action)delegate
            {
                Report("In Sample/Out Of Sample procedure finished.", InformerMessageType.Success);
                uiStrategy_buttonXStart.Enabled = true;
                uiStrategy_buttonXStop.Enabled = false;
            });
        }
コード例 #3
0
        private void uiStrategy_SelectedIndexChanged(object sender, EventArgs e)
        {
            const int account = 1;
            var name = uiStrategy.Items[uiStrategy.SelectedIndex].ToString();
            const string symbol = "";

            var parameters = new Strategy.StrategyParameters(account, symbol, name);

            Initialize(uiStrategy.SelectedIndex, parameters);
            if (_strategy != null)
            {
                //TODO there are we send only one parameter
                //NotOptimizationParametersContainer.Instance.Parameters = DefaultNOptParameters(_strategy.Parameters, _strategy .AdditionalParameters);
                NotOptimizationParametersContainer.Instance.Parameters = DefaultNOptParameters( _strategy.AdditionalParameters);
            }

            uiStrategy_dataGridViewNoOptomizationParameters.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
            uiStrategy_dataGridViewNoOptomizationParameters.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;

            uiStrategy_panelExRunContinuesPanel.Enabled = true;
        }