CCI
N:=14;
M:=210;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
TYP15:=(HHV(HIGH,15)+LLV(LOW,15)+CLOSE)/3;
CCI15:(TYP15-MA(TYP15,M))/(0.015*AVEDEV(TYP15,M)),COLORRED;
OBV:=CCI;
P:=5;
A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);{高點}
A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低點}
上:REF(OBV,BARSLAST(D1)),COLORFF00FF,NODRAW;
下:REF(OBV,BARSLAST(D2)),COLOR00FF00,NODRAW;
向上:CROSS(OBV,上*1.01),NODRAW;
相對能量:(OBV-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,OBV,S11,OBV,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,OBV,U11,OBV,1),COLOR00FF00;
STICKLINE(C>0,下,下,1,0),COLOR00FF00;
STICKLINE(C>0,上,上,1,0),COLORFF00FF;
DRAWTEXT(CROSS(OBV,上*1.01),上,'上'),COLORYELLOW;
DRAWTEXT(CROSS(下*0.99,OBV),下,'下'),COLORYELLOW;
DRAWICON(D1,OBV,1);
DRAWICON(D2,OBV,2);
-100;0;100;
主力吸籌
N:=9;6
;M1:=3;
M2:=3;
P:=9;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
JJ:=P*(3*D-2*K);
J:=((3 * K) – (2 * D));
MAIRU:= CROSS(K,D) ANDK<20;
MAICHU:= CROSS(D,K) AND D>80;
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,13);
VAR6:=HHV(VAR4,13);
VAR7:=IF(MA(CLOSE,34),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
吸籌:VAR9,LINETHICK2,COLORF00FF0;
STICKLINE(VAR9>-120,0,VAR9,8,1),COLORF00FF0;
快線:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2,COLORRED;
慢線:SMA(快線,M1,1),COLORCYAN;
{空:SMA(慢線,M2,1),COLOR00FF00;
牛股:IF(BARSLAST(CROSS(慢線,空))
STICKLINE(牛股,0,90,1,0),COLORFF937F;}
BB:=IF(BARSLAST(CROSS(慢線,快線))>=3 AND CROSS(快線,慢線)AND 慢線<30,20,0);
{STICKLINE(BB,0,100,7,1),COLORYELLOW;
DRAWICON(BB>0,10,7);}
AA:=IF(BARSLAST(CROSS(快線,慢線))>=4 AND CROSS(慢線,快線)AND 快線>50,20,0);
{STICKLINE(AA,80,100,7,1),COLOR00FF00;}
{DRAWICON(AA>0,90,8);};
真假黑馬
VAR2:=(3)*(SMA(((OPEN – LLV(LOW,89))/(HHV(HIGH,89) -LLV(LOW,89)))*(100),20,1)) – (2)*(SMA(SMA(((OPEN -LLV(LOW,89))/(HHV(HIGH,89) -LLV(LOW,89)))*(100),20,1),15,1));
VAR3:=VAR2 – 100;
VAR5:=CLOSE-LOW;
VAR6:=HIGH-LOW;
VAR7:=CLOSE-HIGH;
VAR8:=IF(CLOSE>=0,(VAR5/VAR6+VAR7/VAR6)*VOL,(VAR7/VAR6+VAR5/VAR6)*VOL);
主力控盤: SUM(VAR8,10)/10000, COLOr006AFF,Linethick2,STICK;
RSV:=(C-LLV(L,21))/(HHV(H,21) – LLV(L,21))*100;
趨勢:MA((3*SMA(RSV,6,1)-2*SMA(SMA(RSV,5,1),5,1)),2),Linethick1,coloryellow;
背離:FORCAST(-1*VAR3,21),Linethick1,Colorff00FF;
DRAWTEXT((CROSS(背離,趨勢)),背離,'▼'),Linethick2,Color00FF00;
DRAWTEXT((CROSS(趨勢,背離)),背離,'黑↑馬'),colorred;
DRAWTEXT(((趨勢)/(背離) > (8)) and (背離 <10) and (趨勢 > 85),
(趨勢)*(1.120000004768),'跑'),Color00FF00;
黑馬跟蹤天數:BARSLAST(趨勢 < 背離),colorff0000;
量:=(EMA(IF(C>=REF(C,2),V,(-V)),60)/MA(V,60))*100;
量線:量,COLOR50ff50;
T3:=EMA(量,21),COLORFF00FF;
STICKLINE(T3>=REF(T3,1),T3,T3,6,0),COLORRED,LINETHICK2;
STICKLINE(T3