n1:=barslast(DATE<>REF(DATE,1))+1;
BS6:=(OPENPROFIT<HHV(OPENPROFIT,ENTERBARS)*0.7)&&HHV(OPENPROFIT,ENTERBARS)>300*15&&ENTERBARS>0&&COUNT(HOLDING<>0,n1)>=1;//日内交易,开仓到现在当前浮盈少于最大浮盈时的70%,并且最大浮盈时大于15个点(用于股指回撤止盈)
还有一个不会编写,麻烦老师帮我编一下
日内1分钟周期的:从当天第一次平仓开始算,当现价大于上一次平仓价10个点开多,少于10个点开空
if c>exitprice+10*mindiff then buy;
if c<exitprice-10*mindiff then buyshort;
if c>exitprice+10*mindiff then buy;
if c<exitprice-10*mindiff then buyshort;
今天的开盘价大于昨天的最后一手单的平仓价10个点时,它就会帮我开多,而我想要的是昨天跟今天分开variable:a=0;
if cond1 then buy;
if cond2 then buyshort;
if cond3 then begin
sell;
a:=1;
end
if cond4 then begin
sellshort;
a:=1;
end
if c>exitprice+10*mindiff and a=1 then buy;
if c<exitprice-10*mindiff and a=1 then buyshort;
if time>=145900 then a:=0;
行了 谢谢
我第一个问题还未解答啊 帮我一下好吗?
用全局变量记录一下最大浮动盈亏就ok
variable: fuying=0;
if cond then begin
buy;
fuying:=openprofit;
end
if openprofit>fuying then fuying:=openprofit;
tiaojian:= openprofit<=0.7*fuying and fuying>=enterprice+15*mindiff;