A:=(3*C+L+O+H)/6;
VAR1:=LLV(LOW,6);
VAR2:=HHV(HIGH,6);
快线:WMA((A-VAR1)/(VAR2-VAR1)*100,4),COLORMAGENTA;
慢线:WMA(0.667*REF(快线,1)+0.333*快线,2),COLORYELLOW,DOTLINE;
GW:=REF(快线,1) 80 OR 快线
DW:=REF(快线,1) 30 OR 快线
DRAWNUMBER(快线 =80,80,BARSLASTCOUNT(快线 =80));
IF(快线 =REF(快线,1),快线,DRAWNULL),COLORRED,LINETHICK2;
风险线上高抛:80, DOTLINE,COLORGREEN;
机会线下低吸:20, DOTLINE,COLORCYAN;
背离顶:=COUNT(CROSS(快线,80),BARSLAST(EVERY(快线 80,4)))=1 AND COUNT(CROSS(快线,慢线)
AND 慢线 50,BARSLAST(EVERY(快线 80,4)))=1 AND CROSS(快线,80);
{前一波如果持续大于80数天下来,二次高点碰到80就是逃顶机会,也有不碰80半路就回调的}
DRAWICON(背离顶,91,4);
{大盘逃顶}{www.9m8.cn 九毛八公式指标网}
RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
KD乖离:=(SMA(RSV,3,1)-SMA(SMA(RSV,3,1),3,1))*2,COLORSTICK;
K:=SMA(RSV,3,1),COLORFFFF00;
D:=SMA(K,3,1),COLOR2020FF;
K1:=IF(K 80,K,0);
K2:=IF(K 20,K,100);
K3:=K1+REF(K1,1)+REF(K1,2);
K4:=K2+REF(K2,1)+REF(K2,2);
DRAWICON(COUNT(K3 240,1),92,2);
DRAWICON(COUNT(K4 60,1),20,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 快线 80,0.86,0,0,'大 盘 高 位 二 次 死 叉 空 仓 五 天'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 快线 80,0,0,0,'日 线 见 顶 后 再 小 周 期 找 顶 部 死 叉 逃 顶'),COLORGRAY;
RSI1:SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100,NODRAW,COLORLIRED;
STICKLINE(RSI1 89,90,RSI1,3,0),COLORGREEN;