INPUT:N(13,1,100),P(3,1,10),Q(3,1,35);
DRAWGBK(C,STRIP(RGB(100,50,0),RGB(100,100,0),0));
X1:=REF(C,1);
X2:=SMA(MAX(C-X1,0),N,1)/SMA(ABS(C-X1),N,1)*100;
X3:=((3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*SMA(SMA((C-LLV
(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1)-50)*1.032+50);
X4:=(X2+X3)/2;
奇妙线:C+(X4/50-1)*(MA(C,30)/20)*P,COLORFFEEBB;
AA1:=EMA(C,2); { 短指数平滑移动平均线 }
BB1:=EMA(AA1,2); { 平滑 }
A:=MA(BB1,3); { 平均 }
AA2:=EMA((H+C+O)/3,18); { 长指数平滑移动平均线 }
DD3:=A>=AA2 AND C>AA2; { 短>长,且收>长 }
DD4:=A<AA2 ; { 短<长 }
DD5:=A>AA2 ; { 短>长 }
STICKLINE((DD4 OR DD5)AND O<=C,C,O,6,0),COLORFF88CC; {跌势阳线}
STICKLINE((DD4 OR DD5)AND O<=C,H,L,0.5,0),COLORFF88CC; {跌势阳线}
STICKLINE((DD4 OR DD5)AND O>=C,C,O,6,0),COLORCYAN; {跌势阴线}
STICKLINE((DD4 OR DD5)AND O>=C,H,L,0.5,0),COLORCYAN; {跌势阴线}
STICKLINE((DD3 OR C>AA2)AND O<=C,C,O,6,0),COLORRED; {涨势阳线}
STICKLINE((DD3 OR C>AA2)AND O<=C,H,L,0.5,0),COLORRED; {涨势阳线}
STICKLINE((DD3 OR C>AA2)AND O>=C,C,O,6,0),COLOR00CC99; {涨势阴线}
STICKLINE((DD3 OR C>AA2)AND O>=C,H,L,0.5,0),COLOR00CC99; {涨势阴线};
RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
KK:=SMA(RSV1,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
M:=BARSLAST(CROSS(DD,JJ));
警示线:REF(H,M),POINTDOT,COLORYELLOW;{进场; 止赢; 止损; 黄}
STICKLINE(警示线,警示线,警示线,3.8,1),COLORYELLOW;
A1:=BACKSET(REF(H,2)=HHV(H,5),3);
A2:=BACKSET(REF(L,2)=LLV(L,5),3);
A3:=CROSS(A1,0.9);
A4:=CROSS(A2,0.9);
上沿:REF(H,BARSLAST(A3)),POINTDOT,COLORFF8918;
STICKLINE(C,REF(H,BARSLAST(A3)),REF(H,BARSLAST(A3)),5,1),COLORFF8918;
下沿:REF(L,BARSLAST(A4)),POINTDOT,COLORMAGENTA;
STICKLINE(C,REF(L,BARSLAST(A4)),REF(L,BARSLAST(A4)),5,1),COLORMAGENTA;
XX:=DISPSTATUS=2;
DRAWTEXT(XX,上沿,'上沿:'+NUMTOSTRN(上沿,2)),ALIGN2,VALIGN2,COLORGREEN;
DRAWTEXT(XX,下沿,'下沿:'+NUMTOSTRN(下沿,2)),ALIGN2,VALIGN0,COLORYELLOW;