public EquityRuleHighProfitFactory( ICostCalculatorFactory costCalculatorFactory, IRevenueCalculatorFactory revenueCalculatorFactory, IExchangeRateProfitCalculator exchangeRateProfitCalculator, IUniverseEquityOrderFilterService orderFilterService, IUniverseEquityMarketCacheFactory equityMarketCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeMarketCacheFactory, IEquityMarketDataCacheStrategyFactory cacheStrategyFactory, ICurrencyConverterService currencyConversionService, ILogger <HighProfitsRule> logger, ILogger <TradingHistoryStack> tradingHistoryLogger) { this._costCalculatorFactory = costCalculatorFactory ?? throw new ArgumentNullException(nameof(costCalculatorFactory)); this._revenueCalculatorFactory = revenueCalculatorFactory ?? throw new ArgumentNullException(nameof(revenueCalculatorFactory)); this._exchangeRateProfitCalculator = exchangeRateProfitCalculator ?? throw new ArgumentNullException( nameof(exchangeRateProfitCalculator)); this._equityMarketCacheFactory = equityMarketCacheFactory ?? throw new ArgumentNullException(nameof(equityMarketCacheFactory)); this._fixedIncomeMarketCacheFactory = fixedIncomeMarketCacheFactory ?? throw new ArgumentNullException(nameof(fixedIncomeMarketCacheFactory)); this._cacheStrategyFactory = cacheStrategyFactory ?? throw new ArgumentNullException(nameof(cacheStrategyFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); this._tradingHistoryLogger = tradingHistoryLogger ?? throw new ArgumentNullException(nameof(tradingHistoryLogger)); this._orderFilterService = orderFilterService ?? throw new ArgumentNullException(nameof(orderFilterService)); this._currencyConversionService = currencyConversionService ?? throw new ArgumentNullException(nameof(currencyConversionService)); }
public MainWindow() { InitializeComponent(); DataContext = _model = new Model(); _currencyConverterService = new CurrencyConverterService(); }
public HistoryController(ITransactionService transactionService, IPaginationProvider <TransactionHistoryDto> paginationProvider, UserManager <User> userManager, ICurrencyConverterService currencyConverterService) { this.transactionService = transactionService; this.paginationProvider = paginationProvider; this.userManager = userManager; this.currencyConverterService = currencyConverterService; }
public CurrencyConvrterViewModel(ICurrencyConverterService currencyConverterService) { this.currencyConverterService = currencyConverterService; ConvertCommand = new RelayCommand(CanConvert, Convert); LoadCountries(); }
public RevenueMarkingCloseCalculator( IMarketTradingHoursService tradingHoursService, ICurrencyConverterService currencyConverterService, ILogger <RevenueCalculator> logger) : base(tradingHoursService, currencyConverterService, logger) { }
public void Setup() { this._currencyConverterService = A.Fake <ICurrencyConverterService>(); this._ruleCtx = A.Fake <ISystemProcessOperationRunRuleContext>(); this._alertStream = A.Fake <IUniverseAlertStream>(); this._clustering = new ClusteringService(); this._equitiesParameters = A.Fake <IWashTradeRuleEquitiesParameters>(); this._logger = A.Fake <ILogger>(); this._ruleRunRepository = A.Fake <IRuleRunDataRequestRepository>(); this._stubRuleRunRepository = A.Fake <IStubRuleRunDataRequestRepository>(); this._loggerEquityCache = A.Fake <ILogger <UniverseEquityMarketCacheFactory> >(); this._loggerFixedIncomeCache = A.Fake <ILogger <UniverseFixedIncomeMarketCacheFactory> >(); this._tradingLogger = A.Fake <ILogger <TradingHistoryStack> >(); this._orderFilter = A.Fake <IUniverseOrderFilter>(); this._equityFactory = new UniverseEquityMarketCacheFactory( this._stubRuleRunRepository, this._ruleRunRepository, this._loggerEquityCache); this._fixedIncomeFactory = new UniverseFixedIncomeMarketCacheFactory( this._stubRuleRunRepository, this._ruleRunRepository, this._loggerFixedIncomeCache); A.CallTo(() => this._orderFilter.Filter(A <IUniverseEvent> .Ignored)) .ReturnsLazily(i => (IUniverseEvent)i.Arguments[0]); A.CallTo(() => this._equitiesParameters.PerformClusteringPositionAnalysis).Returns(true); A.CallTo(() => this._equitiesParameters.ClusteringPercentageValueDifferenceThreshold).Returns(0.05m); }
public CurrencyController(ICurrencyConverterService currencyConverterService, IRequestLoggerService requestLoggerService, CurrencyConverterContext context) { _currencyConverterService = currencyConverterService; _requestLoggerService = requestLoggerService; _context = context; }
public void Setup() { _alertStream = A.Fake <IUniverseAlertStream>(); _equitiesParameters = A.Fake <IHighVolumeRuleEquitiesParameters>(); _ruleCtx = A.Fake <ISystemProcessOperationRunRuleContext>(); _opCtx = A.Fake <ISystemProcessOperationContext>(); _dataRequestRepository = A.Fake <IRuleRunDataRequestRepository>(); _stubDataRequestRepository = A.Fake <IStubRuleRunDataRequestRepository>(); _equityFactoryCache = A.Fake <ILogger <UniverseEquityMarketCacheFactory> >(); _equityFactory = new UniverseEquityMarketCacheFactory(_stubDataRequestRepository, _dataRequestRepository, _equityFactoryCache); _fixedIncomeFactoryCache = A.Fake <ILogger <UniverseFixedIncomeMarketCacheFactory> >(); _fixedIncomeFactory = new UniverseFixedIncomeMarketCacheFactory(_stubDataRequestRepository, _dataRequestRepository, _fixedIncomeFactoryCache); _tradingHoursService = A.Fake <IMarketTradingHoursService>(); _dataRequestSubscriber = A.Fake <IUniverseDataRequestsSubscriber>(); this.currencyConverterService = A.Fake <ICurrencyConverterService>(); _logger = A.Fake <ILogger <IHighVolumeRule> >(); _tradingLogger = A.Fake <ILogger <TradingHistoryStack> >(); _orderFilter = A.Fake <IUniverseOrderFilter>(); A.CallTo(() => _orderFilter.Filter(A <IUniverseEvent> .Ignored)).ReturnsLazily(i => (IUniverseEvent)i.Arguments[0]); A.CallTo(() => _ruleCtx.EndEvent()).Returns(_opCtx); }
public HighMarketCapFilter( IUniverseEquityMarketCacheFactory factory, RuleRunMode ruleRunMode, DecimalRangeRuleFilter marketCap, IMarketTradingHoursService tradingHoursService, ISystemProcessOperationRunRuleContext operationRunRuleContext, IUniverseDataRequestsSubscriber universeDataRequestsSubscriber, ICurrencyConverterService currencyConverterService, string ruleName, ILogger <HighMarketCapFilter> logger ) { _universeEquityInterdayCache = factory?.BuildInterday(ruleRunMode) ?? throw new ArgumentNullException(nameof(factory)); _ruleRunMode = ruleRunMode; _marketCapFilter = marketCap ?? DecimalRangeRuleFilter.None(); _tradingHoursService = tradingHoursService ?? throw new ArgumentNullException(nameof(tradingHoursService)); _operationRunRuleContext = operationRunRuleContext ?? throw new ArgumentNullException(nameof(operationRunRuleContext)); _universeDataRequestsSubscriber = universeDataRequestsSubscriber; this.currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); _name = ruleName; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="HighVolumeRule"/> class. /// </summary> /// <param name="equitiesParameters"> /// The equities parameters. /// </param> /// <param name="operationContext"> /// The operation context. /// </param> /// <param name="alertStream"> /// The alert stream. /// </param> /// <param name="orderFilter"> /// The order filter. /// </param> /// <param name="equityMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="fixedIncomeMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="tradingHoursService"> /// The trading hours service. /// </param> /// <param name="dataRequestSubscriber"> /// The data request subscriber. /// </param> /// <param name="currencyConverterService"> /// The currency converter service. /// </param> /// <param name="runMode"> /// The run mode. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="tradingHistoryLogger"> /// The trading history logger. /// </param> public HighVolumeRule( IHighVolumeRuleEquitiesParameters equitiesParameters, ISystemProcessOperationRunRuleContext operationContext, IUniverseAlertStream alertStream, IUniverseOrderFilter orderFilter, IUniverseEquityMarketCacheFactory equityMarketCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeMarketCacheFactory, IMarketTradingHoursService tradingHoursService, IUniverseDataRequestsSubscriber dataRequestSubscriber, ICurrencyConverterService currencyConverterService, RuleRunMode runMode, ILogger <IHighVolumeRule> logger, ILogger <TradingHistoryStack> tradingHistoryLogger) : base( equitiesParameters?.Windows.BackwardWindowSize ?? TimeSpan.FromDays(1), equitiesParameters?.Windows.BackwardWindowSize ?? TimeSpan.FromDays(1), equitiesParameters?.Windows?.FutureWindowSize ?? TimeSpan.Zero, Domain.Surveillance.Scheduling.Rules.HighVolume, EquityRuleHighVolumeFactory.Version, "High Volume Rule", operationContext, equityMarketCacheFactory, fixedIncomeMarketCacheFactory, runMode, logger, tradingHistoryLogger) { this.EquitiesParameters = equitiesParameters ?? throw new ArgumentNullException(nameof(equitiesParameters)); this.AlertStream = alertStream ?? throw new ArgumentNullException(nameof(alertStream)); this.OrderFilter = orderFilter ?? throw new ArgumentNullException(nameof(orderFilter)); this.TradingHoursService = tradingHoursService ?? throw new ArgumentNullException(nameof(tradingHoursService)); this.DataRequestSubscriber = dataRequestSubscriber ?? throw new ArgumentNullException(nameof(dataRequestSubscriber)); this.CurrencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this.Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="HighProfitMarketClosureRule"/> class. /// </summary> /// <param name="equitiesParameters"> /// The equities parameters. /// </param> /// <param name="ruleContext"> /// The rule context. /// </param> /// <param name="costCalculatorFactory"> /// The cost calculator factory. /// </param> /// <param name="revenueCalculatorFactory"> /// The revenue calculator factory. /// </param> /// <param name="exchangeRateProfitCalculator"> /// The exchange rate profit calculator. /// </param> /// <param name="orderFilter"> /// The order filter. /// </param> /// <param name="equityMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="fixedIncomeMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="marketDataCacheFactory"> /// The market data cache factory. /// </param> /// <param name="dataRequestSubscriber"> /// The data request subscriber. /// </param> /// <param name="judgementService"> /// The judgement service. /// </param> /// <param name="runMode"> /// The run mode. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="tradingHistoryLogger"> /// The trading history logger. /// </param> public HighProfitMarketClosureRule( IHighProfitsRuleEquitiesParameters equitiesParameters, ISystemProcessOperationRunRuleContext ruleContext, ICostCalculatorFactory costCalculatorFactory, IRevenueCalculatorFactory revenueCalculatorFactory, IExchangeRateProfitCalculator exchangeRateProfitCalculator, IUniverseOrderFilter orderFilter, IUniverseEquityMarketCacheFactory equityMarketCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeMarketCacheFactory, IEquityMarketDataCacheStrategyFactory marketDataCacheFactory, IUniverseDataRequestsSubscriber dataRequestSubscriber, IHighProfitJudgementService judgementService, ICurrencyConverterService currencyConverterService, RuleRunMode runMode, ILogger <HighProfitsRule> logger, ILogger <TradingHistoryStack> tradingHistoryLogger) : base( equitiesParameters, ruleContext, costCalculatorFactory, revenueCalculatorFactory, exchangeRateProfitCalculator, orderFilter, equityMarketCacheFactory, fixedIncomeMarketCacheFactory, marketDataCacheFactory, dataRequestSubscriber, judgementService, currencyConverterService, runMode, logger, tradingHistoryLogger) { this.MarketClosureRule = true; }
/// <summary> /// Initializes a new instance of the <see cref="WashTradeRule"/> class. /// </summary> /// <param name="equitiesParameters"> /// The equities parameters. /// </param> /// <param name="ruleContext"> /// The rule context. /// </param> /// <param name="clustering"> /// The clustering. /// </param> /// <param name="alertStream"> /// The alert stream. /// </param> /// <param name="currencyConverterService"> /// The currency converter service. /// </param> /// <param name="orderFilter"> /// The order filter. /// </param> /// <param name="equityMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="fixedIncomeMarketCacheFactory"> /// The market cache factory. /// </param> /// <param name="runMode"> /// The run mode. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="tradingHistoryLogger"> /// The trading history logger. /// </param> public WashTradeRule( IWashTradeRuleEquitiesParameters equitiesParameters, ISystemProcessOperationRunRuleContext ruleContext, IClusteringService clustering, IUniverseAlertStream alertStream, ICurrencyConverterService currencyConverterService, IUniverseOrderFilter orderFilter, IUniverseEquityMarketCacheFactory equityMarketCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeMarketCacheFactory, RuleRunMode runMode, ILogger logger, ILogger <TradingHistoryStack> tradingHistoryLogger) : base( equitiesParameters?.Windows?.BackwardWindowSize ?? TimeSpan.FromDays(1), equitiesParameters?.Windows?.BackwardWindowSize ?? TimeSpan.FromDays(1), equitiesParameters?.Windows?.FutureWindowSize ?? TimeSpan.Zero, Rules.WashTrade, EquityRuleWashTradeFactory.Version, "Wash Trade Rule", ruleContext, equityMarketCacheFactory, fixedIncomeMarketCacheFactory, runMode, logger, tradingHistoryLogger) { this.equitiesParameters = equitiesParameters ?? throw new ArgumentNullException(nameof(equitiesParameters)); this.clustering = clustering ?? throw new ArgumentNullException(nameof(clustering)); this.currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this.orderFilter = orderFilter ?? throw new ArgumentNullException(nameof(orderFilter)); this.alertStream = alertStream ?? throw new ArgumentNullException(nameof(alertStream)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="FixedIncomeHighProfitFactory"/> class. /// </summary> /// <param name="fixedIncomeOrderFilterService"> /// The fixed income order filter service. /// </param> /// <param name="equityCacheFactory"> /// The market cache factory. /// </param> /// <param name="fixedIncomeCacheFactory"> /// The market cache factory. /// </param> /// <param name="marketDataCacheStrategyFactory"> /// The market data cache strategy factory. /// </param> /// <param name="costCalculatorFactory"> /// The cost calculator factory. /// </param> /// <param name="revenueCalculatorFactory"> /// The revenue calculator factory. /// </param> /// <param name="exchangeRateProfitCalculator"> /// The exchange rate profit calculator. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="stackLogger"> /// The stack logger. /// </param> public FixedIncomeHighProfitFactory( IUniverseFixedIncomeOrderFilterService fixedIncomeOrderFilterService, IUniverseEquityMarketCacheFactory equityCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeCacheFactory, IFixedIncomeMarketDataCacheStrategyFactory marketDataCacheStrategyFactory, ICostCalculatorFactory costCalculatorFactory, IRevenueCalculatorFactory revenueCalculatorFactory, IExchangeRateProfitCalculator exchangeRateProfitCalculator, ICurrencyConverterService currencyConverterService, ILogger <FixedIncomeHighProfitsRule> logger, ILogger <TradingHistoryStack> stackLogger) { this.fixedIncomeOrderFilterService = fixedIncomeOrderFilterService ?? throw new ArgumentNullException(nameof(fixedIncomeOrderFilterService)); this.equityMarketCacheFactory = equityCacheFactory ?? throw new ArgumentNullException(nameof(equityCacheFactory)); this.fixedIncomeCacheFactory = fixedIncomeCacheFactory ?? throw new ArgumentNullException(nameof(fixedIncomeCacheFactory)); this.marketDataCacheStrategyFactory = marketDataCacheStrategyFactory ?? throw new ArgumentNullException(nameof(marketDataCacheStrategyFactory)); this.costCalculatorFactory = costCalculatorFactory ?? throw new ArgumentNullException(nameof(costCalculatorFactory)); this.revenueCalculatorFactory = revenueCalculatorFactory ?? throw new ArgumentNullException(nameof(revenueCalculatorFactory)); this.exchangeRateProfitCalculator = exchangeRateProfitCalculator ?? throw new ArgumentNullException(nameof(exchangeRateProfitCalculator)); this.currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.stackLogger = stackLogger ?? throw new ArgumentNullException(nameof(stackLogger)); }
public RevenueCurrencyConvertingMarkingCloseCalculator( Domain.Core.Financial.Money.Currency targetCurrency, ICurrencyConverterService currencyConverterService, IMarketTradingHoursService tradingHoursService, ILogger <RevenueCurrencyConvertingCalculator> logger) : base(targetCurrency, currencyConverterService, tradingHoursService, logger) { }
public YahooCurrencyRatiosController( ILogger <YahooCurrencyRatiosController> logger, ICurrencyConverterService _converter ) { Logger = logger; ConvSvc = _converter; }
/// <summary> /// Initializes a new instance of the <see cref="FixedIncomeHighProfitsStreamRule"/> class. /// Constructor for the high profits stream rule /// </summary> /// <param name="fixedIncomeParameters"> /// parameters from the client service user interface /// </param> /// <param name="ruleContext"> /// auditing helper /// </param> /// <param name="costCalculatorFactory"> /// cost logic service factory /// </param> /// <param name="revenueCalculatorFactory"> /// revenue logic service factory /// </param> /// <param name="exchangeRateProfitCalculator"> /// exchange rate service /// </param> /// <param name="orderFilter"> /// classification financial instruments filtering service /// </param> /// <param name="equityMarketCacheFactory"> /// time bar cache factory /// </param> /// /// <param name="fixedIncomeMarketCacheFactory"> /// time bar cache factory /// </param> /// <param name="marketDataCacheFactory"> /// market time bar cache factory /// </param> /// <param name="dataRequestSubscriber"> /// data fetch pattern helper /// </param> /// <param name="judgementService"> /// rule analysis service /// </param> /// <param name="runMode"> /// forced or validation /// </param> /// <param name="logger"> /// logging helper /// </param> /// <param name="tradingHistoryLogger"> /// logging helper for trading history /// </param> public FixedIncomeHighProfitsStreamRule( IHighProfitsRuleFixedIncomeParameters fixedIncomeParameters, ISystemProcessOperationRunRuleContext ruleContext, ICostCalculatorFactory costCalculatorFactory, IRevenueCalculatorFactory revenueCalculatorFactory, IExchangeRateProfitCalculator exchangeRateProfitCalculator, IUniverseFixedIncomeOrderFilterService orderFilter, IUniverseEquityMarketCacheFactory equityMarketCacheFactory, IUniverseFixedIncomeMarketCacheFactory fixedIncomeMarketCacheFactory, IFixedIncomeMarketDataCacheStrategyFactory marketDataCacheFactory, IUniverseDataRequestsSubscriber dataRequestSubscriber, IFixedIncomeHighProfitJudgementService judgementService, ICurrencyConverterService currencyService, RuleRunMode runMode, ILogger <FixedIncomeHighProfitsRule> logger, ILogger <TradingHistoryStack> tradingHistoryLogger) : base( fixedIncomeParameters?.Windows?.BackwardWindowSize ?? TimeSpan.FromHours(8), fixedIncomeParameters?.Windows?.BackwardWindowSize ?? TimeSpan.FromHours(8), fixedIncomeParameters?.Windows?.FutureWindowSize ?? TimeSpan.Zero, Domain.Surveillance.Scheduling.Rules.FixedIncomeHighProfits, FixedIncomeHighProfitFactory.Version, "Fixed Income High Profit Rule", ruleContext, equityMarketCacheFactory, fixedIncomeMarketCacheFactory, runMode, logger, tradingHistoryLogger) { this.FixedIncomeParameters = fixedIncomeParameters ?? throw new ArgumentNullException(nameof(fixedIncomeParameters)); this.RuleCtx = ruleContext ?? throw new ArgumentNullException(nameof(ruleContext)); this.costCalculatorFactory = costCalculatorFactory ?? throw new ArgumentNullException(nameof(costCalculatorFactory)); this.revenueCalculatorFactory = revenueCalculatorFactory ?? throw new ArgumentNullException(nameof(revenueCalculatorFactory)); this.marketDataCacheFactory = marketDataCacheFactory ?? throw new ArgumentNullException(nameof(marketDataCacheFactory)); this.exchangeRateProfitCalculator = exchangeRateProfitCalculator ?? throw new ArgumentNullException( nameof(exchangeRateProfitCalculator)); this.orderFilter = orderFilter ?? throw new ArgumentNullException(nameof(orderFilter)); this.dataRequestSubscriber = dataRequestSubscriber ?? throw new ArgumentNullException(nameof(dataRequestSubscriber)); this.JudgementService = judgementService ?? throw new ArgumentNullException(nameof(judgementService)); this.currencyConverterService = currencyService ?? throw new ArgumentNullException(nameof(currencyService)); this.Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="RevenueCalculator"/> class. /// </summary> /// <param name="tradingHoursService"> /// The trading hours service. /// </param> /// <param name="logger"> /// The logger. /// </param> public RevenueCalculator( IMarketTradingHoursService tradingHoursService, ICurrencyConverterService currencyConverterService, ILogger <RevenueCalculator> logger) { this.TradingHoursService = tradingHoursService ?? throw new ArgumentNullException(nameof(tradingHoursService)); this.CurrencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this.Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public CostCalculatorFactory( ICurrencyConverterService currencyConverterService, ILogger <CostCalculator> logger, ILogger <CostCurrencyConvertingCalculator> currencyLogger) { this._currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); this._currencyLogger = currencyLogger ?? throw new ArgumentNullException(nameof(currencyLogger)); }
/// <param name="db">Database context</param> /// <param name="mapper"></param> /// <param name="manager">Customer manager</param> /// <param name="currencyConverterService">Currency converter</param> public OrderService( MainDataContext db, IMapper mapper, ICustomerManager manager, ICurrencyConverterService currencyConverterService) : base(db, mapper) { this.manager = manager; this.currencyConverterService = currencyConverterService; }
public CostCurrencyConvertingCalculator( ICurrencyConverterService currencyConverterService, Domain.Core.Financial.Money.Currency targetCurrency, ILogger <CostCurrencyConvertingCalculator> logger) { this._currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); this._targetCurrency = targetCurrency; this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public PositionPerCurrencyCalculatorService(ISourceCache <Trade, long> myTrades, ISourceCache <CurPositionPerClient, string> curPositionPerClient, ICurrencyConverterService currencyConverter, ISubscriberCommunicator communicator = null) : base(communicator) { this.currencyConverter = currencyConverter; this.myTrades = myTrades; this.curPositionPerClient = curPositionPerClient; }
public HighMarketCapFilterFactory( ICurrencyConverterService currencyConverterService, IUniverseEquityMarketCacheFactory universeMarketCacheFactory, IMarketTradingHoursService tradingHoursService, ILoggerFactory loggerFactory) { this.currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); _universeMarketCacheFactory = universeMarketCacheFactory ?? throw new ArgumentNullException(nameof(universeMarketCacheFactory)); _tradingHoursService = tradingHoursService ?? throw new ArgumentNullException(nameof(tradingHoursService)); _loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); }
public void Setup() { this.exchangeRates = new Mock <IExchangeRates>(); this.currencyConverter = new CurrencyConverterService(this.exchangeRates.Object); this.rates = new FXRates(); this.rates.Rates = new Dictionary <string, string>(); this.rates.Rates.Add("GBP", "1.0"); this.rates.Rates.Add("EUR", "1.16"); this.rates.Rates.Add("MXN", "28.66"); }
public RevenueCurrencyConvertingCalculator( Domain.Core.Financial.Money.Currency targetCurrency, ICurrencyConverterService currencyConverterService, IMarketTradingHoursService tradingHoursService, ILogger <RevenueCurrencyConvertingCalculator> logger) { _targetCurrency = targetCurrency; _currencyConverterService = currencyConverterService ?? throw new ArgumentNullException(nameof(currencyConverterService)); TradingHoursService = tradingHoursService ?? throw new ArgumentNullException(nameof(tradingHoursService)); Logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public UpdateTradesService(ISourceCache <Trade, long> myTrades, ISourceCache <Quote, string> quotes, ICurrencyConverterService currencyConverter, ISourceCache <Trade, long> myTradesQuoteUpdate, ISubscriberCommunicator communicator = null) : base(communicator) { this.myTrades = myTrades; this.quotes = quotes; this.currencyConverter = currencyConverter; this.myTradesQuoteUpdate = myTradesQuoteUpdate; }
public MainPageViewModel(ICurrencyConverterService currencyConverter, ICurrencyListService currencyList, IAnalyticsService analyticsService, INavigationCache navigationCache, IModelFactory modelFactory) : base(analyticsService, navigationCache) { _currencyConverter = currencyConverter; _currencyList = currencyList; _modelFactory = modelFactory; SetSelectedCurrenciesIfPossible(); }
public void SetUp() { this.currencyConverterService = A.Fake <ICurrencyConverterService>(); _universeMarketCacheFactory = A.Fake <IUniverseEquityMarketCacheFactory>(); _universeEquityInterDayCache = A.Fake <IUniverseEquityInterDayCache>(); _universeDataRequestsSubscriber = A.Fake <IUniverseDataRequestsSubscriber>(); A.CallTo(() => _universeMarketCacheFactory.BuildInterday(Engine.Rules.Rules.RuleRunMode.ValidationRun)) .Returns(_universeEquityInterDayCache); _tradingHoursService = A.Fake <IMarketTradingHoursService>(); _operationRunRuleContext = A.Fake <ISystemProcessOperationRunRuleContext>(); _logger = A.Fake <ILogger <HighMarketCapFilter> >(); }
public StopOutExecutorService(ISourceCache <Quote, string> quotes, ISourceCache <BalancePerClient, long> clientBalances, ISourceCache <CurPairPositionPerClient, string> curPairPositionPerClient, ITradesModifierService tradesModifierService, ICurrencyConverterService currencyConverterService, ISubscriberCommunicator communicator = null) : base(communicator) { this.quotes = quotes; this.clientBalances = clientBalances; this.curPairPositionPerClient = curPairPositionPerClient; this.tradesModifierService = tradesModifierService; this.currencyConverterService = currencyConverterService; }
public Worker(IServiceScopeFactory serviceScopeFactory) { using var scope = serviceScopeFactory.CreateScope(); _currencyConverterService = scope.ServiceProvider.GetRequiredService <ICurrencyConverterService>(); _loggerService = scope.ServiceProvider.GetRequiredService <ILoggerService>(); _countMinutes = int.Parse(scope.ServiceProvider.GetRequiredService <IConfiguration>().GetSection("TimeInMinutes").Value) * 60; if (_countMinutes == 0) { _countMinutes = 1; } }
public void Setup() { this._currencyConverterService = A.Fake <ICurrencyConverterService>(); this._clustering = A.Fake <IClusteringService>(); this._orderFilterService = A.Fake <IUniverseEquityOrderFilterService>(); this._equityFactory = A.Fake <IUniverseEquityMarketCacheFactory>(); this._fixedIncomeFactory = A.Fake <IUniverseFixedIncomeMarketCacheFactory>(); this._logger = new NullLogger <WashTradeRule>(); this._tradingHistoryLogger = new NullLogger <TradingHistoryStack>(); this._equitiesParameters = A.Fake <IWashTradeRuleEquitiesParameters>(); this._ruleCtx = A.Fake <ISystemProcessOperationRunRuleContext>(); this._alertStream = A.Fake <IUniverseAlertStream>(); }
public void Setup() { _orderFilterService = A.Fake <IUniverseEquityOrderFilterService>(); _equityFactory = A.Fake <IUniverseEquityMarketCacheFactory>(); _fixedIncomeFactory = A.Fake <IUniverseFixedIncomeMarketCacheFactory>(); _tradingHoursService = A.Fake <IMarketTradingHoursService>(); this.currencyConverterService = A.Fake <ICurrencyConverterService>(); _logger = A.Fake <ILogger <IHighVolumeRule> >(); _tradingHistoryLogger = A.Fake <ILogger <TradingHistoryStack> >(); _equitiesParameters = A.Fake <IHighVolumeRuleEquitiesParameters>(); _opCtx = A.Fake <ISystemProcessOperationRunRuleContext>(); _alertStream = A.Fake <IUniverseAlertStream>(); _dataRequestSubscriber = A.Fake <IUniverseDataRequestsSubscriber>(); }