分享源碼如下
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA);
Zero : 0;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) e=0;
IF(e>100) e=100;
K:a;
D:b;
J:e;
VARA:=(2*CLOSE+HIGH+LOW)/4;
VARB:=EXPMA(EXPMA(EXPMA(VARA,4),4),4);
J:=(VARB-REF(VARB,1))/REF(VARB,1)*1200, COLORSTICK;
STICKLINE(J<0,0 ,J,0,0),colorligreen,LINETHICK3;
VAR1:=EMA(EMA(CLOSE,9),9);
控盤:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
STICKLINE(控盤<0,控盤,0,1,0),colorwhite;
A10:=CROSS(控盤,0);
無莊控盤:IF(控盤<0,控盤,0),colorwhite,NODRAW;
開始控盤:IF(A10,1,0),LINETHICK1,coloryellow,LINETHICK4;
STICKLINE(控盤>REF(控盤,1) AND 控盤>0,控盤,0,1,0),colorred,LINETHICK4;
有莊控盤:IF(控盤>REF(控盤,1) AND 控盤>0,控盤,0),colorred,NODRAW;
VAR2:=100*WINNER(CLOSE*0.95);
STICKLINE(VAR2>50 AND COST(85)<CLOSE AND 控盤>0,控盤,0,1,0),COLORFF00FF;
高度控盤:IF(VAR2>50 AND COST(85)<CLOSE AND 控盤>0,控盤,0),COLORFF00FF,NODRAW;
STICKLINE(控盤<REF(控盤,1) AND 控盤>0,控盤,0,1,0),COLOR00FF00;
主力出貨:IF(控盤<REF(控盤,1) AND 控盤>0,控盤,0),COLOR00FF00,NODRAW;
D:=MA(J,3),colorgreen,LINETHICK10;
K:=MA(J,1),colorcyan,LINETHICK10;