Example #1
0
 public TradesController(
     ITradesRepository tradesRepository,
     IConvertService convertService)
 {
     _tradesRepository = tradesRepository;
     _convertService   = convertService;
 }
Example #2
0
 public ScheduledTask(
     ILogger <ScheduledTask> logger,
     ITradesRepository tradesRepo,
     ICoinTrackingRepository coinTrackingRepo)
 {
     _logger           = logger;
     _tradesRepo       = tradesRepo;
     _coinTrackingRepo = coinTrackingRepo;
 }
Example #3
0
        public StatementHandler(IDBContext context, IDialogCoordinator dialogService, IDataSourcer dataSourcer, ITradesRepository repository, IMainViewModel mainVm)
        {
            _dialogService = dialogService;

            AssembleComponents();

            DownloaderNames = StatementDownloaders.Select(x => x.Metadata.Name).ToList();
            ParserNames = StatementParsers.Select(x => x.Metadata.Name).ToList();

            _tradeRepository = repository;
            _mainVm = mainVm;
        }
Example #4
0
        public StatementHandler(IDBContext context, IDialogCoordinator dialogService, IDataSourcer dataSourcer, ITradesRepository repository, IMainViewModel mainVm)
        {
            _dialogService = dialogService;

            AssembleComponents();

            DownloaderNames = StatementDownloaders.Select(x => x.Metadata.Name).ToList();
            ParserNames     = StatementParsers.Select(x => x.Metadata.Name).ToList();

            _tradeRepository = repository;
            _mainVm          = mainVm;
        }
        public FXTransactionsPageViewModel(IDBContext context, IDataSourcer datasourcer, IDialogCoordinator dialogService, IMainViewModel mainVm)
            : base(dialogService)
        {
            Context          = context;
            _mainVm          = mainVm;
            TradesRepository = mainVm.TradesRepository;

            FXTransactions        = new CollectionViewSource();
            FXTransactions.Source = Context.FXTransactions.Local;
            FXTransactions.View.SortDescriptions.Add(new SortDescription("DateTime", ListSortDirection.Descending));

            CreateCommands();
        }
Example #6
0
 public TradesChecker(
     string sqlConnecctionString,
     ITradesRepository repository,
     IClientAccountClient clientAccountClient,
     ILog log)
     : base(
         sqlConnecctionString,
         false,
         repository,
         log)
 {
     _clientAccountClient = clientAccountClient;
 }
        public FXTransactionsPageViewModel(IDBContext context, IDataSourcer datasourcer, IDialogCoordinator dialogService, IMainViewModel mainVm)
            : base(dialogService)
        {
            Context = context;
            _mainVm = mainVm;
            TradesRepository = mainVm.TradesRepository;

            FXTransactions = new CollectionViewSource();
            FXTransactions.Source = Context.FXTransactions.Local;
            FXTransactions.View.SortDescriptions.Add(new SortDescription("DateTime", ListSortDirection.Descending));

            CreateCommands();
        }
Example #8
0
 public LimitOrdersChecker(
     string sqlConnecctionString,
     ILimitOrdersRepository repository,
     ITradesRepository tradesRepository,
     IMarketOrdersRepository marketOrdersRepository,
     ILog log)
     : base(
         sqlConnecctionString,
         true,
         repository,
         log)
 {
     _tradesRepository       = tradesRepository;
     _marketOrdersRepository = marketOrdersRepository;
 }
Example #9
0
        public TradesPageViewModel(IDBContext context, IDialogCoordinator dialogService, IDataSourcer datasourcer, MainViewModel parent)
            : base(dialogService)
        {
            Context          = context;
            Parent           = parent;
            Datasourcer      = datasourcer;
            TradesRepository = parent.TradesRepository;

            TradesSource        = new CollectionViewSource();
            TradesSource.Source = Context.Trades.Local;
            TradesSource.View.SortDescriptions.Add(new SortDescription("DateOpened", ListSortDirection.Descending));

            Strategies = new ObservableCollection <Strategy>();

            CreateCommands();
        }
Example #10
0
        public TradesPageViewModel(IDBContext context, IDialogCoordinator dialogService, IDataSourcer datasourcer, MainViewModel parent)
            : base(dialogService)
        {
            Context = context;
            Parent = parent;
            Datasourcer = datasourcer;
            TradesRepository = parent.TradesRepository;

            TradesSource = new CollectionViewSource();
            TradesSource.Source = Context.Trades.Local;
            TradesSource.View.SortDescriptions.Add(new SortDescription("DateOpened", ListSortDirection.Descending));

            Strategies = new ObservableCollection<Strategy>();

            CreateCommands();
        }
Example #11
0
 public Application(
     CorrelationContextAccessor correlationContextAccessor,
     RabbitMqCorrelationManager correlationManager,
     ILoggerFactory loggerFactory,
     IOrdersHistoryRepository ordersHistoryRepository,
     ITradesRepository tradesRepository,
     ILog logger,
     Settings settings, CurrentApplicationInfo applicationInfo,
     ISlackNotificationsSender slackNotificationsSender) : base(correlationManager,
                                                                loggerFactory, logger, slackNotificationsSender, applicationInfo)
 {
     _correlationContextAccessor = correlationContextAccessor;
     _ordersHistoryRepository    = ordersHistoryRepository;
     _tradesRepository           = tradesRepository;
     _log      = logger;
     _settings = settings;
 }
Example #12
0
        public OrdersPageViewModel(IDBContext context, IDialogCoordinator dialogService, IDataSourcer datasourcer, IMainViewModel parent)
            : base(dialogService)
        {
            Context = context;
            Parent = parent;
            Datasourcer = datasourcer;

            TradesRepository = parent.TradesRepository;

            OrdersSource = new CollectionViewSource();
            OrdersSource.Source = Context.Orders.Local;
            OrdersSource.SortDescriptions.Add(new SortDescription("TradeDate", ListSortDirection.Descending));

            ExecutionStatsGenerator = new ExecutionStatsGenerator(datasourcer);

            CreateCommands();
        }
Example #13
0
        public OrdersPageViewModel(IDBContext context, IDialogCoordinator dialogService, IDataSourcer datasourcer, IMainViewModel parent)
            : base(dialogService)
        {
            Context     = context;
            Parent      = parent;
            Datasourcer = datasourcer;

            TradesRepository = parent.TradesRepository;

            OrdersSource        = new CollectionViewSource();
            OrdersSource.Source = Context.Orders.Local;
            OrdersSource.SortDescriptions.Add(new SortDescription("TradeDate", ListSortDirection.Descending));

            ExecutionStatsGenerator = new ExecutionStatsGenerator(datasourcer);

            CreateCommands();
        }
 public OrdersService(
     IPricesService pricesService,
     IInstrumentsAccessService instrumentsAccessService,
     IInternalTransfersService internalTransfersService,
     IAssetsServiceWithCache assetsService,
     IOrdersRepository ordersRepository,
     ISettingsService settingsService,
     ITradesRepository tradesRepository,
     ILogFactory logFactory)
 {
     _pricesService            = pricesService;
     _internalTransfersService = internalTransfersService;
     _assetsService            = assetsService;
     _ordersRepository         = ordersRepository;
     _settingsService          = settingsService;
     _tradesRepository         = tradesRepository;
     _instrumentsAccessService = instrumentsAccessService;
     _log = logFactory.CreateLog(this);
 }
Example #15
0
 protected OrderScriptBase(ITradesRepository tradesRepository)
 {
     OpenTrades = tradesRepository.Get(x => x.Open).ToList();
     TradesRepository = tradesRepository;
 }
Example #16
0
 protected TradeScriptBase(ITradesRepository repository, List<Tag> tags, List<Strategy> strategies)
 {
     TradesRepository = repository;
     Tags = tags;
     Strategies = strategies;
 }
Example #17
0
 public static List <TradeScriptBase> LoadTradeScripts(ITradesRepository tradesRepo, List <Strategy> strategies, List <Tag> tags)
 {
     return(LoadUserScripts <TradeScriptBase>(_tradeScriptTypes, tradesRepo, tags, strategies));
 }
Example #18
0
 public static List <OrderScriptBase> LoadOrderScripts(ITradesRepository repository)
 {
     return(LoadUserScripts <OrderScriptBase>(_orderScriptTypes, repository));
 }
 public TradesController(ITradesRepository tradesRepository)
 {
     _tradesRepository = tradesRepository;
 }
 public TradesBusinessLogic(ITradesRepository tradesRepository)
 {
     _tradesRepository = tradesRepository;
 }
Example #21
0
 protected TradeScriptBase(ITradesRepository repository, List <Tag> tags, List <Strategy> strategies)
 {
     TradesRepository = repository;
     Tags             = tags;
     Strategies       = strategies;
 }
Example #22
0
 protected OrderScriptBase(ITradesRepository tradesRepository)
 {
     OpenTrades       = tradesRepository.Get(x => x.Open).ToList();
     TradesRepository = tradesRepository;
 }
Example #23
0
 public ScriptRunner(ITradesRepository repository)
 {
     _repository = repository;
 }
Example #24
0
 public ScriptRunner(ITradesRepository repository)
 {
     _repository = repository;
 }