如下的代码。
我交易方式都改成轮询了,但还是不清仓啊,根本就没反应啊。
//开盘及夜盘开始后清仓
if (time>=210000 and time<=210100) or (time>=090000 and time<=090100) or (time>=133000 and time<=133100) then begin //or (time>=133000 and time<=133100)
if(dqzhcc<>0 or TISPRVREMAIN(0) , tcancel(1 ,0),null);
sleep(100);
tsellshort(1,0,lmt,c);
tsell(1,0,lmt,c);
end
下面是TIME的输出,的确是有问题啊。
另外再弱弱的问一下,BEGIN ,......END,这个END后面需要跟上;这个结束吗?我记得好像是可以不用加;吧
2015-05-18 14:23:56.764 时间为 142500
2015-05-18 14:23:56.773 时间为 142500
2015-05-18 14:23:56.779 时间为 142500
2015-05-18 14:23:56.790 时间为 142500
2015-05-18 14:23:56.796 时间为 142500
2015-05-18 14:23:56.803 时间为 142500
2015-05-18 14:23:56.812 时间为 142500
2015-05-18 14:23:56.820 时间为 142500
2015-05-18 14:23:56.825 时间为 142500
2015-05-18 14:23:56.831 时间为 142500
2015-05-18 14:23:56.839 时间为 142500
2015-05-18 14:23:56.849 时间为 142500
2015-05-18 14:23:56.857 时间为 142500
2015-05-18 14:23:56.867 时间为 142500
end后面加不加分号都可以
这个TIME是以当根K线时间为准了
我是不是应该改成TIME0这样就好了
(time>=210000 and time<=210100)
你这个就要改成
(time>=210000 and time<=211000)
TIME0 这个也不对啊
2015-05-18 14:31:41.937 时间为 52500
2015-05-18 14:31:41.945 时间为 52500
2015-05-18 14:31:41.954 时间为 52500
2015-05-18 14:31:41.959 时间为 52500
2015-05-18 14:31:42.025 时间为 52500
2015-05-18 14:31:42.035 时间为 52500
2015-05-18 14:31:42.044 时间为 52500
2015-05-18 14:31:42.054 时间为 52500
2015-05-18 14:31:42.061 时间为 52500
2015-05-18 14:31:42.067 时间为 52500
2015-05-18 14:31:42.072 时间为 52500
2015-05-18 14:31:42.080 时间为 52500
2015-05-18 14:31:42.092 时间为 52500
2015-05-18 14:31:42.103 时间为 52500