variable:zhisun=6;
if ref(平倉條件,1) and holding=0 and ref(holding,1)>0 and ref(openprofit,1)>100*mindiff*multiplier then zhisun:=20;
if zhisun=20 and holding<>0 and enterprice-c>zhisun*mindiff then begin
sell(1,0,limitr,o);
zhisun:=6;
end