if holding=0 and time<144000 then //开多
tbuy(KAIDUO,200,STPLMT,close-30,close-50+20);
if holding=0 and time< 144000 then //开空
tbuyshort(KAIKONG,200,STPLMT,close+30,close+50);
if holding>0 then //平多
tsell(PINGDUO,holding,lmt,close);
if time=145700 then
tsell(time=145700,holding,lmt,close);
if holding<0 then //平空
tsellshort(PINGKONG,holding,lmt,close);
tsellshort(time=145700,holding,lmt,close);
把buy等相应改成tbuy,怎么测试就没有成交,错在哪里?
[此贴子已经被作者于2011-4-19 1:30:19编辑过]
首先,你用的都是LIMIT,后台是每秒重新计算的。而图表是同一支K线内只做一次操作。这个会影响成交。
第二,你用的是HODLING,他会在BUY函数启动后改变值,但你现在用TBUY就不一定了。建议你学习一下THODLING和HOLDING的不同。测试一下。