variable:ss=1;
variable:n=0;
if todaybar=1 then ss:=1;
if todaybar=1 then n:=0;
n1:=todaybar;
dm:=4-INTPART(LOG(C));
jsj:=ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);
cc:=c;
if cross(cc,jsj) or cross(jsj,cc) then n:=n+1;
if cross(n=4,0.5) then ss:=2;
if cross(n=6,0.5) then ss:=3;
if cross(cc,jsj) then begin
buy(holding=0,ss,marketr);
end
if cross(jsj,cc) then begin
buyshort(holding=0,ss,marketr);
end
if c<jsj-5 then sell(1,0,marketr);
if c>jsj+5 then sellshort(1,0,marketr);
if time0>=timetot0(closetime(0))-5*60 then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
end
n1:=todaybar;
dm:=4-INTPART(LOG(C));
jsj:=ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);
cc:=c;
if cross(cc,jsj) then begin
buy(holding=0,1,marketr);
end
if cross(jsj,cc) then begin
buyshort(holding=0,1,marketr);
end
if c<jsj-5 then sell(1,0,marketr);
if c>jsj+5 then sellshort(1,0,marketr);
if time0>=timetot0(closetime(0))-5*60 then begin
sell(1,0,marketr);
sellshort(1,0,marketr);
end
我在开盘前做了图表化的分时图启动!
开盘不久就开了很多的仓,但价格都是0。也就是说其实没有一个开仓成功。但都出了开仓的指令。这是什么原因?
我是期货上的夜盘交易:21:00开仓