{J轨道疯}
{KK:2,50,10,N:1,50,5}
{7.主散带}
AA:=COST(95);
散户带上沿:(20*AA+19*REF(AA,1)+18*REF(AA,2)+17*REF(AA,3)+16*REF(AA,4)+15*REF(AA,5)+14*REF(AA,6)
+13*REF(AA,7)+12*REF(AA,8)+11*REF(AA,9)+10*REF(AA,10)+9*REF(AA,11)+8*REF(AA,12)
+7*REF(AA,13)+6*REF(AA,14)+5*REF(AA,15)+4*REF(AA,16)+3*REF(AA,17)+2*REF(AA,18)+
REF(AA,20))/210,COLORFF9900;
A2:=COST(75);
散户带下沿:=(20*A2+19*REF(A2,1)+18*REF(A2,2)+17*REF(A2,3)+16*REF(A2,4)+15*REF(A2,5)+14*REF(A2,6)
+13*REF(A2,7)+12*REF(A2,8)+11*REF(A2,9)+10*REF(A2,10)+9*REF(A2,11)+8*REF(A2,12)
+7*REF(A2,13)+6*REF(A2,14)+5*REF(A2,15)+4*REF(A2,16)+3*REF(A2,17)+2*REF(A2,18)+
REF(A2,20))/210;
A3:=COST(55);
主力带上沿:=(20*A3+19*REF(A3,1)+18*REF(A3,2)+17*REF(A3,3)+16*REF(A3,4)+15*REF(A3,5)+14*REF(A3,6)
+13*REF(A3,7)+12*REF(A3,8)+11*REF(A3,9)+10*REF(A3,10)+9*REF(A3,11)+8*REF(A3,12)
+7*REF(A3,13)+6*REF(A3,14)+5*REF(A3,15)+4*REF(A3,16)+3*REF(A3,17)+2*REF(A3,18)+
REF(A3,20))/210;
A4:=COST(35);
主力带下沿:=(20*A4+19*REF(A4,1)+18*REF(A4,2)+17*REF(A4,3)+16*REF(A4,4)+15*REF(A4,5)+14*REF(A4,6)
+13*REF(A4,7)+12*REF(A4,8)+11*REF(A4,9)+10*REF(A4,10)+9*REF(A4,11)+8*REF(A4,12)
+7*REF(A4,13)+6*REF(A4,14)+5*REF(A4,15)+4*REF(A4,16)+3*REF(A4,17)+2*REF(A4,18)+
REF(A4,20))/210;
{FILLRGN(散户带上沿,散户带下沿,散户带上沿>散户带下沿,RGB(0,0,255)),LAYER5;
FILLRGN(主力带上沿,主力带下沿,主力带上沿>主力带下沿,RGB(100,0,60)),LAYER5;
FILLRGN(主力带上沿,散户带下沿,主力带上沿<散户带下沿,RGB(80,80,80)),LAYER5;};
DRAWBAND(散户带上沿,RGB(0,0,200),散户带下沿,RGB(0,0,200));
DRAWBAND(主力带上沿,RGB(80,0,80),主力带下沿,RGB(80,0,80));
DRAWBAND(散户带下沿,RGB(50,50,50),主力带上沿,RGB(50,50,50));
{1.120天牛熊线} {2.K线} AG1:=REF(H,N)=HHV(H,2*N+1);
牛熊:MA(C,120),COLOR0000FF,LINETHICK2;
IF(牛熊
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.0,0),COLORRED;
STICKLINE(CLOSE
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.5,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
{3.疯傻轨道}
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,18))/MA(CLOSE,18);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,COLOR0077FF,LINETHICK1;
IF(上
疯:(1+14/100)*DD,COLOR0077FF,LINETHICK2;
IF(疯
下:(1-7/100)*DD,COLOR0077FF,LINETHICK1;
IF(下
中:(上+下)/2,COLOR0077FF,LINETHICK2;
IF(中
傻:(1-14/100)*DD,COLOR0077FF,LINETHICK2;
IF(傻
{4.J合力}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J9:=EMA(3*K-2*D,5);
RSV1:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K1:=SMA(RSV1,3,1);
D1:=SMA(K1,3,1);
J18:=EMA(3*K1-2*D1,5);
RSV2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
K2:=SMA(RSV2,3,1);
D2:=SMA(K2,3,1);
J27:=EMA(3*K2-2*D2,5);
RSV3:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
K3:=SMA(RSV3,3,1);
D3:=SMA(K3,3,1);
J36:=EMA(3*K3-2*D3,5);
RSV4:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
K4:=SMA(RSV4,3,1);
D4:=SMA(K4,3,1);
J45:=EMA(3*K4-2*D4,5);
RSV5:=(CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100;
K5:=SMA(RSV5,3,1);
D5:=SMA(K5,3,1);
J54:=EMA(3*K5-2*D5,5);
J合力:=(3*J9+2*J18+J27+J36+J45+J54)/9;
合力顶:=J合力>85 ;
合力低:=J合力<15;
DRAWTEXT(CROSS(85,J合力) ,H*1.05,'【顶】'),COLOR00FFFF,LINETHICK3;
DRAWTEXT(CROSS(15,J合力) ,L*0.95,'【低】'),COLOR0077FF,LINETHICK3;
{低部}
DIBU:= K<15 AND D<15 AND K1<15 AND D1<15 AND K2<20 AND D2<20 AND D3<20 AND D5<20;
DRAWTEXT(DIBU>0 ,L*0.95,'【买】'),COLOR00FFFF,LINETHICK2;
{以下是未来函数部分----可删除}
{5.压力支撑}
B1:=FILTER(AG1,N);
C1:=BACKSET(B1,N+1);
DD1:=FILTER(C1,N);{高点}
AG2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(AG2,N);
C2:=BACKSET(B2,N+1);
DD2:=FILTER(C2,N);{低点}
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2; E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}
H1:=(DD1 AND NOT(DD2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(C)=1;
L1:=(DD2 AND NOT(DD1 AND E1
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS
(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS
(IF(H2,H,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
R1:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
S1:=R1>REF(R1,1); {前一高}
T1:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
U1:=T1>REF(T1,1); {前一低}
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1); {前二高}
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1); {前二低}
短期压力:DRAWLINE(S2,H,S1,H,1),DOTLINE,COLORRED;
短期支撑:DRAWLINE(U2,L,U1,L,1),DOTLINE,COLORGREEN;
{6.升降转向.波浪顶底}
HIGH1:=PEAK(1,KK,1);
LOW1:=TROUGH(2,KK ,1);
降:DRAWLINE(H=HIGH1,HIGH,L=LOW1,LOW,0),COLOR00FF00,LINETHICK2;
升:DRAWLINE(L=LOW1,LOW,H=HIGH1,HIGH,0),COLORRED,LINETHICK2;
HHD:=FILTER(BACKSET(FILTER(REF(H,10)=HHV(H,2*10+1),10),10+1),10);
LLD:=FILTER(BACKSET(FILTER(REF(L,10)=LLV(L,2*10+1),10),10+1),10);
A:=REF(H,BARSLAST(HHD));
B:=REF(L,BARSLAST(LLD));
TT1:=BARSLAST(HHD)
波浪顶:IF(TT1,A,A),COLORFF00FF,POINTDOT,LINETHICK2;
波浪底:IF(TT2,B,B),COLOR80FF00,POINTDOT,LINETHICK2;