LC := REF(CLOSE,1);
rsi1:SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
A3:=BArslAST(ref(cross(RSI1,RSI2),1));
B3:=ref(c,A3+1)>c and ref(RSI1,A3+1)
STICKLINE(FILTER(B3>0,5),0,20,3,0),COLORCYAN;
DRAWTEXT(FILTER(B3>0,5),20,'RSI底背离'),COLORCYAN;
C3:=BARSLAST(ref(cross(RSI2,RSI1),1));
{- }
D3:=ref(c,C3+1)
DRAWTEXT(FILTER(D3>0,5),80,'RSI顶背离'),COLORMAGENTA;
R:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;;
MAR:=MA(R,3);
F:=100*(C-REF(C,1))/REF(C,1);
HHH:=EMA(R,25)+6;
买:(REF(R,2)>REF(R,3) AND REF(R,2)>REF(R,1) AND R>REF(R,1)
AND MAR>REF(MAR,1)+1 AND REF(MAR,2)-REF(MAR,1)>-1
AND REF(R,1)-3
AND REF(R,1)<38 AND R
秒进:if(H=O AND C=H AND H=L AND O>(REF(C,1)*1.04),100,0),LINETHICK0;
VERTLINE(秒进,1);
MID:=MA(RSI1,20);
上轨:MID + 2*STD(RSI1,20),COLOR993300;
下轨:MID - 2*STD(RSI1,20),COLOR993300;
中轨:((上轨-下轨)/2)+下轨,COLOR993300;
抄:CROSS(RSI1,下轨) AND RSI1>REF(RSI1,1),LINETHICK0;
DRAWTEXT(抄,下轨,'抄'),COLOR00FF00;