通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
公式源码如下:
-100*(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5)),COLORYELLOW;
-100*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10)),COLORGREEN;
-100*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20)),COLORFFAA00;
-100*(HHV(HIGH,30)-CLOSE)/(HHV(HIGH,30)-LLV(LOW,30)),COLORRED,linethick2;
dxy:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;dxe:=SMA(dxy,3,1);dxs:=SMA(dxe,3,1);
:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3),COLOR4FB9B9;
动向:3*dxe-2*dxs,COLOR1010FF;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
MACD:=(2)*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
接近大盘底:=(REF(CLOSE,A1+1) CLOSE)AND(DIFF REF(DIFF,A1+1))ANDCROSS(DIFF,DEA);
STICKLINE(接近大盘底,0,0.1,10,0),COLOR0000FF;
DRAWTEXT(接近大盘底,0.01, 接近大盘底 ),COLORWHITE;
Var3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
Var4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
Var5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
Var6:=(Var3+Var4+Var5)/3;
Var7:=EMA(Var6,5);
指标:EMA(EMA(Var3,5),5)*3,COLORSTICK;
Var8:=IF(Var6 =-20,10,0);
Var9:=HHV(Var8,10);
STICKLINE(Var8=10,20,10,5,0),COLOR6666FF;
VarA:=IF(Var9ANDCROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:EMA(Var7,5)*2,COLORff00ff;
D:EMA(K,5),colorwhite;
J:K*3-D*2,coloryellow;
VarB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5))ANDJ 10;
换手:VOL/CAPITAL*100,colorgreen;
DRAWTEXT(VarA=20,15, 底部 ),linethick1,colorwhite;
STICKLINE((VarA=20),0,10,5,0),colorwhite;
VARC:=(ZIG(3,5) REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1) =REF(ZIG(3,5),2))AND(REF(ZIG
(3,5),2) =REF(ZIG(3,5),3));
VARD:=(ZIG(3,5) REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1) =REF(ZIG(3,5),2))AND(REF(ZIG
(3,5),2) =REF(ZIG(3,5),3));
STICKLINE((VARC=1),(-14),0,4,0),Color0000FF;
DRAWTEXT((VARC=1),(-14), 买 ),Color0000FF;
STICKLINE((VARD=1),14,0,4,0),Color00FF00;
DRAWTEXT((VARD=1),18, 卖 ),Color00FF00;
VarE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VarF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
Var10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
Var11:=VarF REF(Var10,1)ANDVOL REF(VOL,1)ANDCLOSE REF(CLOSE,1);
DRAWTEXT(Var11ANDCOUNT(Var11,30)=1,15, 大活动 ),linethick1,COLORff00ff;
STICKLINE(Var11ANDCOUNT(Var11,30)=1,1,10,5,0),colorff00ff;
80,COLOR888888,;
QW1:=(HIGH+LOW+CLOSE*2)/4;
QW3:=EMA(QW1,10);
QW4:=STD(QW1,10);
QW5:=(QW1-QW3)*100/QW4;
QW6:=EMA(QW5,5);
RK7:=EMA(QW6,10);
涨:EMA(QW6,10)+100/2-5,LINETHICK1,COLORYELLOW;
跌:=EMA(涨,4),LINETHICK1,COLORFFFF34,;
多线:IF(CROSS(涨,跌)AND跌 -10,30,0),LINETHICK1,COLORYELLOW;
空线:IF(CROSS(跌,80),70,100),COLORFF9900,;
买1:=EMA(跌,4),COLORWHITE,;
买2:=EMA(买1,4),COLORGREEN,;
买M3:=EMA(买2,4);
买M4:=EMA(买M3,4);
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),0,0),COLORWHITE,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),8,0),COLOR008800,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),7,0),COLOR009900,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),6,0),COLOR00AA00,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),5,0),COLOR00BB00,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),4,0),COLOR00CC00,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),3,0),COLOR00DD00,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),2,0),COLOR00EE00,;
STICKLINE(涨 REF(涨,1),涨,MA(涨,3),1,0),COLOR00FF00,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),0,0),COLOR00BBFF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),8,0),COLOR0011FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),7,0),COLOR0022FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),6,0),COLOR0044FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),5,0),COLOR0066FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),4,0),COLOR0088FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),3,0),COLOR0099FF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),2,0),COLOR00AAFF,;
STICKLINE(涨 REF(涨,1),涨,EMA(涨,3),1,0),COLOR00BBFF,;DRAWICON(多线,30,1);
DRAWICON(CROSS(跌,80),70,2);VAR7B:=IF(TROUGHBARS(3,16,1)=0ANDHIGH LOW+0.04,4,0);DRAWTEXT(VAR7B 0,60, ★探底 ),COLORYELLOW;DRAWTEXT(CROSS(涨,跌)AND跌 20AND跌 -10,40, 买入 ),COLORCCFF99;
DRAWTEXT(多线 0,-20, 涨.涨 ),COLOR0000FF;
VAR811:=SUMBARS(VOL,(7)*100);
VAR822:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR883:=(CLOSE-VAR822)/VAR822*100;
VAR884:=HHV(VAR883,VAR811);
VAR885:=LLV(VAR883,VAR811);
VAR886:=(VAR883-VAR885)/(VAR884-VAR885)*100;
K:=SMA(VAR886,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
MA1:=MA(J,3);
STICKLINE(FILTER(J MA1ANDJ =3,5)=1AND跌 0,涨,涨+20,6,0),COLORYELLOW,;
DRAWTEXT(FILTER(J MA1ANDJ =3,5)=1AND跌 0,5, 买 ),COLORMAGENTA;VAR2:=MA(CLOSE,194);VAR44:=REF(CLOSE,1);
{风向}
VAR1:=XMA(REF((L+OPEN+CLOSE+HIGH)/4,1),2);
VAR22:=SMA(ABS(LOW-VAR1),11,1)/SMA(MAX(LOW-VAR1,0),11,1);
VAR3:=EMA(VAR2,3);
VAR4:=LLV(LOW,11);
VAR5:=EMA(IF(LOW =VAR4,VAR3,0),5.5);
博弈:=IF(VAR5 REF(VAR5,1),VAR5,0),COLORRED,NODRAW;
Q133009678号:=IF(VAR5 REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW;
差:EXPMEMA(博弈+Q133009678号,1),COLORRED,NODRAW;
网:=EXPMEMA(博弈-Q133009678号,1);
:=EXPMEMA(差*网,1);
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,4,0),COLOR000099;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,3,0),COLOR0000CC;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,1.5,0),COLOR0000FF;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,0.5,0),COLORCC66FF;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,3,0),COLORCC00FF;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,4,0),COLORAA00AA;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,3,0),COLORBB00BB;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,2,0),COLORDD00DD;
STICKLINE(机构 REF(机构,1)AND机构 0,0,机构,1,0),COLORCC00FF;
DRAWTEXT(CROSS(机构,0),20, 介入 ),COLOR00FFFF;
DRAWTEXT(CROSS(0,机构),机构, 买底 ),COLORYELLOW;
DATA:=5;
{多头买入}DRAWICON(ZIG(3,DATA) REF(ZIG(3,DATA),1)
ANDREF(ZIG(3,DATA),1) =REF(ZIG(3,DATA),2)
ANDREF(ZIG(3,DATA),2) =REF(ZIG(3,DATA),3),L*0.98,1);
{多头卖出}DRAWICON(ZIG(3,DATA) REF(ZIG(3,DATA),1)
ANDREF(ZIG(3,DATA),1) =REF(ZIG(3,DATA),2)
ANDREF(ZIG(3,DATA),2) =REF(ZIG(3,DATA),3),H*1.02,2);
Var12:=(HIGH+LOW+CLOSE)/3;
Var13:=(Var12-MA(Var12,14))/(0.015*AVEDEV(Var12,14));
Var14:=(Var12-MA(Var12,70))/(0.015*AVEDEV(Var12,70));
Var15:=IF(Var13 =150ANDVar13 200ANDVar14 =150ANDVar14 200,10,0);
Var16:=IF(Var13 =-150ANDVar13 -200ANDVar14 =-150ANDVar14 -200,-10,Var15);
Var17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
Var18:=100-ABS(Var17);
Var19:=IF(Var18 90,Var18,100);
Var1A:=IF(VarE 0,VarE,0);
Var1B:=IF(Var14 =200ANDVar13 =150,15,IF(Var14 =-200ANDVar13 =-150,-15,Var16))+60;
Var1C:=Var1A 48ANDVar1B 60ANDVar19 100;
DRAWTEXT(Var1CANDCOUNT(Var1C,30)=1,15, 大笔出货 ),linethick1,COLORffcc66;
STICKLINE(Var1CANDCOUNT(Var1C,30)=1,0,10,5,0),colorffcc66;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
大盘顶:=(REF(CLOSE,A2+1) CLOSE)AND(REF(DIFF,A2+1) DIFF)ANDCROSS(DEA,DIFF);
STICKLINE(大盘顶,0,0.1,10,0),COLOR00FF00;
DRAWTEXT(大盘顶,0.01, 大盘顶 ),COLORYELLOW;
:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COLORGREEN;
STICKLINE(趋势 50,趋势,50,4,0),COLOR32329B;
STICKLINE(50 趋势,趋势,50,4,0),COLOR326400;
IF(趋势 50,趋势,DRAWNULL),COLORRED;
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
TYP:=(HIGH+LOW+CLOSE)/3;
:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);
DEA:=EMA(DIFF,6);
MACD:=2*(DIFF-DEA);
转点:=IF(K DANDCCI 0ANDDIFF DEAANDMACD 0,1,0);
STICKLINE(转点=1,50,50,6,0),COLORYELLOW;
STICKLINE(转点=0,50,50,6,0),COLORCYAN;
顶部:90,COLORYELLOW;
底部:10,COLORCYAN;
判断:SMA(趋势,3,1),COLORFF00FF,LINETHICK2;
IF(趋势 判断,判断,DRAWNULL),COLORYELLOW,LINETHICK2;
IF(趋势 判断,判断,DRAWNULL),COLORFFF000,LINETHICK2;
DRAWICON(CROSS(趋势,判断),判断,1);
DRAWICON(CROSS(趋势,顶部),顶部,2);
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2;
短线1:IF(VAR6 45,VAR6-45,0),COLORA6B8C1;
VAR2Q:=REF(LOW,1);
VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;
VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);
VAR5Q:=LLV(LOW,30);
VAR6Q:=HHV(VAR4Q,30);
N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
cci:(TYP-ma(TYP,N))/(0.015*AVEDEV(TYP,N));
要卖线:100,POINTDOT,COLORYELLOW;
要买线:-100,POINTDOT,COLORYELLOW;
多空:0,POINTDOT,COLORWHITE;
IF(CCI 100,CCI,DRAWNULL),COLORRED;
IF(CCI -100,CCI,DRAWNULL),COLORGREEN;
VAR7Q:=IF(MA(CLOSE,58),1,0);
VAR8Q:=EMA(IF(LOW =VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;
VR2:=REF(LOW,1);
VR3:=SMA(ABS(LOW-VR2),3,1)/SMA(MAX(LOW-VR2,0),3,1)*100;
VR4:=EMA(IF(CLOSE*1.3,VR3*10,VR3/10),3);
VR5:=LLV(LOW,30);
VR6:=HHV(VR4,30);
VR7:=IF(MA(CLOSE,58),1,0);
VR8:=EMA(IF(LOW =VR5,(VR4+VR6*2)/2,0),3)/618*VR7;
VR9:=IF(VR8 100,100,VR8);
进场:STICKLINE(VR9 -150,0,VR9,3,0),,COLORFF00FF;
洗盘:IF(VR9 REF(VR9,1),VR9,0),COLORGREEN,NODRAW;
STICKLINE(VR9 REF(VR9,1),0,VR9,3,0),COLORGREEN;
短线获利:STICKLINE(REF( KDJ.J ,1) 0AND KDJ.J 0,60,25,2,0),COLORYELLOW;
VARK1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VARK2:=REVERSE(VARK1);
VARK3:=SMA(VARK1,3,1);
短线机会:C ma(C,5)ANDMA(C,5) REF(MA(C,5),1),COLORYELLOW;
stICKLINE(短线机会,0,50,2,0);
-100,LINESTICK,COLORGRAY;
0,COLORGRAY;
100,COLORGRAY;
N:=14;
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
macd:(DIF-DEA)*2;
主力潜伏:COUNT(MacD 0,10)=10,COLORRED;
STICKLINE(主力潜伏,0,MACD*200,8,0),COLORRED;
MA20:=MA(C,20);
MA20角度:ATAN((MA20/REF(MA20,1)-1)*100)*180/3.14159,COLORYELLOW;
TYP:=(HIGH+LOW+CLOSE)/3;
cci:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),COLOR00A0F0;
IF(CCI 100,CCI,DRAWNULL),COLORRED;
IF(CCI -100,CCI,DRAWNULL),COLORGREEN;
[源码注释]通达信公式动态公式解读