/// <summary> /// Construct a new security vehicle based on the user options. /// </summary> protected Security(SubscriptionDataConfig config, Cash quoteCurrency, SymbolProperties symbolProperties, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter ) { if (symbolProperties == null) { throw new ArgumentNullException("symbolProperties", "Security requires a valid SymbolProperties instance."); } if (symbolProperties.QuoteCurrency != quoteCurrency.Symbol) { throw new ArgumentException("symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol"); } _config = config; QuoteCurrency = quoteCurrency; SymbolProperties = symbolProperties; Cache = cache; Exchange = exchange; DataFilter = dataFilter; PortfolioModel = portfolioModel; MarginModel = marginModel; FillModel = fillModel; FeeModel = feeModel; SlippageModel = slippageModel; SettlementModel = settlementModel; Holdings = new SecurityHolding(this); }
/// <summary> /// Temporary convenience constructor /// </summary> protected Security(SubscriptionDataConfig config, Cash quoteCurrency, SymbolProperties symbolProperties, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, IVolatilityModel volatilityModel, IBuyingPowerModel buyingPowerModel, ISecurityDataFilter dataFilter, IPriceVariationModel priceVariationModel, ICurrencyConverter currencyConverter, IRegisteredSecurityDataTypesProvider registeredTypesProvider ) : this(config.Symbol, quoteCurrency, symbolProperties, exchange, cache, portfolioModel, fillModel, feeModel, slippageModel, settlementModel, volatilityModel, buyingPowerModel, dataFilter, priceVariationModel, currencyConverter, registeredTypesProvider ) { SubscriptionsBag.Add(config); UpdateSubscriptionProperties(); }
/// <summary> /// Construct a new security vehicle based on the user options. /// </summary> protected Security(SubscriptionDataConfig config, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter ) { _config = config; Cache = cache; Exchange = exchange; DataFilter = dataFilter; PortfolioModel = portfolioModel; MarginModel = marginModel; FillModel = fillModel; FeeModel = feeModel; SlippageModel = slippageModel; SettlementModel = settlementModel; Holdings = new SecurityHolding(this); }
/// <summary> /// Construct a new security vehicle based on the user options. /// </summary> protected Security(SubscriptionDataConfig config, Cash quoteCurrency, SymbolProperties symbolProperties, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter ) { if (symbolProperties == null) { throw new ArgumentNullException("symbolProperties", "Security requires a valid SymbolProperties instance."); } if (symbolProperties.QuoteCurrency != quoteCurrency.Symbol) { throw new ArgumentException("symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol"); } _config = config; QuoteCurrency = quoteCurrency; SymbolProperties = symbolProperties; Cache = cache; Exchange = exchange; DataFilter = dataFilter; PortfolioModel = portfolioModel; MarginModel = marginModel; FillModel = fillModel; FeeModel = feeModel; SlippageModel = slippageModel; SettlementModel = settlementModel; Holdings = new SecurityHolding(this); }
/// <summary> /// Temporary convenience constructor /// </summary> protected Security(SubscriptionDataConfig config, Cash quoteCurrency, SymbolProperties symbolProperties, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, IVolatilityModel volatilityModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter ) : this(config.Symbol, quoteCurrency, symbolProperties, exchange, cache, portfolioModel, fillModel, feeModel, slippageModel, settlementModel, volatilityModel, marginModel, dataFilter ) { SubscriptionsBag.Add(config); }
/// <summary> /// Construct a new security vehicle based on the user options. /// </summary> protected Security(Symbol symbol, Cash quoteCurrency, SymbolProperties symbolProperties, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, IVolatilityModel volatilityModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter, IPriceVariationModel priceVariationModel ) { if (symbolProperties == null) { throw new ArgumentNullException("symbolProperties", "Security requires a valid SymbolProperties instance."); } if (symbolProperties.QuoteCurrency != quoteCurrency.Symbol) { throw new ArgumentException("symbolProperties.QuoteCurrency must match the quoteCurrency.Symbol"); } _symbol = symbol; SubscriptionsBag = new ConcurrentBag<SubscriptionDataConfig>(); QuoteCurrency = quoteCurrency; SymbolProperties = symbolProperties; IsTradable = true; Cache = cache; Exchange = exchange; DataFilter = dataFilter; PriceVariationModel = priceVariationModel; PortfolioModel = portfolioModel; MarginModel = marginModel; FillModel = fillModel; FeeModel = feeModel; SlippageModel = slippageModel; SettlementModel = settlementModel; VolatilityModel = volatilityModel; Holdings = new SecurityHolding(this); }
/// <summary> /// Construct a new security vehicle based on the user options. /// </summary> protected Security(SubscriptionDataConfig config, SecurityExchange exchange, SecurityCache cache, ISecurityPortfolioModel portfolioModel, IFillModel fillModel, IFeeModel feeModel, ISlippageModel slippageModel, ISettlementModel settlementModel, ISecurityMarginModel marginModel, ISecurityDataFilter dataFilter ) { _config = config; Cache = cache; Exchange = exchange; DataFilter = dataFilter; PortfolioModel = portfolioModel; MarginModel = marginModel; FillModel = fillModel; FeeModel = feeModel; SlippageModel = slippageModel; SettlementModel = settlementModel; Holdings = new SecurityHolding(this); }