public void SetUp()
        {
            _dataProvider = StockDataProviderUtils.CreateSubstitute(DateTime.MinValue);
            _dataLoader   = SystemDataLoaderUtils.CreateSubstitute(2 * BackBufRange, BackBufRange, DateTime.Now.Date);
            TestObj       = new StocksDataPreloader(_dataProvider, _dataLoader);

            _stat = new StockStatMock("", BackBufRange);
        }
        public void SetUp()
        {
            _dataProvider           = StockDataProviderUtils.CreateSubstitute(DateTime.MinValue);
            _dataLoader             = SystemDataLoaderUtils.CreateSubstituteWithConstantPriceInRange(PricesCount, StartingPrice, PriceRange, LastDate);
            _dataDefinitionProvider = Substitute.For <ISystemDataDefinitionProvider>();
            _signalGeneratorOnOpen  = Substitute.For <ISignalGeneratorOnOpen>();
            _signalGeneratorOnClose = Substitute.For <ISignalGeneratorOnClose>();
            _commission             = CommissionUtils.CreateSubstitute();
            _slippage = SlippageUtils.CreateSusbstitute();
            _mmPositionCloseCalculator = Substitute.For <IMMPositionCloseCalculator>();
            _systemState = new SystemState()
            {
                Cash = InitialCash
            };

            _slippage.CalculateOpen(default, default, default, default).ReturnsForAnyArgs(args => args.ArgAt <float>(3));