Exemple #1
0
        public LeechApp(ILeechConfig config, IBotManager botManager, IBotsConfiguration botsConfig, ITickDispatcher tickDisp, IDataStorage dataStorage,
                        IInstrumTable insTable, IStopOrderTable stopOrderTable, IOrderTable orderTable, ITradeTable tradeTable,
                        IHoldingTable holdingTable, ICashTable positionTable, AccountTable accountTable, IInsStoreData insStoreData, ILogger logger)
        {
            _config         = config;
            _scheduler      = new Scheduler(logger);
            _botsConfig     = botsConfig;
            _tickDispatcher = tickDisp;
            _botManager     = botManager;
            _dataStorage    = dataStorage;
            _accountTable   = accountTable;
            _instrumTable   = insTable;
            _orderTable     = orderTable;
            _tradeTable     = tradeTable;
            _stopOrderTable = stopOrderTable;
            _holdingTable   = holdingTable;
            _cashTable      = positionTable;
            _insStoreData   = insStoreData;
            _logger         = logger;
            _dataProtect    = IoC.Resolve <DataProtect>();
            _lpClientApp    = new LpClientApp(_dataProtect, _instrumTable, _accountTable, _stopOrderTable, _orderTable,
                                              _tradeTable, _cashTable, _holdingTable, _tickDispatcher, _logger);

            _allTradesData = new AllTradesData(_instrumTable, _insStoreData, _logger);
            _alorTrade     = new AlorTradeWrapper(_instrumTable, _stopOrderTable, _orderTable, _tradeTable,
                                                  _holdingTable, _cashTable, _accountTable,
                                                  _tickDispatcher, _config, _logger);
        }
Exemple #2
0
 public LpClientApp(DataProtect dataProtect, IInstrumTable instrumTable,
                    IAccountTable accountTable, IStopOrderTable stopOrderTable, IOrderTable orderTable, ITradeTable tradeTable,
                    ICashTable positionTable, IHoldingTable holdingTable, ITickDispatcher tickDisp, ILogger logger)
 {
     _dataProtect = dataProtect;
     _socket      = new LpClientSocket();
     _core        = new LpCore(_socket, false); // клиент
     _pipeFactory = new LpAppFactory(_core, instrumTable, accountTable, stopOrderTable, orderTable, tradeTable, positionTable, holdingTable, tickDisp);
     _sysPipe     = new SystemLp(_pipeFactory, _core);
     _logger      = logger;
 }
Exemple #3
0
 public SyncPipe(ILpCore core, IInstrumTable instrumTable, IAccountTable accountTable, IStopOrderTable stopOrderTable,
                 IOrderTable orderTable, ITradeTable tradeTable, ICashTable positionTable, IHoldingTable holdingTable)
 {
     _core           = core;
     _instrumTable   = instrumTable;
     _accountTable   = accountTable;
     _stopOrderTable = stopOrderTable;
     _orderTable     = orderTable;
     _tradeTable     = tradeTable;
     _cashTable      = positionTable;
     _holdingTable   = holdingTable;
 }
Exemple #4
0
 public LpAppFactory(ILpCore core, IInstrumTable instrumTable, IAccountTable accountTable, IStopOrderTable stopOrderTable,
                     IOrderTable orderTable, ITradeTable tradeTable, ICashTable positionTable, IHoldingTable holdingTable, ITickDispatcher tickDisp)
 {
     _core           = core;
     _instrumTable   = instrumTable;
     _accountTable   = accountTable;
     _stopOrderTable = stopOrderTable;
     _orderTable     = orderTable;
     _tradeTable     = tradeTable;
     _positionTable  = positionTable;
     _holdingTable   = holdingTable;
     _tickDisp       = tickDisp;
 }
Exemple #5
0
 public AlorTradeWrapper(IInstrumTable insTable, IStopOrderTable stopOrderTable, IOrderTable orderTable,
                         ITradeTable tradeTable, IHoldingTable holdingTable, ICashTable positionTable,
                         IAccountTable accountTable, ITickDispatcher tickDisp, ILeechConfig config, ILogger logger)
 {
     _instrumTable        = insTable;
     _stopOrderTable      = stopOrderTable;
     _orderTable          = orderTable;
     _tradeTable          = tradeTable;
     _holdingTable        = holdingTable;
     _positionTable       = positionTable;
     _accountTable        = accountTable;
     _tickDispatcher      = tickDisp;
     _leechConfig         = config;
     _logger              = logger;
     _secBoard            = _leechConfig.SecBoard;
     _addHours            = _leechConfig.CorrectHours;
     _startSessionMskTime = _leechConfig.StartSessionMskTime;
     _endSessionMskTime   = _leechConfig.EndSessionMskTime;
 }