コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniverseSelection"/> class
 /// </summary>
 /// <param name="algorithm">The algorithm to add securities to</param>
 /// <param name="securityService"></param>
 public UniverseSelection(
     IAlgorithm algorithm,
     ISecurityService securityService)
 {
     _algorithm              = algorithm;
     _securityService        = securityService;
     _pendingRemovalsManager = new PendingRemovalsManager(algorithm.Transactions);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniverseSelection"/> class
 /// </summary>
 /// <param name="algorithm">The algorithm to add securities to</param>
 /// <param name="securityService"></param>
 public UniverseSelection(
     IAlgorithm algorithm,
     ISecurityService securityService)
 {
     _algorithm              = algorithm;
     _securityService        = securityService;
     _pendingRemovalsManager = new PendingRemovalsManager(algorithm.Transactions);
     _addedCurrencySubscriptionDataConfigs = new HashSet <SubscriptionDataConfig>();
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UniverseSelection"/> class
        /// </summary>
        /// <param name="algorithm">The algorithm to add securities to</param>
        /// <param name="securityService"></param>
        public UniverseSelection(
            IAlgorithm algorithm,
            ISecurityService securityService)
        {
            _algorithm = algorithm;

            _securityService        = securityService;
            _pendingRemovalsManager = new PendingRemovalsManager(algorithm.Transactions);
            _currencySubscriptionDataConfigManager = new CurrencySubscriptionDataConfigManager(algorithm.Portfolio.CashBook,
                                                                                               algorithm.Securities,
                                                                                               algorithm.SubscriptionManager,
                                                                                               _securityService);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniverseSelection"/> class
 /// </summary>
 /// <param name="algorithm">The algorithm to add securities to</param>
 /// <param name="securityService">The security service</param>
 /// <param name="dataPermissionManager">The data permissions manager</param>
 public UniverseSelection(
     IAlgorithm algorithm,
     ISecurityService securityService,
     IDataPermissionManager dataPermissionManager)
 {
     _algorithm              = algorithm;
     _securityService        = securityService;
     _dataPermissionManager  = dataPermissionManager;
     _pendingRemovalsManager = new PendingRemovalsManager(algorithm.Transactions);
     _currencySubscriptionDataConfigManager = new CurrencySubscriptionDataConfigManager(algorithm.Portfolio.CashBook,
                                                                                        algorithm.Securities,
                                                                                        algorithm.SubscriptionManager,
                                                                                        _securityService,
                                                                                        dataPermissionManager.GetResolution(Resolution.Minute));
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniverseSelection"/> class
 /// </summary>
 /// <param name="algorithm">The algorithm to add securities to</param>
 /// <param name="securityService">The security service</param>
 /// <param name="dataPermissionManager">The data permissions manager</param>
 /// <param name="dataProvider">The data provider to use</param>
 /// <param name="internalConfigResolution">The resolution to use for internal configuration</param>
 public UniverseSelection(
     IAlgorithm algorithm,
     ISecurityService securityService,
     IDataPermissionManager dataPermissionManager,
     IDataProvider dataProvider,
     Resolution internalConfigResolution = Resolution.Minute)
 {
     _dataProvider           = dataProvider;
     _algorithm              = algorithm;
     _securityService        = securityService;
     _dataPermissionManager  = dataPermissionManager;
     _pendingRemovalsManager = new PendingRemovalsManager(algorithm.Transactions);
     _currencySubscriptionDataConfigManager = new CurrencySubscriptionDataConfigManager(algorithm.Portfolio.CashBook,
                                                                                        algorithm.Securities,
                                                                                        algorithm.SubscriptionManager,
                                                                                        _securityService,
                                                                                        dataPermissionManager.GetResolution(Resolution.Minute));
     // TODO: next step is to merge currency internal subscriptions under the same 'internal manager' instance and we could move this directly into the DataManager class
     _internalSubscriptionManager = new InternalSubscriptionManager(_algorithm, internalConfigResolution);
 }