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); }
public PosManager(int insID, IInstrumTable instrums, IHoldingTable holdings, IOrderTable orders, IAccountTable accounts, AlorTradeWrapper alorTrade) { _holdings = holdings; _orders = orders; _instrum = instrums.GetInstrum(insID); if (_instrum == null) { throw new Exception("Инструмент не найден"); } _account = accounts.GetDefaultAccount(); if (_account == null) { throw new Exception("Не найден торговый счет"); } _alorTrade = alorTrade; }
public LeechPlatform(ITickDispatcher tickDisp, IInstrumTable insTable, IHoldingTable holdTable, IOrderTable orderTable, IAccountTable accountTable, AlorTradeWrapper alorTrade, ILogger logger, IInsStoreBL insStoreBL, ILeechConfig leechConfig) { _tickDisp = tickDisp; _instrumTable = insTable; _holdingTable = holdTable; _orderTable = orderTable; _accountTable = accountTable; _alorTrade = alorTrade; _logger = logger; _insStoreBL = insStoreBL; _leechConfig = leechConfig; _barRows = new List <BarRow>(); _onTimer = null; _onTimerTask = null; _ins_onTick = new Dictionary <int, OnTickDelegate>(); _insID_pm = new Dictionary <int, IPosManager>(); }