源码
k1:EMA(CLOSE,3),colorwhite;
k2:EMA(CLOSE,5) ,colorgreen,LINETHICK3;
k3:EMA(CLOSE,8) ,colorblue;
k4:EMA(CLOSE,10) ,colorblue;
k5:EMA(CLOSE,12) ,colorblue;
k6:EMA(CLOSE,15) ,colorwhite;
趋势变化价:REF(L,BARSLAST(cross(k2,k1))),COLORred,LINETHICK1;
后市关键价:REF(H,BARSLAST(cross(k2,k1))),COLORyellow,LINETHICK1;
PARTLINE(K2,K2>REF(K2,1),RGB(255,0,0)),LINETHICK3;
{4.J合力}
J9:EMA("KDJ.J"(9,3,3),5) ,COLOR0000FF,LINETHICK0;
J18:EMA("KDJ.J"(18,3,3),5) ,COLOR00FFFF,DOTLINE,LINETHICK0;
J27:EMA("KDJ.J"(27,3,3),5) ,COLOR00FF00,DOTLINE,LINETHICK0;
J36:EMA("KDJ.J"(36,3,3),5) ,COLOR0077FF,DOTLINE,LINETHICK0;
J45:EMA("KDJ.J"(45,3,3),5) ,COLORFF9900,LINETHICK0;
J54:EMA("KDJ.J"(54,3,3),5) ,COLORFF9900,LINETHICK0;
J合力:(3*J9+2*J18+J27+J36+J45+J54)/9,COLOR00FFCC,LINETHICK0;
合力顶:=J合力>85 ;
合力低:=J合力<15;
DRAWTEXT(CROSS(0,合力顶) ,H*1.04,'【顶】'),ALIGN1,COLOR00FFFF,LINETHICK3,LAYER3;
DRAWTEXT(CROSS(0,合力低) ,L*0.97,'【低】'),ALIGN1,COLOR0077FF,LINETHICK3,LAYER0;
VAR1:=REF(CLOSE,1);
VAR2:=(SUM(VOL,2))/((HHV(HIGH,2)-LLV(LOW,2))*(100));
VAR3:=(CLOSE-VAR1)*(VAR2);
VAR4:=SUM(VAR3,0);
VAR5:=SMA(VAR4,15,1);
VAR6:=SMA(VAR4,20,1);
HMZJ:=VAR5-VAR6;
长线:=MA(VAR5-VAR6,15);
短线:=VAR5-VAR6;
长线向上:=长线>ref(长线,1);
短线向上:=短线>ref(短线,1);
DRAWTEXT((HMZJ-REF(HMZJ,1))/ABS(REF(HMZJ,1))>=0.04 and REF(HMZJ,1)>0,LLVALL(low)+0.1,'▲'),COLORRED;