public void TestTickAttachTick() { int start = 20170601; int endDate = 20170602; //string code = "A0401"; //int start = 20040106; //int endDate = 20040106; IDataForward_Code historyDataForward = ForwardDataGetter.GetHistoryDataForward_Code(code, start, endDate, true, true); historyDataForward.AttachOtherData(code2); //historyDataForward.OnBar += HistoryDataForward_OnBar; historyDataForward.OnTick += HistoryDataForward_OnTick; //historyDataForward.OnTick += KlineDataForward_OnTick; while (historyDataForward.Forward()) { } }
public void TestTickAttachKLine() { int start = 20170601; int endDate = 20170602; //string code = "A0401"; //int start = 20040106; //int endDate = 20040106; printStrs_Forward_KLine.Clear(); IDataForward_Code historyDataForward = ForwardDataGetter.GetHistoryDataForward_Code(code, start, endDate, false); historyDataForward.AttachOtherData(code2); historyDataForward.OnBar += HistoryDataForward_OnBar; historyDataForward.OnTick += HistoryDataForward_OnTick; //historyDataForward.OnTick += KlineDataForward_OnTick; while (historyDataForward.Forward()) { } AssertUtils.AssertEqual_List("attachcode_kline", GetType(), printStrs_Forward_KLine); }