Пример #1
0
        public override void Prepare()
        {
            SignalsPriceCrossingSMA signals = new SignalsPriceCrossingSMA(
                SystemParams.Get(PriceCrossingSMAParams.StockName).As <string>(),
                StockData.Types.StockDataRange.Daily,
                SystemParams.Get(PriceCrossingSMAParams.SMAPeriod).As <int>(),
                _dataLoader, _dataProvider,
                new MMSignalVolumeForAllCash(_commission));

            _dataDefinitionProvider = signals;
            _signalGeneratorOnOpen  = null;
            _signalGeneratorOnClose = signals;
            //_commission = null;
            //_slippage = null;
            _mmPositionCloseCalculator = null;
        }
Пример #2
0
        public override void Prepare()
        {
            SignalsBBTrend signals = new SignalsBBTrend(
                SystemParams.Get(BBTrendParams.StockName).As <string>(),
                StockData.Types.StockDataRange.Daily,
                SystemParams.Get(BBTrendParams.BBPeriod).As <int>(),
                SystemParams.Get(BBTrendParams.BBSigmaWidth).As <float>(),
                _dataLoader, _dataProvider,
                new MMSignalVolumeOneItem());

            _dataDefinitionProvider = signals;
            _signalGeneratorOnOpen  = null;
            _signalGeneratorOnClose = signals;
            //_commission = null;
            //_slippage = null;
            _mmPositionCloseCalculator = null;
        }