大智慧公式源码概况:
指标类别:大智慧公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 主图
公式解读:
一、大智慧5分钟涨速公式ZF:=(C/REF(C,1)-1)*100;
涨速:SUM(ZF,5);
NOTEXT1:-1.5;
NOTEXT2:3;
DRAWNUMBER(ISLASTBAR,涨速,涨速);
VAR1:=((CLOSE REF(CLOSE,1))AND(CLOSE REF(CLOSE,2)));
VAR2:=((REF(VAR1,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR3:=((REF(VAR2,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR4:=((REF(VAR3,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR5:=((REF(VAR4,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR6:=((REF(VAR5,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR7:=((REF(VAR6,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR8:=((REF(VAR7,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR9:=((REF(VAR8,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VARA:=((REF(VAR9,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VARB:=((REF(VARA,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VARC:=((REF(VARB,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
STICKLINE((((((((((((VAR1ORVAR2)ORVAR3)ORVAR4)ORVAR5)ORVAR6)ORVAR7)ORVAR8)ORVAR9)ORVARA)ORVARB)ORVARC),CLOSE,REF(CLOSE,1),2,1),COLORRED;
VARD:=((CLOSE REF(CLOSE,1))AND(CLOSE REF(CLOSE,2)));
VARE:=((REF(VARD,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VARF:=((REF(VARE,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR10:=((REF(VARF,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR11:=((REF(VAR10,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR12:=((REF(VAR11,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR13:=((REF(VAR12,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR14:=((REF(VAR13,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR15:=((REF(VAR14,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR16:=((REF(VAR15,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR17:=((REF(VAR16,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
VAR18:=((REF(VAR17,1)AND(CLOSE =REF(CLOSE,1)))AND(CLOSE =REF(CLOSE,2)));
STICKLINE((((((((((((VARDORVARE)ORVARF)ORVAR10)ORVAR11)ORVAR12)ORVAR13)ORVAR14)ORVAR15)ORVAR16)ORVAR17)ORVAR18),CLOSE,REF(CLOSE,1),2,1),COLORGREEN;
VAR19:=(REF((((((((((((VARDORVARE)ORVARF)ORVAR10)ORVAR11)ORVAR12)ORVAR13)ORVAR14)ORVAR15)ORVAR16)ORVAR17)ORVAR18),1)ANDVAR1);
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORRED;
VAR1A:=(REF((((((((((((VAR1ORVAR2)ORVAR3)ORVAR4)ORVAR5)ORVAR6)ORVAR7)ORVAR8)ORVAR9)ORVARA)ORVARB)ORVARC),1)ANDVARD);
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORGREEN;
TT:=PERIOD=1ANDCURRBARSCOUNT=48;
OP:=OPEN#MIN5;
CL:=CLOSE#MIN5;
HI:=HIGH#MIN5;
LO:=LOW#MIN5;
OP15:=OPEN#MIN15;
CL15:=CLOSE#MIN15;
HI15:=HIGH#MIN15;
LO15:=LOW#MIN15;
T:=TIME-0930;
AA:=IF(T=3ORT=8ORT=13ORT=73ORT=78ORT=83ORT=88ORT=93ORT=98,1,0);
BB:=IF(T=103ORT=108ORT=113ORT=118ORT=123ORT=128ORT=173ORT=178ORT=183ORT=188ORT=193ORT=198,1,0);
CC:=IF(T=373ORT=378ORT=383ORT=388ORT=393ORT=398ORT=403ORT=408ORT=413ORT=418ORT=423ORT=428,1,0);
DD:=IF(T=473ORT=478ORT=483ORT=488ORT=493ORT=498ORT=503ORT=508ORT=513ORT=518ORT=523ORT=528,1,0);
EE:=IF(AAORBBORCCORDD,1,0);
STICKLINE(EE=1ANDCL OP,CL,HI,0.8,0),COLORRED;
STICKLINE(EE=1ANDCL OP,OP,LO,0.8,0),COLORRED;
STICKLINE(EE=1ANDCL OP,OP,CL,3,1),COLORRED;
STICKLINE(EE=1ANDCL=OP,CL,HI,0.8,0),COLORWHITE;
STICKLINE(EE=1ANDCL=OP,OP,LO,0.8,0),COLORWHITE;
STICKLINE(EE=1ANDCL=OP,OP,CL+0.005,3,0),COLORWHITE;
STICKLINE(EE=1ANDCL OP,OP,HI,0.8,0),COLORCYAN;
STICKLINE(EE=1ANDCL OP,CL,LO,0.8,0),COLORCYAN;
STICKLINE(EE=1ANDCL OP,OP,CL,3,0),COLORCYAN;
DRAWTEXT(TIME=0946ANDCL15 OP15,0.995*LO15, ↑ ),COLORF365F3,LINETHICK3;
DRAWTEXT(TIME=0946ANDCL15 OP15,0.995*LO15, ↑ ),COLOR1AA70E,LINETHICK3;
STICKLINE(TIME=0946ANDCL15 OP15,CL15,HI15,0.8,0),COLORF365F3;
STICKLINE(TIME=0946ANDCL15 OP15,OP15,CL15,6,1),COLORF365F3;
STICKLINE(TIME=0946ANDCL15 OP15,OP15,LO15,0.8,0),COLORF365F3;
DRAWTEXT(TIME=0946ANDCL15 OP15,0.985*LO15, 15分钟K线 ),COLORF365F3;
STICKLINE(TIME=0946ANDCL15 OP15,CL15,HI15,0.8,0),COLOR1AA70E;
STICKLINE(TIME=0946ANDCL15 OP15,OP15,CL15,6,1),COLOR1AA70E;
STICKLINE(TIME=0946ANDCL15 OP15,OP15,LO15,0.8,0),COLOR1AA70E;
DRAWTEXT(TIME=0946ANDCL15 OP15,0.985*LO15, 15分钟K线 ),COLOR1AA70E;
公式解读:
公式编写要求:
RSI划线(副图公式源码{指标:-------------------☆功能开关--------------------}RSI:SMA(MAX(C-REF(C,1),0),8,1)/SMA(ABS(C-REF(C,1)),8,1)*100,COLORWHITE;A1:=REF(RSI,2)=HHV(RSI,2*2+1);B1:=FILTER(A1,2);C1:=BACKSET(B1,2+1);D1:=FILTER(C1,2);{高}A2:=REF(RSI,2)=LLV(RSI,2*2+1);B2:=FILTER(A2,2);C2:=BACKSET(B2,2+1);D2:=FILTER(C2,2);{低}H1:=(D1ANDNOT(D2))ORBARSTATUS=2ORBARSCOUNT(C)=1;L1:=(D2ANDNOT(D1));H2:=D1ANDNOT(D2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1ANDCOUNT(L1,X1) 0,LLVBARS(IF(L1,L,10000),X1));G1:=F1 REF(F1,1);I1:=BACKSET(G1,2);LD:=I1 REF(I1,1);{过滤后低点}L2:=LDORBARSTATUS=2ORBARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2ANDCOUNT(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);{前一高}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2 REF(R2,1);{前二高}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3 REF(R3,1);{前三高}T1:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);U1:=T1 REF(T1,1);{前一低}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2 REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3 REF(T3,1);{前三低}{-----------------【图解模板】---------------------}DRAWGBK((DATE 0),COLORRGB(0,33,0),COLORRGB(0,33,0),1);压一:DRAWLINE(S2,RSI,S1,RSI,1),Color00B5B9,COLORRED;{压力1}压二:DRAWLINE(S3,RSI,S2,RSI,1),Color009AFF;{压力2}撑一:DRAWLINE(U2,RSI,U1,RSI,1),ColorFF68FF;{支撑1}撑二:DRAWLINE(U3,RSI,U2,RSI,1),ColorFFC800;{支撑2}DRAWSL(U2,RSI,0,0,3),POINTDOT,ColorFFAFFF;{启动直线}20,LINEDOT,COLORGRAY;50,LINEDOT,COLORGRAY;80,LINEDOT,COLORGRAY;PARTLINE(C,RSI),COLORWHITE;//
公式编写方法:
DRAWBAND(80,RGB(0,33,0),0,RGB(0,33,0));
{指标:-------------------☆功能开关--------------------}
RSI:SMA(MAX(C-REF(C,1),0),8,1)/SMA(ABS(C-REF(C,1)),8,1)*100,COLORWHITE;
A1:=REF(RSI,2)=HHV(RSI,2*2+1);B1:=FILTER(A1,2);C1:=BACKSET(B1,2+1);D1:=FILTER(C1,2);{高}
A2:=REF(RSI,2)=LLV(RSI,2*2+1);B2:=FILTER(A2,2);C2:=BACKSET(B2,2+1);D2:=FILTER(C2,2);{低}
H1:=(D1ANDNOT(D2))ORISLASTBARORBARSCOUNT(C)=1;
L1:=(D2ANDNOT(D1));H2:=D1ANDNOT(D2);X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1ANDCOUNT(L1,X1) 0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1 REF(F1,1);I1:=BACKSET(G1,2);LD:=I1 REF(I1,1);{过滤后低点}
L2:=LDORISLASTBARORBARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2ANDCOUNT(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(ISLASTBAR,BARSLAST(HD)+1);S1:=R1 REF(R1,1);{前一高}
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2 REF(R2,1);{前二高}
R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3 REF(R3,1);{前三高}
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1 REF(T1,1);{前一低}
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2 REF(T2,1);{前二低}
T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3 REF(T3,1);{前三低};
{-----------------【图解模板】---------------------}
NOTEXT1:20,DOTLINE,COLORGRAY;
NOTEXT2:50,DOTLINE,COLORGRAY;
NOTEXT3:80,DOTLINE,COLORGRAY;
压一:DRAWLINE(S2,RSI,S1,RSI,1),COLOR00B5B9,COLORRED;{压力1}
压二:DRAWLINE(S3,RSI,S2,RSI,1),COLOR009AFF;{压力2}
撑一:DRAWLINE(U2,RSI,U1,RSI,1),COLORFF68FF;{支撑1}
撑二:DRAWLINE(U3,RSI,U2,RSI,1),COLORFFC800;{支撑2};
启动直线:REF(RSI,BARSLAST(CROSS(U2,0.5))),DOTLINE,COLORFFAFFF;