金蛇狂舞(短期、中长期、中期、强市线、弱市线)-指标公式源码
短期:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORWHITE;
中期:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORYELLOW;
中长期:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORMAGENTA;
长期:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLORRED,LINETHICK2;
强市线:80,POINTDOT;
弱市线:20,POINTDOT;
分水岭:50,POINTDOT;
LG:=C-REF(C,1);
AA1:=LG-REF(LG,7);
AA2:=LG-REF(LG,18);
AA3:=LG-REF(LG,29);
AA4:=LG-REF(LG,47);
AA5:=LG-REF(LG,76);
AA6:=LG-REF(LG,123);
AA7:=LG-REF(LG,199);
BB1:=(AA1+AA2+AA3+AA4+AA5+AA6+AA7);
U:=BB1-REF(BB1,1);
BB2:=SMA(U,5,1);
YY1:=BB1-REF(BB1,1);
绿1:=EMA(EMA(EMA(YY1,8),8),14),COLOR00FA00,LINETHICK4;
绿2:=EMA(EMA(绿1,3),3),COLORFFFF00,LINETHICK3;
红1:=EMA(EMA(绿2,3),3),COLORRED,LINETHICK3;
红2:=EMA(红1,11),COLORFF00FF,LINETHICK3;
MTM:=C-REF(C,1);
ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),COLORWHITE;
MAZL:=MA(ZLGJ,N2),COLORYELLOW;
VA1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VA2:=SMA(ABS(LOW-VA1),13,1)/SMA(MAX(LOW-VA1,0),10,1);
VA3:=EMA(VA2,10);
VA4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VA4,VA3,0),3);
主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED,NODRAW;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0 ),COLOR000055;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0 ),COLOR000077;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000BB;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000DD;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0 ),COLOR0000FF;
洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00;
ZF:=(C/REF(C,1)-1)*100;
趋势:SUM(ZF,3),COLORFFFFFF,LINETHICK1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
ROC:(100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12));
OK:EMA((ZF,3)+((100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12))/2),5);
N:=15;M:=20;
TR:=EXPMEMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),N);
HD:=H-REF(H,1);
LD:=REF(L,1)-L;
DMP:=EXPMEMA(IF(HD>0 AND HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0 AND LD>HD,LD,0),N);
VAR1:=DMP*100/TR;
VAR2:=DMM*100/TR;
VAR3:=EXPMEMA(VAR1,M);
VAR4:=EXPMEMA(VAR2,M);
DRAWBAND(VAR3,RGB(150,30,50),VAR4,RGB(30,110,50));
PDI:EMA(VAR1,13),COLORYELLOW;
MDI:EMA(VAR2,13),COLORGREEN;
STICKLINE(VAR1>VAR3 AND VAR2<VAR3,VAR3,VAR1,0,0.5),COLORWHITE;
MA1:=EMA(H,3);
MA5:=EMA(C,5);
WY1001:=(2*CLOSE+HIGH+LOW)/4;
WY1002:=EMA(WY1001,4);
WY1003:=EMA(WY1002,4);
WY1004:=EMA(WY1003,4);
XYS0:=(WY1004-REF(WY1004,1))/REF(WY1004,1)*100;
XYS1:=MA(XYS0,2);
XYS2:=MA(XYS0,1);
VV1:=V>REF(V,1)*1.03;
VV2:=(MA(C,5)-MA(C,10))/MA(C,10)<0.03 AND
(MA(C,10)-MA(C,20))/MA(C,20)<0.06;
XG560:=IF(MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,20) AND MA(C,20)>MA(C,60) AND MA(C,1)>MA(C,5)
AND VV1 AND C>O AND VV2,1,0)*20;
VV3:=(MA(C,3)-MA(C,5))/MA(C,5)<0.02 AND
(MA(C,5)-MA(C,10))/MA(C,10)<0.03 AND (MA(C,10)-MA(C,20))/MA(C,20)<0.06;
A1:=MA(CLOSE,5);
A2:=MA(CLOSE,10);
A3:=MA(CLOSE,20);
A4:=MA(CLOSE,30);
筹码集中度:=COST(10)/(COST(80)-COST(10));
筹码1:EMA(筹码集中度,1)*10,LINETHICK2,COLOR3399FF;
筹码3:EMA(筹码集中度,3)*10,LINETHICK2,COLORRED;
筹码5:EMA(筹码集中度,5)*10,LINETHICK1;
筹码13:EMA(筹码集中度,13)*10,LINETHICK1;
筹码34:EMA(筹码集中度,34)*10,LINETHICK1;
筹码55:EMA(筹码集中度,55)*10,LINETHICK1;
{筹码90:EMA(筹码集中度,90)*10,LINETHICK1,COLORFF00FF;}
DDD:(COUNT(A1<A2 AND A2<A3 AND A3<A4,3)=3 AND CROSS(XYS2,XYS1)
AND C>O AND 筹码1<60 AND C>MA5)*30,COLORGREEN;
{(H>REF(C,1)AND A2>REF(A2,1) AND 筹码1< 筹码3 AND C>REF(L,1)
AND 筹码1<REF(筹码1,1))*20,COLORRED;
( 筹码1<=REF(筹码1,1) AND MA1>REF(MA1,1))*20,COLORRED;}
{底:0;
线1:10,COLORWHITE,POINTDOT;
线2:20,COLORFF00FF,POINTDOT;
A:=P+(100-P)/2;
B:=(100-P)/2;
CC:=COST(A);
DD:=COST(B);
CMJZD:=(CC-DD)/(CC+DD)*100/2;
筹码集中度A:MA(CMJZD,3),COLORRED;
筹码集中升:IF(筹码集中度A>=REF(筹码集中度A,3),筹码集中度A,DRAWNULL),COLORRED;
筹码集中降:IF(筹码集中度A<REF(筹码集中度A,3),筹码集中度A,DRAWNULL),COLORGREEN;
比例变化:=(筹码集中度A-REF(筹码集中度A,1))/REF(筹码集中度A,1)*100,COLORWHITE;
拉高加仓:IF(筹码集中度A>REF(筹码集中度A,3) AND
MA(C,20)>REF(MA(C,20),3),1,0),COLORRED;
拉高加仓1:STICKLINE(拉高加仓>0,0,筹码集中度A*0.33,3,1),COLORRED;
下跌加仓:IF(筹码集中度A>REF(筹码集中度A,3) AND
MA(C,20)<REF(MA(C,20),3),1,0),COLORGREEN;
下跌加仓1:STICKLINE(下跌加仓>0,0,筹码集中度A*0.33,3,1),COLORGREEN;};
TYP:=(HIGH+LOW+CLOSE)/3;
导入公式可见全部源码
|