通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
公式源码如下:
MA1:=EMA(C,1);
MA5:=EMA(C,5);
MA10:=EMA(C,10),LINETHICK2;
MA20:=EMA(C,20);
角度:=(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926) 15;
XG:CROSS(MA1,MA5)ANDMA5 MA10ANDMA10 MA20AND角度;
M5:=MA(C,5);
M10:=MA(C,10);
M20:=MA(C,20);
M60:=MA(C,60);
A:=M5 =M60ANDM10 =M60ANDM20 =M60;
T:=BARSLAST(CROSS(A,0.5));
JD:=(ATAN((M60/REF(M60,T)-1)*100)*180/3.1415926);
ZF:=(C-REF(C,T+1))/REF(C,T+1)*100;
LL:=MIN(MIN(M5,M10),M20);
TJ1:=EVERY(LL M60,T);
TJ:=V=HHV(V,60)ANDC REF(C,1)*1.08ANDTJ1ANDZF 60ANDJD 80;
T1:=BARSSINCEN(TJ,T+1);
NOTEXT1:=DRAWLINE(T=0,REF(H,T),T1=0,REF(H,T1),1);
TJA:=EVERY(C NOTEXT1,T1);
XG:=REF(TJA,1)ANDCROSS(C,NOTEXT1)ANDT 30;
DRAWTEXT_FIX(ISLASTBAR,0.01,0,0, 上升 ),COLORBLUE;
STICKLINE(XG,0,8,1.5,0),COLORBLUE;
AT:=HHVBARS(M5,60);
AVV:=IF(C OOR(C=OANDC REF(C,1)),,-999);
AT1:=BARSLAST(M5 REF(M5,AT)ANDAVV=HHV(AVV,AT)ANDH REF(H,AT));
AA:=DRAWLINE(AT=0,REF(H,AT),AT1=0ANDAT 10,REF(H,AT1),1);
AGL:=(C/AA-1)*100;
ATJ:=EVERY(AGL 3,T);
AXL:=HHV(AA/M5,AT1);
AXG:=REF(ATJ,1)ANDCROSS(C,AA)ANDAGL 4ANDAT1 1ANDAXL 1.2;
DRAWTEXT_FIX(ISLASTBAR,0.07,0,0, 下降趋势 ),COLORGREEN;
STICKLINE(AXG,0,8,1.5,0),COLORGREEN;
BHT:=HHVBARS(H,10);
BHTT:=BARSLAST(REF(BHT,1) =4ANDBHT=0);
BHH1:=REF(H,BHTT);
BHH2:=REF(BHH1,BHTT+1);
BHH3:=REF(BHH2,BHTT+1);
BHH:=MAX(MAX(BHH1,BHH2),BHH3);
BLL:=MIN(MIN(BHH1,BHH2),BHH3);
BGL:=BHH/BLL;
BTJ:=COUNT(BHTT=0,30) =3;
BTJ1:=BGL =1.04;
XG1:=BTJ1ANDBTJANDH=HHV(H,30);
BXG:=COUNT(XG1,30)=1ANDXG1;
DRAWTEXT_FIX(ISLASTBAR,0.13,0,0, 强过三峰 ),COLORCYAN;
STICKLINE(BXG,0,4,1.5,0),COLORCYAN;
K:=KDJ.K;
D:=KDJ.D;
J:=KDJ.J;
CHH:=MAX(MAX(K,D),J);
CLL:=MIN(MIN(K,D),J);
CNH:=(CHH/CLL-1)*100;
CA:=K DANDJ K;
CT:=BARSLAST(CROSS(CNH 1,0.5));
CTJ:=MIN(C,O)/L 1.04ANDMIN(C,O) REF(MIN(C,O),1);
CTJ1:=IF(C O,H/O 1.005,C =O);
CXG:=REF(CA,CT+1)ANDCOUNT(CNH 1,CT)=1ANDCNH 1ANDCTJANDCTJ1;
DRAWTEXT_FIX(ISLASTBAR,0.19,0,0, 快进快去 ),COLORRED;
STICKLINE(CXG,0,4,1.5,0),COLORRED;
DSAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
DBD:=IF(DSAT 1,1,DSAT)*100;
DX2:=AMOUNT/VOL/100;
DM13:=MA(DX2,13);
DJD:=(ATAN((MA(DX2,10)/REF(MA(DX2,10),1)-1)*100)*180/3.1415926);
DA:=COUNT(DJD 45,15)=1ANDDJD 45;
DHH:=MAX(MAX(MAX(M5,M10),DM13),M20);
DLL:=MIN(MIN(MIN(M5,M10),DM13),M20);
DNH:=(DHH/DLL-1)*100;
DA1:=M5 MAX(MAX(M10,DM13),M20);
DTJ:=DAANDDBD=100ANDV=HHV(V,30)ANDC O;
DTJ1:=DA1ANDMIN(MIN(M5,M10),M20) M60ANDDNH 4.2;
DXG:=DTJANDDTJ1;
DRAWTEXT_FIX(ISLASTBAR,0.25,0,0, 饱和 ),COLORMAGENTA;
STICKLINE(DXG,0,4,1.5,0),COLORMAGENTA;
ET:=BARSLAST(H=HHV(H,100)ANDV=HHV(V,500));
EHT:=BARSLAST(H=HHV(H,ET+1));
EHT1:=BARSLAST(EVERY(H REF(H,EHT),EHT)ANDCROSS(EHT =80,0.5));
EEXT:=DRAWLINE(EHT=0,REF(H,EHT),EHT1=0,REF(H,EHT),1);
ETT:=BARSLAST(CROSS(EEXT =0,0.5));
EXG:=COUNT(CROSS(C =EEXT,0.5),ETT+1)=1ANDCROSS(C =EEXT,0.5);
DRAWTEXT_FIX(ISLASTBAR,0.31,0,0, 天量 ),COLORBROWN;
STICKLINE(EXG,0,4,1.5,0),COLORBROWN;
FN:=40;
FT:=BARSLAST(H REF(H,1)ANDREF(H,1) REF(H,2));
FHH:=REF(H,FT+1);
FLL:=FINDLOW(L,FT=0,10,1);
FLH:=SUM(H REF(H,1),10);
FZF:=(FHH-FLL)/FLL*100;
FTT:=BARSLAST(FT=0ANDFZF 20ANDFLH 2);
FT1:=SUMBARS(FTT=0,1);
FT2:=SUMBARS(FTT=0,2);
FT3:=SUMBARS(FTT=0,3);
FT4:=SUMBARS(FTT=0,4);
FH1:=REF(FHH,FT1-1);
FH2:=REF(FHH,FT2-1);
FH3:=REF(FHH,FT3-1);
FH4:=REF(FHH,FT4-1);
FAH:=MAX(MAX(MAX(FH1,FH2),FH3),FH4);
FAL:=MIN(MIN(MIN(FH1,FH2),FH3),FH4);
FBL:=FAH/FAL 1.15;
FTJ:=COUNT(CROSS(C,FH1),FTT+1)=1ANDCROSS(C,FH1);
FTJ1:=FH4 FH3ANDFH3 FH2ANDFH2 FH1;
FA:=FTJANDFBLANDFT4 FNANDFTJ1;
FXG:=COUNT(FA,FT4+1)=1ANDFA;
DRAWTEXT_FIX(ISLASTBAR,0.37,0,0, 强过四峰 ),COLORGRAY;
STICKLINE(FXG,0,4,1.5,0),COLORGRAY;
GLT:=LLVBARS(L,60);
GLTT:=BARSLAST(CURRBARSCOUNT=CONST(GLT)+1);
GHT:=FINDHIGHBARS(H,GLT+1,60,1);
GTT:=BARSLAST(CURRBARSCOUNT=CONST(GHT)+1);
GHJ:=REF((REF(H,GTT)-L)*0.618+L,GLTT);
GV1:=IF(C OOR(C=OANDC =REF(C,1)),VOL,0);
GV2:=IF(C OOR(C=OANDC REF(C,1)),VOL,0);
GLJ:=SUM(GV1,GLTT)/SUM(GV2,GLTT);
GXG:=COUNT(CROSS(C =GHJ,0.5),GLTT+1)=1ANDCROSS(C =GHJ,0.5)ANDGLJ 1.5;
DRAWTEXT_FIX(ISLASTBAR,0.43,0,0, 锅里捞金 ),COLORLIRED;
STICKLINE(GXG,0,4,1.5,0),COLORLIRED;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
:=(DIF-DEA)*2;
IT:=BARSLAST(CROSS(DEA,DIF));
IHT:=BARSLAST(HHV(DEA,15)=DEA);
IGT:=BARSLAST(IT=0ANDREF(IHT,1)=0ANDDEA 0);
IGM:=REF(DEA,IGT);
IEXT:=DRAWLINE(IGT=0,DEA,IT=0AND(REF(IGM,1)-DEA) 0.75ANDDEA 0,REF(DEA,IT),1);
IXG:=CROSS(DEA,IEXT);
DRAWTEXT_FIX(ISLASTBAR,0.49,0,0, 破指MC ),COLORYELLOW;
STICKLINE(IXG,0,4,1.5,0),COLORYELLOW;
线:10,coloryellow,LINETHICK2;
RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);
K:=SMA(RSV,3,1);
D:=Sma(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
RE:=crOSS(J,REF(J+0.01,1))ANDXANDJ
stICKLINE(RE,0,1,3,0),coloryellow;
CSS:=((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100);
HH:=CROSS(20,EMA(CSS,3));
CE:=REF(HH,1);
AA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AA,0),5,1)/SMA(Abs(CLOSE-AA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:=IF(SS 13,MA(SS,2),SS)/6;
短线出击:=IF(CROSS(短线买点,1)AND(短线买点 30),30,1);
II:=短线出击=30;
TYP:=IF((H CANDC O)OR(H OANDO =C),C,H)+IF((L CANDC O)OR(L OANDO =C),CLOSE,LOW)/3;
:EMA((TYP-MA(TYP,36.0270012))/(0.015*AVEDEV(TYP,36.0270012)),2.0332),colorgreen;
STICKLINE(CCI 100,CCI,100,4,0),colormagenta;
STICKLINE(CCI -150,CCI,-150,4,0),coloryellow;
STICKLINE(C 0,100,101,10,0),colorred;
STICKLINE(C 0,-150,-151,6,0),colorgreen;
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=((VAR2)/(VAR1))*(100)-70;
VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);
VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VAR10:=IF((VAR9 100),VAR9-100,0);
VAR11:=HHV(HIGH,34);
B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);
持仓:EMA(B1,20),POINTDOT,colorred;
STICKLINE(B1-主力持仓 0,B1,主力持仓,10,0),COLOR0000FF;
STICKLINE(B1-主力持仓 0,B1,主力持仓,10,0),COLOR00FF00;
N:=14;
DIFF:Ema(CLOSE,9)-EMA(CLOSE,17);
DEA:EMA(DIFF,8),colorcyan;
macd:2*(DIFF-DEA);
Zero:0,,colorwhite,LINETHICK2;
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;
RR8:=MA(CLOSE,27);
RR9:=(CLOSE-RR8)/RR8*100;
RRA:=MA(RR9,2);
RRB:=BArslAst(crOSS(-10,RRA)=1);
RRD:=RRA -10ANDRRB
STICKLINE(IF(RRD,-120,0),-120,0,8,0),colorliblue;
【】:IF(RRD,-120,0),coloryellow,LINETHICK2;
TYP:=(IF(ISNULL(HIGH),CLOSE,HIGH)+IF(ISNULL(LOW),CLOSE,LOW)+CLOSE)/3;
cci:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
a:100;
b:-100;
d:180;
:vol/SHGZG*100,nodraw;
MA20:MA(C,20);
MA60:MA(C,60);
DRAWGBK(C MA(C,60),STRIP(RGB(0,100,0),RGB(0,99,0),1));
DRAWGBK(C MA(C,60)ANDC/MA(C,60) 1.10,STRIP(RGB(99,0,0),RGB(99,0,0),1));
DRAWGBK(C/MA(C,60) 1.1,STRIP(RGB(99,0,99),RGB(99,0,99),1));
DRAWICON(CROSS(CCI,b),b, buy
DRAWICON(CROSS(d,CCI),CCI, sell
KN:=30;
KT1:=BARSLAST(H=HHV(H,KN));
KT2:=BARSLAST(L=LLV(L,KN));
KT3:=BARSLAST(VOL=HHV(VOL,KN));
KT4:=BARSLAST(VOL=LLV(VOL,KN));
KHH:=HHV(IF(KT1=0,H,-999),3);
KLL:=LLV(IF(KT2=0,L,999),3);
KVH:=HHV(IF(KT3=0,VOL,-999),3);
KVL:=LLV(IF(KT4=0,VOL,9999999999),3);
KH1:=FINDHIGH(KHH,0,KN,1);
KH2:=FINDHIGH(KHH,0,KN,2);
KH3:=FINDHIGH(KHH,0,KN,3);
KL1:=FINDLOW(KLL,0,KN,1);
KL2:=FINDLOW(KLL,0,KN,2);
KL3:=FINDLOW(KLL,0,KN,3);
KVH1:=FINDHIGH(KVH,0,KN,1);
KVH2:=FINDHIGH(KVH,0,KN,2);
KVH3:=FINDHIGH(KVH,0,KN,3);
KVL1:=FINDLOW(KVL,0,KN,1);
KVL2:=FINDLOW(KVL,0,KN,2);
KVL3:=FINDLOW(KVL,0,KN,3);
KPH:=(KH1+KH2+KH3)/3;
KPL:=(KL1+KL2+KL3)/3;
KPVH:=(KVH1+KVH2+KVH3)/3;
KPVL:=(KVL1+KVL2+KVL3)/3;
KTJ:=KPH/KPL;
KTJ1:=KPVH/KPVL 1.5;
KTJ2:=C (KPH+KPL)/2ANDC MA(C,10);
KXG:=CROSS(RANGE(KTJ,1.2,1.3)ANDKTJ1,0.5);
DRAWTEXT_FIX(ISLASTBAR,0.55,0,0, 量价 ),COLORWHITE;
STICKLINE(KXG,0,4,1.5,0),COLORWHITE;
QLT:=LLVBARS(L,60);
QLTT:=BARSLAST(CURRBARSCOUNT=CONST(QLT)+1);
QHT:=FINDHIGHBARS(H,QLT+1,60,1);
QTT:=BARSLAST(CURRBARSCOUNT=CONST(QHT)+1);
QT:=BARSLAST(CROSS(C,REF(H,QTT)));
QGL:=C/REF(H,QTT);
QTA:=BARSLAST(QGL=HHV(QGL,QT+1));
QDF:=(C-REF(C,QTA+1))/REF(C,QTA+1)*100;
N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
cci:(TYP-ma(TYP,N))/(0.015*AVEDEV(TYP,N))*1.35;
流入2日5层:MA(CCI,2);
流入5日3层:MA((CCI+流入2日5层)/2,3);
QJL:=L/REF(H,QTT);
QXG1:=QDF -8ANDQJL 1.075ANDMIN(C,O)*1.005 =REF(H,QTT);
QXG:=COUNT(QXG1,QT+1)=1ANDQXG1;
DRAWTEXT_FIX(ISLASTBAR,0.61,0,0, 破锅回踩 ),COLORLIMAGENTA;
STICKLINE(QXG,0,4,1.5,0),COLORLIMAGENTA;
TA:=BARSSINCE(CLOSE);
MA5:=IF(TA =5,MA(C,5),0);
MA10:=IF(TA =10,MA(C,10),0);
MA20:=IF(TA =20,MA(C,20),0);
MA60:=IF(TA =60,MA(C,60),0);
A1:=MA5 MA10ANDMA10 MA20ANDMA20 MA60;
LMAX:=MAX(MAX(MA5,MA10),MAX(MA20,MA60));
CROSS(CLOSE,MA5)ANDV =REF(V,1)ANDA1;
[源码注释]通达信公式动态公式解读