通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
新三价线指标公式源码N1:=20;N2:=120;N3:=250;
MA20:MA(C,N1),COLORWHITE,LINETHICK2;
MA120:MA(C,N2),COLORFFCCCC,LINETHICK2;
MA250:MA(C,N3),COLORFFCC66,LINETHICK2;
乖离线:=((C-REF(MA20,1))/20+MA20)*1.20;
TT1:=CROSS(MA20,MA120)ANDCROSS(MA20,MA250)ANDVREF(V,1);
TT2:=MA20REF(MA20,2)ANDVREF(V,1)ANDCROSS(C,MA20);
STICKLINE(TT1,L,L-0.09,4,0),COLORYELLOW;
DRAWTEXT(TT1,L-0.13, #39; #39;),COLORYELLOW;
STICKLINE(CROSS(C,MA120)ANDCROSS(C,MA250)ANDCROSS(C,MA20),L,L-0.09,4,0),COLORYELLOW;
DRAWTEXT(CROSS(C,MA120)ANDCROSS(C,MA250)ANDCROSS(C,MA20),L-0.13, #39;并线开花 #39;),COLORYELLOW;
STICKLINE(TT2,L,L-0.09,4,0),COLORYELLOW;
DRAWTEXT(TT2,L-0.13, #39;买点1 #39;),COLORYELLOW;
STICKLINE(CROSS(C,乖离线),H,H+0.09,4,0),COLOR00FF00;
DRAWTEXT(CROSS(C,乖离线),H+0.13, #39;卖点 #39;),COLOR00FF00;
STICKLINE(MA250=REF(MA250,1)ANDMA20=REF(MA20,1)ANDCROSS(C,MA250),L,L-0.09,4,0),COLORFFCC66;
DRAWTEXT(MA250=REF(MA250,1)ANDMA20=REF(MA20,1)ANDCROSS(C,MA250),L-0.13, #39;牛象 #39;),COLORFFCC66;
STICKLINE(MA120=REF(MA120,1)ANDCROSS(C,MA20)ANDCROSS(C,MA120)ANDVREF(V,1),L,L-0.09,4,0),COLORFF00FF;
DRAWTEXT(MA120=REF(MA120,1)ANDCROSS(C,MA20)ANDCROSS(C,MA120)ANDVREF(V,1),L-0.13, #39;买点2 #39;),COLORFF00FF;
A1:=SUM(AMOUNT,3)/SUM(VOL,3)/100;
A2:=SUM(AMOUNT,8)/SUM(VOL,8)/100;
A3:=SUM(AMOUNT,21)/SUM(VOL,21)/100;
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26));
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
V1:=C-(A1+MA(C,3))/2;
V2:=C-(A2+MA(C,8))/2;
V3:=C-(A3+MA(C,21))/2;
VA1:=(C+V3-V1+MACD);
VA4:=(C+V2-V1+MACD);
:EMA(VA1,6),LINETHICK2,COLORYELLOW;
线A1:=(MA(VOL,5)+MA(VOL,10)+MA(VOL,25))/3,COLOR00FF00;
线A2:=(MA(VOL,5)+MA(VOL,10)+MA(VOL,20)+MA(VOL,60)+MA(VOL,120))/5,COLOR00FF00;
线A3:=(MA(VOL,20)+MA(VOL,60)+MA(VOL,120))/3,COLOR00FF00,LINETHICK2;
ZX:2*(线A1-线A2),COLORSTICK;STICKLINE(线A1线A3,线A1,线A3,0.1,1),COLORFF0080;
STICKLINE(线A1=线A3,线A1,线A3,0.1,1),COLOR22CC33;
线1:IF(线A1线A3,线A1,线A3),COLOR00FF00;
IF(线A1线A3,线A3,线A1),COLORRED;
线2:IF(线A2线A3,线A2,线A3),COLOR00FF00;
IF(线A2线A3,线A3,线A2),COLORRED;
线3:IF(线A3线A1,线A3,线A3),COLOR00FF00,LINETHICK2;
IF(线A1线A3,线A3,线A3),COLORRED,LINETHICK2;
DIFF:=EMA(CLOSE,26)-EMA(CLOSE,12);
DEA:=EMA(DIFF,9);
MACD:=(DIFF-DEA),COLORSTICK;
MACD金叉:IF(CROSS(DIFF,DEA),MACD-0.02,0),COLORFF00FF,POINTDOT;
DRAWTEXT(CROSS(DIFF,DEA),MACD-0.03, #39;● #39;),COLORFF00FF;
TYP:=(HIGH+LOW+CLOSE)/3;
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;
JK金叉:IF(CROSS(J,K),MACD-0.02,0),COLORYELLOW,POINTDOT;
DRAWTEXT(CROSS(J,K),MACD-0.03, #39;● #39;),COLORYELLOW;
上涨:IF(LREF(H,1),MACD-0.01,0),COLORRED,POINTDOT;
DRAWTEXT(LREF(H,1),REF(H,1), #39;☆ #39;),COLORRED;
底部:20,COLORLIGRAY;
超底:10,COLORBLUE;
LC:=REF(L,1);
相对强弱量:SMA(MAX(L-LC,0),3,1)/SMA(ABS(L-LC),3,1)*100,COLORGREEN,LINETHICK2;
DIF:=L-REF(L,1);
VU:=IF(DIF=0,DIF,0);
VD:=IF(DIF0,-DIF,0);
MAU1:=MEMA(VU,3);
MAD1:=MEMA(VD,3);
走势相对强弱:MA(100*MAU1/(MAU1+MAD1),3),COLORCYAN;
TYP:=(HIGH+LOW+CLOSE)/3;
V1:=SUM(IF(TYPREF(TYP,1),TYP*VOL,0),5)/SUM(IF(TYPREF(TYP,1),TYP*VOL,0),5);
流量动向:100-(100/(1+V1))COLORRED;