DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
X1:=IF (macd<0,BArslAST(crOSS(DIFF,DEA)),0);
绿柱面积:=IF(MacD<0,SUM(MACD,BARSLAST(MACD>0)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
本次最低绿柱:=IF(MACD<0,LLV(MACD,BARSLAST(MACD>0)),0);
前次最低绿柱:=REF(本次最低绿柱,X1+1);
本次最低价:=LLV(L,BARSLAST(MACD>0));
前次最低价:=REF(本次最低价,X1+1);
RS1:=MACD<0 AND REF(MACD,1)<0 AND 本次最低价<前次最低价 AND Abs(绿柱面积)
UP3:=RS1 AND UPNDAY(MACD,3);
STEP1:=IF(UP3,(MACD-REF(MACD,1))*0.45+(MACD-REF(MACD,2))*0.17+(MACD-REF(MACD,3))*0.07,0);
N1:=IF(UP3,ABS(MACD)/ABS(STEP1),0);
补充绿柱面积:=IF(UP3,IF(N1>1,(N1-1)*MACD/2,0),0);
Y1补:=IF((绿柱面积<0 AND ABS(绿柱面积+补充绿柱面积)
底积将背:= IF( UP3,Y1补,0);
红三角:底积将背;