分析家K线波澜(之三)源码公式:
{n=15 , m=32}
stickline(c>0,-10,110,100,0),color999911;
B:=EMA(C,2),color000000;
S:=EMA(SLOPE(C,21)*20+C,42),pointdot,color000000;
BUY:=cross(B,S);
SEL:=cross(S,B);
stickline(B>=S,low,high,0.1,0),colorred;
stickline(B>=S,close,open,4.5,0),color0000AA;
stickline(B>=S,close,open,3,0),color0000CC;
stickline(B>=S,close,open,2,0),color0000DD;
stickline(B>=S,close,open,1,0),color0000FF;
stickline(B<S,close,open,1,0),colorEEEE00;
stickline(B<S,close,open,2,0),colorDDDD00;
stickline(B<S,close,open,3,0),colorCCCC00;
stickline(B<S,close,open,4.5,0),colorAAAA00;
stickline(B<S,low,high,0.1,0),colorFFff00;
stickline(cross(B,S) or cross(S,B),open,close,3.5,0),colorwhite;
Var1:=(CLOSE*2+HIGH+LOW)/4;
SK:= EMA(Var1,13)-EMA(Var1,73);
SD:= EMA(SK,2);
drawtext((cross(sk,sd) and sk<-0.04 and (c-ref(c,1))/ref(c,1)>=0.03) or (cross(sk,sd) and sk<=-0.14 ) or (cross(sk,sd) and sk<=0.05 and (v/ma(v,5)>2 or c/ref(c,1)>0.035)) ,l*0.99,'↑'),coloryellow;
stickline((cross(sk,sd) and sk<-0.04 and (c-ref(c,1))/ref(c,1)>=0.03) or (cross(sk,sd) and sk<=-0.14 ) or (cross(sk,sd) and sk<=0.05 and (v/ma(v,5)>2 or c/ref(c,1)>0.035)),h,l,0.5,0),coloryellow;
stickline((cross(sk,sd) and sk<-0.04 and (c-ref(c,1))/ref(c,1)>=0.03) or (cross(sk,sd) and sk<=-0.14 ) or (cross(sk,sd) and sk<=0.05 and (v/ma(v,5)>2 or c/ref(c,1)>0.035)),o,c,10,1),linethick3,coloryellow;
Var2:=REF(CLOSE,1);
Var3:=SMA(MAX(CLOSE-Var2,0),6,1)/SMA(ABS(CLOSE-Var2),6,1)*100;
DRAWTEXT(CROSS(84,Var3),HIGH,'注'),linethick1,coloryellow;
Var4:=SMA(MAX(CLOSE-Var2,0),12,1)/SMA(ABS(CLOSE-Var2),12,1)*100;
DRAWTEXT(CROSS(Var4,20),LOW-(HIGH-LOW),'底'), linethick2,coloryellow;
Var8:=MA(CLOSE,12);
Var9:=MA(CLOSE,26);
VarA:=REF(Var8,1);
VarB:=REF(Var9,1);
VarC:=(Var8-Var9)/Var8*100;
VarD:=ABS(Var8-VarA)/Var8*100;
VarE:=REF(Var9,1);
VarF:=REF(VarD,1);
Var10:=REF(MA(CLOSE,5),1);
Var11:=REF(MA(CLOSE,10),1);
Var12:=REF(CLOSE,1);
Var13:=COUNT(CLOSE>REF(CLOSE,1),5)/5*100;
Var14:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
Var15:=SMA(Var14,5,1);
Var16:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
Var17:=SMA(Var16,2,1);
Var18:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30)*8;
Var19:=REF(Var15,1);
Var1A:=REF(Var17,1);
Var1B:=REF(Var18,1);
Var1C:=MA(Var17,5);
Var1D:=MA(Var17,12);
Var1E:=MA(Var17,26);
Var1F:=REF(Var13,1);
Var20:=(Var18-Var1B)/Var18*100;
Var21:=SMA(Var14,5,1);
Var22:=REF(Var21,1);
Var23:=SMA(Var16,2,1);
Var24:=REF(Var23,1);
Var25:=IF(CLOSE>OPEN,1,0);
Var26:=IF(MA(CLOSE,5)>Var10,1,0);
Var27:=IF(MA(CLOSE,10)>Var11,1,0);
Var28:=IF(VarD>VarF,1,0);
Var29:=IF(Var17>Var1A,5,0);
Var2A:=IF(Var19>Var15,5,0);
Var2B:=IF(Var18>Var1B,2,0);
Var2C:=IF(VarC>2.25,10,0);
Var2D:=IF(Var17>60,6,0);
Var2E:=IF(Var17>80,8,0);
Var2F:=IF(Var17>Var15,10,0);
Var30:=IF(Var17>Var15,Var1D-Var1E,0);
Var31:=IF(Var17>Var15 AND Var15<20,5,0);
Var32:=IF(CLOSE>Var8 AND Var8>Var9,5,0);
Var33:=IF(Var8>Var9,5,0);
Var34:=IF(Var9>VarE,5,0);
Var35:=IF(Var15<18,Var1C-Var15,0);
Var36:=IF(Var15>Var17 AND Var15>50,8,0);
Var37:=(Var25+Var26+Var27+Var28+Var29+Var2A+Var2B+Var2C+Var2D+Var2E+Var2F+Var30+Var31+Var32+Var33+Var34+Var35-Var36);
Var38:=REF(Var37,1);
Var39:=MA(Var37,6);
Var3A:=MA(Var37,12);
Var3B:=MA(Var37,26);
Var3C:=MA(Var37,13);
Var3D:=REF(Var3A,1);
Var3E:=REF(Var3A,2);
DRAWTEXT(Var19>Var1B AND Var15<Var18 AND Var3A<25 AND Var17>Var15,MA(CLOSE,5),'▲'),linethick2,coloryellow;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD));
Z:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
顶:IF(T1,A,A),COLORYELLOW,POINTDOT,linethick3;
底:IF(T2,Z,Z),COLORWHITE,POINTDOT,linethick3;
Var444:=c;
操作:=MA(Var444,5);
警戒:HHV(操作,13),LINETHICK2,COLORblue;{收盘破此线短逃} |