variable:bj=0,n=0;
买开:=C>REF(HHV(c,10),1);
卖平:=C<REF(LLV(c,10),1);
买平:=C>REF(HHV(c,10),1);
卖开:=C<REF(LLV(c,10),1);
买开2:=C>REF(HHV(c,20),1);
卖平2:=C<REF(LLV(c,20),1);
买平2:=C>REF(HHV(c,20),1);
卖开2:=C<REF(LLV(c,20),1);
if bj=1 then begin
sellshort(买平2,0,marketr);
buy(holding=0 and 买开2,多手,marketr);
sell(卖平2,0,marketr);
buyshort(holding=0 and 卖开2,空手,marketr);
end
if 买平 and holding<0 and bj=0 then begin
SELLSHORT(买平,0,THISCLOSE);
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
BUY(买开 AND HOLDING=0 and bj=0 ,多手 ,THISCLOSE);
if 卖平 and holding>0 and bj=0 then begin
SELL(卖平,0,THISCLOSE);
if numprofit(1)>=0 then n:=0;
if numprofit(1)<0 then n:=n+1;
end
BUYSHORT(卖开 AND HOLDING=0 and bj=0 ,空手,THISCLOSE);
if n=2 and ref(n,1)<>2 then bj:=1;
盈利是当天交易总体是盈利的,然后就接着是10点的操作?
你这不是回答我的问题啊,我的问的是要什么样的盈利情况再切换回去?是不是当前总体交易盈利了,就切换回10?