求助rsi与股价背离的公式
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)<RSI1 AND CROSS (RSI1,RSI2);
S3:=REF(C,A3+1)<C AND REF(RSI1,A3+1)>RSI1 AND CROSS (RSI1,RSI2);
STICKLINE(B3,RSI1,RSI2,3,0),COLOR000099;
STICKLINE(S3,RSI1,RSI2,3,0),COLOR009900;
DRAWTEXT(B3,20,'背'),COLORYELLOW;
DRAWTEXT(B3,25,'底'),COLORYELLOW;
DRAWTEXT(S3,70,'顶'),COLORCYAN;
DRAWTEXT(S3,65,'背'),COLORCYAN;