参数:m:最小1,最大300,缺省100
源码
买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
卖:=AMOUNT-买;
VA0:=IF(CLOSE>=REF(C,1),买,-卖*M/100);
ZF0:=(C-REF(C,1))/REF(C,1);
ZL:=SUM(IF(CLOSE=REF(CLOSE,1),0,ABS(ZF0)*VA0),0)/1000000,COLORRED;
新高0:=ZL>REF(HHV(ZL,100),1);
新高:=IF(新高0=1 AND REF(新高0,1)=0 ,ZL,DRAWNULL),COLORFF0080;
加仓:IF(新高=ZL AND COUNT(新高=ZL,20)=1,15,0),COLORYELLOW;