long:=(c/ref(c,30)-1)*100<-22 ; short:=c<hhv(h,20)*0.93 and ma(c,5)>ma(c,17) and c<o ; //多头建仓 if long then BEGIN SELLSHORT(HOLDING<0,HOLDING, THISCLOSE); buy(long,1,THISCLOSE); SELLSHORT(ENTERPRICE<0,HOLDING, THISCLOSE); end //空头建仓 if short then BEGIN sell(holding>0,holding,THISCLOSE); buyshort(short,1,THISCLOSE); end 想要在第一次发出买入信号时以30%仓位开多,在这个开多信号之后,股价又下跌10%,加一倍仓位,又下跌 10%则全仓买入,请帮忙写一下这个公式,谢谢