M:=60;N:=30;
MA5:=EMA(C,5);
MA13:=EMA(C,6);
橙色持:0,COLOR0066CC;
绿色卖:10,COLOR00FF00;
灰色关注:0,COLOR666666;
UP:=DRAWLINE(L=LLV(L,BArslAST(crOSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
{ 股票公式 }
STICKLINE(橙色持+绿色卖,0,80,5,0),COLOR666666;
STICKLINE(UP,0,80,5,0),COLOR0066CC;
STICKLINE(DOWN,0,80,5,0),COLOR003300;
A7:=(2*C+H+L)/4;
VARR:=LLV(A7,21);
VAR11:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR22:=REF(VAR11,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR33:=REF(VAR22,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR44:=REF(VAR33,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR55:=REF(VAR44,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR66:=REF(VAR55,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR77:=REF(VAR66,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR88:=REF(VAR77,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR99:=REF(VAR88,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARAA:=REF(VAR99,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARBB:=REF(VARAA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARCC:=REF(VARBB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARDD:=CLOSE
VAREE:=REF(VARDD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARFF:=REF(VAREE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR100:=REF(VARFF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR110:=REF(VAR100,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR120:=REF(VAR110,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR130:=REF(VAR120,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR140:=REF(VAR130,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR150:=REF(VAR140,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR160:=REF(VAR150,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR170:=REF(VAR160,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR180:=REF(VAR170,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR190:=REF(VARDD OR VAREE OR VARFF OR VAR100 OR VAR110 OR VAR120 OR VAR130 OR
VAR140 OR VAR150 OR VAR160 OR VAR170 OR VAR180,1) AND VAR11;
VAR1A:=REF(VAR11 OR VAR22 OR VAR33 OR VAR44 OR VAR55 OR VAR66 OR VAR77 OR
VAR88 OR VAR99 OR VARAA OR VARBB OR VARCC,1) AND VARDD;
获利盘:WINNER(CLOSE)*100,COLOR0066CC NODRAW;
STICKLINE(UP,0,获利盘,2,1),COLORRED;
STICKLINE(DOWN,0,获利盘,2,1),COLORFFFF00;
AA:= REF(HIGH,1);
BB:= REF(LOW,1);
CC:= REF(OPEN,1);
DD:= REF(CLOSE,1);
EE:=(AA+BB+CC+2*DD)/5;
AAA:=EE+(AA-BB);
BBB:=2*EE-BB;
CCC:=2*EE-AA;
DDD:=EE-(AA-BB);
升突破价:AAA, NODRAW;
升阻力价:BBB,COLOR00FFFF NODRAW;
跌支撑价:CCC,COLOR0099FF NODRAW;
跌势确立:DDD,COLORFF99CC NODRAW;
LC:=REF(CLOSE,1);
止损价:(LC*1.0035*97+0.2)/99.65,COLORRED,NODRAW;
{散户线}
散户: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORWHITE;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
主力:EMA(J,6),COLORYELLOW;
VAR2:=REF(LOW,1);
VAR3:=SMA(Abs(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;
AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8);
走势:CEILING(SMA(AA5,13,8)),COLORRED,LINETHICK2;
AA6:=SMA(AA3,21,8);
DRAWICON(FILTER(J>REF(J,1)AND 走势>=REF(走势,1)AND 走势<25 ,5),走势,5);
DRAWICON(FILTER(J85 ,5),J,6);