variable:nn=0;//记录连盈次数
variable:手数=1;//下单手数
if pd and HOLDING>0 then begin
sell(1,0,THISCLOSE);
if numprofit(1)<0 then nn:=0;
if numprofit(1)>0 then nn:=nn+1;
end
if pk and HOLDING<0 then begin
sellshort(1,0,THISCLOSE);
if numprofit(1)<0 then nn:=0;
if numprofit(1)>0 then nn:=nn+1;
end
nx:=nn,linethick0;
if nn=0 then 手数:=1;
if nn>0 then 手数:=2;
如上是用在图表程序化的编写,如果想改成后台程序化应该如何修改??