예제 #1
0
 public NewDataInfoGetter(IUpdatedDataInfo historyDataInfoLoader, ITradingDayReader tradingDayReader, DataUpdateHelper dataLoader)
 {
     //this.historyDataInfoLoader = new HistoryDataInfoLoader(srcDataPath);
     this.historyDataInfoLoader = historyDataInfoLoader;
     this.tradingDayReader      = tradingDayReader;
     this.dataLoader            = dataLoader;
 }
예제 #2
0
 public Step_KLineData(CodeInfo codeInfo, List <int> dates, bool isOverWrite, DataUpdateHelper dataUpdateHelper)
 {
     this.codeInfo         = codeInfo;
     this.dates            = dates;
     this.overwrite        = true;
     this.dataUpdateHelper = dataUpdateHelper;
 }
예제 #3
0
파일: StepPreparer.cs 프로젝트: wanwei/sc2
 /// <summary>
 /// 创建一个更新准备器
 /// </summary>
 /// <param name="pluginHelper"></param>
 /// <param name="dataProvider"></param>
 /// <param name="srcDataPath"></param>
 /// <param name="targetDataPath"></param>
 /// <param name="updateFillUp"></param>
 public StepPreparer(string pluginPath, string srcDataPath, string targetDataPath, bool updateFillUp, IDataProvider dataProvider)
 {
     this.srcDataPath      = srcDataPath;
     this.targetDataPath   = targetDataPath;
     this.updateFillUp     = updateFillUp;
     this.dataProvider     = dataProvider;
     this.dataUpdateHelper = new DataUpdateHelper(pluginPath, new UpdatedDataLoader(pluginPath), dataProvider);
 }
예제 #4
0
 public Step_KLineData(CodeInfo codeInfo, List <int> dates, DataUpdateHelper dataUpdateHelper, UpdatedDataInfo updatedDataInfo, bool updateFillUp)
 {
     this.codeInfo         = codeInfo;
     this.dates            = dates;
     this.dataUpdateHelper = dataUpdateHelper;
     this.updatedDataInfo  = updatedDataInfo;
     this.updateFillUp     = updateFillUp;
 }
예제 #5
0
        public Step_MainFutures(DataUpdateHelper dataUpdateHelper)
        {
            this.dataUpdateHelper = dataUpdateHelper;
            string          csvPath = this.dataUpdateHelper.GetPath_Csv();
            List <CodeInfo> codes   = this.dataUpdateHelper.GetAllCodes();

            this.scan = new MainFuturesScan(csvPath, codes);
        }
예제 #6
0
        public static DataUpdateHelper GetDataUpdateHelper_BiaoPuYongHua()
        {
            string            pluginPath        = DataUpdateConst.PLUGINPATH;
            string            srcDataPath       = DataUpdateConst.SRCDATAPATH_BIAOPUYONGHUA;
            UpdatedDataLoader updatedDataLoader = new UpdatedDataLoader(pluginPath);
            IDataProvider     dataProvider      = new DataProvider_BiaoPuYongHua(srcDataPath, pluginPath);
            DataUpdateHelper  dataUpdateHelper  = new DataUpdateHelper(pluginPath, updatedDataLoader, dataProvider);

            return(dataUpdateHelper);
        }
예제 #7
0
        private static DataUpdateHelper GetDataUpdateHelper_JinShuYuan()
        {
            string pluginPath = DataUpdateConst.PLUGINPATH;
            //string srcDataPath = DataUpdateConst.SRCDATAPATH_BIAOPUYONGHUA;
            string            srcDataPath       = DataUpdateConst.SRCDATAPATH_JINSHUYUAN;
            UpdatedDataLoader updatedDataLoader = new UpdatedDataLoader(pluginPath);
            IDataProvider     dataProvider      = new DataProvider_JinShuYuan(srcDataPath, pluginPath);
            DataUpdateHelper  dataUpdateHelper  = new DataUpdateHelper(pluginPath, updatedDataLoader, dataProvider);

            return(dataUpdateHelper);
        }
예제 #8
0
        public void Test_DataUpdateHelper()
        {
            DataUpdateHelper dataUpdateHelper = GetDataUpdateHelper_JinShuYuan();

            List <int> tradingDays = dataUpdateHelper.GetAllTradingDayReader().GetAllTradingDays();

            AssertUtils.PrintLineList(tradingDays);

            List <CodeInfo> codes = dataUpdateHelper.GetNewCodes();

            AssertUtils.PrintLineList(codes);
        }
예제 #9
0
        //private KLineTimeListGetter timeListGetter;

        public Step_KLineData_OneDay(DataUpdateHelper dataUpdateHelper, CodeInfo codeInfo, int date, KLinePeriod klinePeriod, float lastEndPrice, int lastEndHold)
        {
            this.codeInfo         = codeInfo;
            this.date             = date;
            this.klinePeriod      = klinePeriod;
            this.dataUpdateHelper = dataUpdateHelper;
            this.lastEndPrice     = lastEndPrice;
            this.lastEndHold      = lastEndHold;

            //ITradingDayReader openDateReader = dataUpdateHelper.GetAllTradingDayReader();
            //ITradingTimeReader openTimeReader = dataUpdateHelper.GetTradingSessionDetailReader();
            //this.timeListGetter = new KLineTimeListGetter(openDateReader, openTimeReader);
        }
예제 #10
0
        public void TestGetNotUpdateTradingDays()
        {
            //DataUpdateHelper dataUpdateHelper = GetDataUpdateHelper(DataUpdateConst.SRCDATAPATH_JINSHUYUAN);
            //List<int> tradingDays = dataUpdateHelper.GetNotUpdateTradingDays_TickData("au1611", true);
            ////AssertUtils.PrintLineList(tradingDays);
            //tradingDays = dataUpdateHelper.GetNotUpdateTradingDays_KLineData("au1611", true);
            //AssertUtils.PrintLineList(tradingDays);

            DataUpdateHelper dataUpdateHelper = GetDataUpdateHelper_BiaoPuYongHua();
            List <int>       tradingDays      = dataUpdateHelper.GetNotUpdateTradingDays_TickData("au1611", true);

            AssertUtils.PrintLineList(tradingDays);
            //tradingDays = dataUpdateHelper.GetNotUpdateTradingDays_KLineData("au1611", true);
            //AssertUtils.PrintLineList(tradingDays);
            //List<int> tradingDays = dataUpdateHelper.GetAllTradingDayReader().GetAllTradingDays();
            //AssertUtils.PrintLineList(tradingDays);

            //List<CodeInfo> codes = dataUpdateHelper.GetNewCodes();
            //AssertUtils.PrintLineList(codes);
        }
예제 #11
0
 public Step_TradingDay(DataUpdateHelper dataUpdateHelper)
 {
     this.dataUpdateHelper = dataUpdateHelper;
 }
예제 #12
0
 public Step_TickData_CodeDate(DataUpdateHelper dataUpdateHelper, CodeInfo codeInfo, int date, bool overwrite) : this(dataUpdateHelper, codeInfo, date)
 {
     this.overwrite = overwrite;
 }
예제 #13
0
 public Step_TickData_CodeDate(DataUpdateHelper dataUpdateHelper, CodeInfo codeInfo, int date)
 {
     this.dataUpdateHelper = dataUpdateHelper;
     this.codeInfo         = codeInfo;
     this.date             = date;
 }
예제 #14
0
        //private IDataProvider dataProvider;

        public DataUpdateUtils(DataUpdateHelper dataUpdateHelper, IDataProvider dataProvider)
        {
            this.dataUpdateHelper = dataUpdateHelper;
            // this.dataProvider = dataProvider;
        }
예제 #15
0
 public Step_KLineData_OneDay(DataUpdateHelper dataUpdateHelper, CodeInfo codeInfo, int date, KLinePeriod klinePeriod, float lastEndPrice, int lastEndHold, bool overwrite) : this(dataUpdateHelper, codeInfo, date, klinePeriod, lastEndPrice, lastEndHold)
 {
     this.overwrite = overwrite;
 }
예제 #16
0
 public NewDataInfoGetter(IUpdatedDataInfo historyDataInfoLoader, ITradingDayReader tradingDayReader, DataUpdateHelper dataLoader, List <CodeInfo> newcodes) : this(historyDataInfoLoader, tradingDayReader, dataLoader)
 {
     this.newcodes        = newcodes;
     this.dic_Id_CodeInfo = new Dictionary <string, CodeInfo>();
     for (int i = 0; i < newcodes.Count; i++)
     {
         string code = newcodes[i].ServerCode;
         if (this.dic_Id_CodeInfo.ContainsKey(code))
         {
             this.dic_Id_CodeInfo.Remove(code);
         }
         this.dic_Id_CodeInfo.Add(code, newcodes[i]);
     }
 }
예제 #17
0
 public Step_CodeInfo(DataUpdateHelper dataUpdateHelper)
 {
     this.dataUpdateHelper = dataUpdateHelper;
 }
예제 #18
0
 public Step_TradingTime(string code, DataUpdateHelper dateUpdateHelper, bool forceUpdate) : this(code, dateUpdateHelper)
 {
     this.forceUpdate = forceUpdate;
 }
예제 #19
0
 public Step_TradingTime(string code, DataUpdateHelper dateUpdateHelper)
 {
     this.code             = code;
     this.dataUpdateHelper = dateUpdateHelper;
 }
예제 #20
0
        //private List<CodeInfo> newcodes;

        public DataUpdateUtils2(string dataPath, ITradingDayReader tradingDayReader, IUpdatedDataInfo openDateReader_HistoryData, DataUpdateHelper dataLoader)
        {
            // this.dataLoader_InstrumentInfo = dataLoader_InstrumentInfo;
            this.codes            = dataLoader.GetNewCodes(); //dataLoader_InstrumentInfo.GetAllInstruments();
            this.openDates        = tradingDayReader.GetAllTradingDays();
            this.updateDateGetter = new NewDataInfoGetter(openDateReader_HistoryData, tradingDayReader, dataLoader, this.codes);
        }