public void TestRealTimeReader_OnTick() { string code = "RB1710"; int start = 20170601; int endDate = 20170610; RealTimeReader_Strategy realTimeReader = GetRealTimeReader(code, start, endDate, true); realTimeReader.OnTick += RealTimeReader_OnTick; realTimeReader.OnBar += RealTimeReader_OnBar; while (!realTimeReader.IsEnd) { realTimeReader.Forward(); } }
public void TestRealTimeReader() { string code = "RB1710"; int start = 20170601; int endDate = 20170610; RealTimeReader_Strategy realTimeReader = GetRealTimeReader(code, start, endDate, false); while (!realTimeReader.IsEnd) { realTimeReader.Forward(); IKLineData klineData = realTimeReader.GetKLineData(KLinePeriod.KLinePeriod_1Minute); Console.WriteLine(klineData); } }