예제 #1
0
파일: Security.cs 프로젝트: zhangxia85/Lean
        /// <summary>
        /// Construct a new security vehicle based on the user options.
        /// </summary>
        public Security(SecurityExchangeHours exchangeHours, SubscriptionDataConfig config, decimal leverage)
        {
            _config = config;

            Cache            = new SecurityCache();
            Exchange         = new SecurityExchange(exchangeHours);
            DataFilter       = new SecurityDataFilter();
            PortfolioModel   = new SecurityPortfolioModel();
            TransactionModel = new SecurityTransactionModel();
            MarginModel      = new SecurityMarginModel(leverage);
            Holdings         = new SecurityHolding(this);
        }
예제 #2
0
파일: Security.cs 프로젝트: nooperpudd/Lean
        /// <summary>
        /// Construct a new security vehicle based on the user options.
        /// </summary>
        public Security(SecurityExchangeHours exchangeHours, SubscriptionDataConfig config, decimal leverage)
        {
            _config = config;

            Cache = new SecurityCache();
            Exchange = new SecurityExchange(exchangeHours);
            DataFilter = new SecurityDataFilter();
            PortfolioModel = new SecurityPortfolioModel();
            TransactionModel = new SecurityTransactionModel();
            MarginModel = new SecurityMarginModel(leverage);
            Holdings = new SecurityHolding(this);
        }
예제 #3
0
        /// <summary>
        /// Construct a new security vehicle based on the user options.
        /// </summary>
        public Security(SecurityExchangeHours exchangeHours, SubscriptionDataConfig config, decimal leverage, bool isDynamicallyLoadedData = false)
        {
            _config = config;
            _symbol = config.Symbol;
            _isDynamicallyLoadedData = isDynamicallyLoadedData;

            Cache            = new SecurityCache();
            Exchange         = new SecurityExchange(exchangeHours);
            DataFilter       = new SecurityDataFilter();
            PortfolioModel   = new SecurityPortfolioModel();
            TransactionModel = new SecurityTransactionModel();
            MarginModel      = new SecurityMarginModel(leverage);
            Holdings         = new SecurityHolding(this);
        }
예제 #4
0
파일: Security.cs 프로젝트: reddream/Lean
        /// <summary>
        /// Construct a new security vehicle based on the user options.
        /// </summary>
        public Security(SubscriptionDataConfig config, decimal leverage, bool isDynamicallyLoadedData = false)
        {
            _config = config;
            _symbol = config.Symbol;
            _isDynamicallyLoadedData = isDynamicallyLoadedData;

            Cache = new SecurityCache();
            Exchange = new SecurityExchange();
            DataFilter = new SecurityDataFilter();
            PortfolioModel = new SecurityPortfolioModel();
            TransactionModel = new SecurityTransactionModel();
            MarginModel = new SecurityMarginModel(leverage);
            Holdings = new SecurityHolding(this);
        }