先把系统KDJ公式抄过来
然后再写下面的代码
variable:bj=0;
if cross(k,d) and time<151300 and bj=0 then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if cross(d,k) and time<151300 and bj=0 then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if asset-ref(asset,todaybar)<=-8000 then bj:=1;
if time>=151300 then begin
sell(1,0,market);
sellshort(1,0,market);
bj:=0;
end
设定的是当日亏8000后不在操作