老师,我看过都没发现模型里有画信号连线,请帮我看看这个模型的加载信号连线,谢谢!
input:ss(1,1,100,1),n1(10,1,100,1),n2(10,1,100,1)n3(4,2,100,1);
variable:交易次数:=0;//为了便于统计 开平1次后 交易次数为2
昨高:=callstock(stklabel,vthigh,6,-1);//昨高
昨低:=callstock(stklabel,vtlow,6,-1);//昨低
昨收:=callstock(stklabel,vtclose,6,-1);//昨收
上轨:昨高;
下轨:昨低;
手数:=ss;
//条件
开多条件:=c>上轨;
开空条件:=c<下轨;
多头止损条件:=c<enterprice-N1*mindiff and time<145500;
空头止损条件:=c>enterprice+n2*mindiff and time<145500;
//交易系统
if (time>090000 and time<145000 and 交易次数<=n3) and (开多条件 or 开空条件) then begin
开多:buy(开多条件 and holding=0,手数,market);
开空:buyshort(开空条件 and holding=0,手数,market);
交易次数:=交易次数+1;
end
//止损
if 多头止损条件 and holding>0 then begin
多头止损:sell(1,手数,market);
交易次数:=交易次数+1;
end
if 空头止损条件 and holding<0 then BEGIN
空头止损:sellshort(1,手数,market);
交易次数:=交易次数+1;
end
if time>=145000 then BEGIN
收盘平多:sell(1,手数,market);
收盘平空:sellshort(1,手数,market);
交易次数:=0;
end
thank you !