参数:n(24)
EMA13:=EMA(C,13);
EMA21:=EMA(C,21);
EMA34:=EMA(C,34);
EMA60:=MA(C,60);
买线:=EMA(C,4);
卖线:EMA(SLOPE(C,21)*20+C,42);
BU:=cross(买线,卖线);
SEL:=cross(卖线,买线);
drawtext(bu,LOW,'B'),ALIGN1,VALIGN0,colorred,linethick3;
DRAWTEXT(bu,LOW,' ̄'),ALIGN1,VALIGN0,Color208FFF,LINETHICK3;
DRAWTEXT(sel,HIGH,' ̄'),ALIGN1,VALIGN0,ColorFFFF00,LINETHICK3;
drawtext(sel,HIGH,'S'),ALIGN1,VALIGN2,colorgreen,linethick3;
stickline(买线>=卖线,low,high,0.1,1),colorred;
stickline(买线>=卖线,close,open,8,1),colorred;
stickline(买线<卖线,close,open,8,0),color00ff00;
stickline(买线<卖线,low,high,0.1,1),color00ff00;
stickline(cross(买线,卖线) or cross(卖线,买线),open,close,6,0),colorffff00;
指导线: EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2),linethick1,Color00ff00;
界: MA(CLOSE,27),linethick1,Color00FFFF;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.1,'↑低'),COLORYELLOW;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.3,' 吸'),COLORYELLOW;
DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛');
{DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);
DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2); }
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);
DRAWICON(卖出<0,H+0.05,2); 买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
{B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;
S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN; }
A0:=(L+H+C*2)/4;
A1:=EMA(A0,14);
A2:=EMA(A0,25);
A1X:=(A1-REF(A1,1))/REF(A1,1)*100;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100;
{看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA;
逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORCYAN;
买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK3;
卖出空仓:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK3;}
STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;
STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;
STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;
STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;
WXJDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MAX(MA(C,60),MA(C,120))));
SXJDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MA(C,60)));
WXD1Y:=CROSS(C,WXJDZ);
SXD1Y:=CROSS(C,SXJDZ);
五线第一阳:=(WXD1Y AND COUNT(WXD1Y,30)=1) OR (SXD1Y AND COUNT(SXD1Y,20)=1) AND ((C-REF(C,1))/REF(C,1)>=0.03);
DRAWTEXT(五线第一阳,L-0.1,'▲五线第一阳'),COLORYELLOW;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA40:=MA(C,40);
MA60:=MA(C,60);
AA:=BARSLAST(MA10>MA20 AND (MA5=MA10 OR MA5>MA10));
BB:=REF(COUNT(C<MA20,AA)=AA,1);
CC:=CROSS(C,MA20) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;
DD:=BARSLAST(MA40>MA60 AND (MA20=MA40 OR MA20>MA40));
EE:=REF(COUNT(C<MA60,AA)=AA,1);
FF:=CROSS(C,MA60) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;
芙蓉出水:=BB AND CC OR EE AND FF;
DRAWTEXT(芙蓉出水,MA5,'▲'),COLORWHITE;
DRAWTEXT(芙蓉出水,MA5-0.2,'芙'),COLORWHITE;
DRAWTEXT(芙蓉出水,MA5-0.4,'蓉'),COLORWHITE;
DRAWTEXT(芙蓉出水,MA5-0.6,'出'),COLORWHITE;
DRAWTEXT(芙蓉出水,MA5-0.8,'水'),COLORWHITE;
{N 24 1 100 1}
aa:=N;
A1:=REF(H,aa)=HHV(H,2*aa); B1:=FILTER(A1,aa); C1:=BACKSET(B1,aa);
D1:=FILTER(C1,aa);A2:=REF(L,aa)=LLV(L,2*aa); B2:=FILTER(A2,aa);
C2:=BACKSET(B2,aa); D2:=FILTER(C2,aa);
R1:=BACKSET(DISPSTATUS=2,BARSLAST(D1)+1); S1:=R1>REF(R1,1);
T1:=BACKSET(DISPSTATUS=2,BARSLAST(D2)+1); U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(D1),1)+2); S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(D2),1)+2); U2:=T2>REF(T2,1);
R3:=BACKSET(S2,REF(BARSLAST(D1),1)+2); S3:=R3>REF(R3,1);
T3:=BACKSET(U2,REF(BARSLAST(D2),1)+2); U3:=T3>REF(T3,1);
R4:=BACKSET(S3,REF(BARSLAST(D1),1)+2); S4:=R4>REF(R4,1);
T4:=BACKSET(U3,REF(BARSLAST(D2),1)+2); U4:=T4>REF(T4,1);
DRAWLINE(S2,H,S1,H,1),Color883333;
DRAWLINE(U2,L,U1,L,1),LINETHICK2,POINTDOT,Colorffff00;
DRAWLINE(S3,H,S2,H,1),Color008833;
DRAWLINE(U3,L, U2,L,1),LINETHICK2,POINTDOT,Color338833;
DRAWLINE(S4,H,S3,H,1),Color00CCCC;
DRAWLINE(U4,L, U3,L,1),LINETHICK2,Color0000CC; |