public StepPreparer(IPlugin_HistoryData plugin_HistoryData, DataCenter dataCenter, bool isFillUp) { this.dataCenterConfig = dataCenter.Config; this.historyData = plugin_HistoryData; this.dataStore = dataCenter.DataStore; this.isFillUp = isFillUp; }
public Step_UpdateTickData(string code, List <int> tradingDays, IPlugin_HistoryData historyData, ITickDataStore tickDataStore) { this.code = code; this.tradingDays = tradingDays; this.historyData = historyData; this.tickDataStore = tickDataStore; }
public StepGetter_UpdateKLineData_Vaieties(IPlugin_HistoryData historyData, IDataStore dataStore, List <KLinePeriod> storeKLinePeriods) { this.klineDataStore = dataStore.CreateKLineDataStore(); this.historyData = historyData; this.dataStore = dataStore; this.klinePeriods = storeKLinePeriods; }
public StepGetter_UpdateTickData(IPlugin_HistoryData historyData, IDataStore dataStore, bool isFillUp, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, IList <int> newTradingDays) { this.historyData = historyData; this.dataStore = dataStore; this.isFillUp = isFillUp; this.updatedDataInfo = updatedDataInfo; this.updateInfoStore = updateInfoStore; this.newTradingDays = newTradingDays; }
public void TestKLineDataTime() { IPluginMgr mgr = PluginMgrFactory.DefaultPluginMgr; PluginInfo pluginInfo = mgr.GetPlugin("CnFutures"); IPlugin_HistoryData plugin = PluginMgrFactory.DefaultPluginMgr.CreatePluginObject <IPlugin_HistoryData>(pluginInfo); List <TradingSession> dayOpen = plugin.GetTradingSessions("m05"); //List<double[]> openTimes = null; //OpenTimePeriodUtils.GetKLineTimeList(1, 1, openTimes, KLinePeriod.KLinePeriod_1Minute); }
public StepGetter_UpdateKLineData(IPlugin_HistoryData historyData, IDataStore dataStore, List <KLinePeriod> updatePeriods, bool isFillUp, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, IList <int> newTradingDays) { this.historyData = historyData; this.klineDataStore = dataStore.CreateKLineDataStore(); this.updatePeriods = updatePeriods; this.isFillUp = isFillUp; this.updatedDataInfo = updatedDataInfo; this.updateInfoStore = updateInfoStore; this.newTradingDays = newTradingDays; }
public void TestGetPluginObject() { IPluginMgr pluginMgr = GetPluginMgr(); IPlugin_Market plugin_Market = pluginMgr.GetPluginObject <IPlugin_Market>("MOCK.MARKET"); AssertMockMarketObject(plugin_Market); IPlugin_HistoryData plugin_HistoryData = pluginMgr.GetPluginObject <IPlugin_HistoryData>("MOCK.HISTORYDATA"); AssertMockHistoryDataObject(plugin_HistoryData); }
//public Step_UpdateKLineData(string code, int startDate, int endDate, KLinePeriod period, IPlugin_HistoryData historyData, IKLineDataStore klineDataStore) //{ // this.code = code; // this.period = period; // this.historyData = historyData; // this.klineDataStore = klineDataStore; //} public Step_UpdateKLineData(CodeInfo codeInfo, KLinePeriod period, ITradingDayReader tradingDayReader, IPlugin_HistoryData historyData, IKLineDataStore klineDataStore, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, bool updateFillUp) { this.codeInfo = codeInfo; this.tradingDayReader = tradingDayReader; this.period = period; this.historyData = historyData; this.klineDataStore = klineDataStore; this.updatedDataInfo = updatedDataInfo; this.updateInfoStore = updateInfoStore; this.updateFillUp = updateFillUp; }
public FormDataUpdate(IPlugin_HistoryData plugin_HistoryData) { InitializeComponent(); this.plugin_HistoryData = plugin_HistoryData; //this.tbDataCenter.Text = this.plugin_HistoryData.GetDataCenterUri(); //DataCenter dataCenter = DataCenterManager.Create() //this.controlDataProceed1.DataProceed = new DataProceed_DataUpdate(this.plugin_HistoryData, this.tbDataCenter.Text, !rb_New.Checked); this.controlDataProceed1.DataProceed = new DataUpdate(this.plugin_HistoryData, null, false); //this.tbDataCenter.Text, !rb_New.Checked); }
public Step_UpdateTradingDays(IPlugin_HistoryData historyData, IDataStore dataStore) { this.tradingDayStore = dataStore.CreateTradingDayStore(); this.tradingDays = historyData.GetTradingDays(); List <int> historyTradingDays = tradingDayStore.Load(); this.newTradingDays = new List <int>(); CacheUtils_TradingDay cache = new CacheUtils_TradingDay(historyTradingDays); for (int i = 0; i < tradingDays.Count; i++) { int tradingDay = tradingDays[i]; if (!cache.IsTrade(tradingDay)) { newTradingDays.Add(tradingDay); } } newTradingDays.Sort(); }
private void Init(string todayDataPath, IPlugin_Market plugin_Market, IPlugin_HistoryData plugin_HistoryData, int lastOpenDate, string[] receiveCodes, List <KLinePeriod> klinePeriods) { this.plugin_Market = plugin_Market; this.receiveCodes = receiveCodes; this.klinePeriods = klinePeriods; //初始化历史数据 this.dataReaderFactory = DataReaderFactory.CreateDataReader(""); if (lastOpenDate < 0) { this.lastOpenDate = this.dataReaderFactory.TradingDayReader.LastTradingDay; } else { this.lastOpenDate = lastOpenDate; } //初始化数据接收器 this.dataReceiver = new DataReceiver(plugin_Market, todayDataPath); this.dataReceiver.Subscribe(receiveCodes); this.dataReceiver.OnReceiverPrepared = this.onReceiverPrepared; }
public Step_UpdateTradingSession_Instrument(string code, IPlugin_HistoryData historyData, IDataStore dataStore) { this.code = code; this.historyData = historyData; this.tradingSessionStore = dataStore.CreateTradingSessionStore(); }
public RealTimeDataReceiver(string todayDataPath, IPlugin_Market plugin_Market, IPlugin_HistoryData plugin_HistoryData, int lastOpenDate, String[] receiveCodes, List <KLinePeriod> klinePeriods) { Init(todayDataPath, plugin_Market, plugin_HistoryData, lastOpenDate, receiveCodes, klinePeriods); }
public Step_UpdateMainFutures(IPlugin_HistoryData historyData, IDataStore dataStore) { this.store = dataStore.CreateMainContractStore(); this.historyData = historyData; }
public Step_UpdateCode(IPlugin_HistoryData historyData, IDataStore dataStore) { this.codes = historyData.GetInstruments(); this.instrumentStore = dataStore.CreateInstrumentStore(); }
private static void AssertMockHistoryDataObject(IPlugin_HistoryData plugin_HistoryData) { //Assert.AreEqual(@"D:\SCTEST\MOCKDATA\", plugin_HistoryData.GetDataCenterUri()); //Assert.AreEqual("MOCK历史数据", plugin_HistoryData.GetName()); //Assert.AreEqual("MOCK出的历史数据,专用测试", plugin_HistoryData.GetDescription()); }
public Step_UpdateTradingTime_Code(string code, IPlugin_HistoryData historyData, IDataStore dataStore) { this.code = code; this.store = dataStore.CreateTradingTimeStore(); this.historyData = historyData; }
public DataUpdate(IPlugin_HistoryData plugin_HistoryData, DataCenter dateCenter, bool isFillUp) { this.preparer = new StepPreparer(plugin_HistoryData, dateCenter, isFillUp); }
private void btOK_Click(object sender, EventArgs e) { this.choosedPlugin = this.pluginObjects[cbProvider.SelectedIndex]; this.DialogResult = DialogResult.OK; }
public Step_UpdateTickData(string code, List <int> tradingDays, IPlugin_HistoryData historyData, ITickDataStore tickDataStore, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore) : this(code, tradingDays, historyData, tickDataStore) { this.updatedDataInfo = updatedDataInfo; this.updateInfoStore = updateInfoStore; }