咨询内容:今天遇到一个问题,查了很久,我的程序如下: if holding>0 then begin if ACS=0.5 then beginsell(1,0,LIMITR, min(open, l[ACSS]) -滑点);ACSA:=0;endend if holding<0 then beginif ACB=0.5 then beginsellshort(1,0,LIMITR, max(open, h[ACBB]) +滑点);ACBA:=0;endend if barpos<50 then exit; if ACBA<3 then beginif ACB=0.5 then beginbuy(1, 手数, LIMITR, max(open, h[ACBB]) +滑点);ACBA:=ACBA+1;endend if ACSA<3 then beginif ACS=0.5 then beginbuyshort(1, 手数, LIMITR, min(open, l[ACSS]) -滑点);ACSA:=ACSA+1;endend 持仓:holding, LINETHICK0; ============================在K线图上看得到开平仓信号,就是历史测试没任何交易。 后来勾选"严格使用时间段数据测试"后历史测试就正常了。 把平仓那里的holding>0 改为 holding>=0 后,不勾选"严格使用时间段数据测试"进行历史测试也正常了。 不知道具体是什么原因导致的,希望大家注意,也希望老大们解决这个bug。