public SeriesData(IAccountDA accountDA) { _accountDA = accountDA; _series = new List <Series>(); _series_values = new Dictionary <Series, List <SeriesValue> >(); _series_vrdata = new Dictionary <Series, Tuple <ValueRow, Timeline, Func <decimal, ISeriesProps> > >(); }
/// <summary> /// Используется для динамических графиков. /// То есть предусмотрено динамическое изменение цен. /// </summary> /// <param name="instrumBL">Подсистема фин. инструментов</param> /// <param name="td">Диспетчер потока данных по сделкам</param> public ChartManager(IInstrumBL instrumBL, IInsStoreBL insStoreBL, IAccountDA accountDA, ITickDispatcher td) { _instrumBL = instrumBL; _insStoreBL = insStoreBL; _accountDA = accountDA; _tickDispatcher = td; _depManager = new DependencyManager(); _factory = new Factory(_srcProv, _depManager); _isDynamic = true; }
public ChartSystem(IChartDA chartDA, IInstrumBL instrumBL, IInsStoreBL insStoreBL, IAccountDA accountDA, IRepositoryBL reposBL, ChartManagerCache cmCache, ITickDispatcher tickDisp) { _chartDA = chartDA; _instrumBL = instrumBL; _insStoreBL = insStoreBL; _accountDA = accountDA; _reposBL = reposBL; _cmCache = cmCache; _tickDisp = tickDisp; }
/// <summary> /// Используется для статических графиков исторических данных. /// То есть динамическое изменение цены не предусмотрено. /// </summary> /// <param name="instrumBL">Подсистема фин. инструментов</param> /// <param name="startDate">Первый день отображаемых данных</param> /// <param name="endDate">Последний день отображаемых данных</param> public ChartManager(IInstrumBL instrumBL, IInsStoreBL insStoreBL, IAccountDA accountDA, DateTime startDate, DateTime endDate) { _instrumBL = instrumBL; _insStoreBL = insStoreBL; _accountDA = accountDA; _startDate = startDate.Date; _endDate = endDate.Date; _depManager = new DependencyManager(); _factory = new Factory(_srcProv, _depManager); _isDynamic = false; }
public Equity(IInsStoreBL insStoreBL, IInstrumBL instrumBL, IAccountDA accountDA) { _instrumBL = instrumBL; _insStoreBL = insStoreBL; _accountDA = accountDA; _cashRow = new ValueRow(); _portfolioRow = new ValueRow(); _equityRow = new ValueRow(); _prices = new Dictionary <int, BarRow>(); }
public TradeEngineData(IAccountDA accountDA) { _accountDA = accountDA; _account = new Account(); _cash = new Cash(); _holdings = new List <Holding>(); _orders = new List <Order>(); _stopOrders = new List <StopOrder>(); _trades = new List <Trade>(); _modifiedOrders = new List <Order>(); _modifiedStopOrders = new List <StopOrder>(); }
public TestRunCtrl(IConsole console, IAccountDA accountDA, IAccountBL accountBL, IInstrumBL instrumBL, IInsStoreBL insStoreBL, ITickSourceBL tickSourceBL, ITestConfigBL testConfigBL, ILogger logger, IConfig config, IPositionBL posBL, IRepositoryBL reposBL) : base(console) { _console = console; _accountDA = accountDA; _accountBL = accountBL; _instrumBL = instrumBL; _insStoreBL = insStoreBL; _tickSourceBL = tickSourceBL; _testConfigBL = testConfigBL; _logger = logger; _config = config; _posBL = posBL; _reposBL = reposBL; }
public ImportLeech(IInstrumDA instrumDA, IAccountDA accountDA, IConfig config, ITickHistoryDA tickHistoryDA, IReplicationBL replBL) { _instrumDA = instrumDA; _accountDA = accountDA; _config = config; _tickHistoryDA = tickHistoryDA; _replBL = replBL; _instrum_rid_lid = new Dictionary <int, int>(); _account_rid_lid = new Dictionary <int, int>(); _stoporder_rid_lid = new Dictionary <int, int>(); _order_rid_lid = new Dictionary <int, int>(); _trade_rid_lid = new Dictionary <int, int>(); }
public TestRun(IAccountBL accountBL, IAccountDA accountDA, IInstrumBL instrumBL, IInsStoreBL insStoreBL, ITickSourceBL tickSourceBL, ITestConfigBL testConfigBL, ILogger logger, IConfig config, IPositionBL posBL, IRepositoryBL reposBL) { _accountBL = accountBL; _accountDA = accountDA; _instrumBL = instrumBL; _insStoreBL = insStoreBL; _tickSourceBL = tickSourceBL; _testConfigBL = testConfigBL; _bot_platform = new Dictionary <IBot, ILeechPlatform>(); _logger = logger; _config = config; _posBL = posBL; _reposBL = reposBL; }
public PositionTest() { DbContextOptionsBuilder <DaContext> builder = new DbContextOptionsBuilder <DaContext>(); builder.UseNpgsql("Username=postgres;Password=123;Host=localhost;Port=5432;Database=pulxer_test"); _options = builder.Options; _insDA = new InstrumDA(_options); _accountDA = new AccountDA(_options); _positionDA = new PositionDA(_options); // создание var gazp = _insDA.GetInstrum(0, "GAZP"); if (gazp == null) { _gazpID = _insDA.InsertInstrum("GAZP", "Газпром", "Газпром", 10, 2, 1); } else { _gazpID = gazp.InsID; } var lkoh = _insDA.GetInstrum(0, "LKOH"); if (lkoh == null) { _lkohID = _insDA.InsertInstrum("LKOH", "Лукойл", "Лукойл", 1, 0, 0); } else { _lkohID = lkoh.InsID; } _accountID = _accountDA.CreateAccount("", "", 0, false, Common.Data.AccountTypes.Test).AccountID; }
public HoldingTable(IAccountDA da) { _da = da; }
public TradesLoader(IInstrumBL instrumBL, IAccountDA accountDA) { _instrumBL = instrumBL; _accountDA = accountDA; sb = new StringBuilder(); }
public PositionCtrl(IConsole console, IInstrumBL instrumBL, IAccountDA accountDA) { _console = console; _instrumBL = instrumBL; _accountDA = accountDA; }
public CashTable(IAccountDA da) { _da = da; }
/// <summary> /// Конструктор подсистемы /// </summary> /// <param name="accountDA"></param> public AccountBL(IAccountDA accountDA) { _accountDA = accountDA; }
public OrderTable(IAccountDA da) { _da = da; }
public AccountTable(IAccountDA da) { _da = da; _code_account = new Dictionary <string, Account>(); }
public TradeTable(IAccountDA da) { _da = da; }