通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
能量线:=EMA(100*(C-LLV(L,34))/(HHV(H,34)-LLV(L,34)),3),LINETHICK0;
{2指.RSI}
RSI:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100,LINETHICK0;
{3指.KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,LINETHICK0;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D,LINETHICK0;
{4指.W amp;R}
威廉WR:=(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))*100,LINETHICK0;
{5指.CCI}
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),LINETHICK0;
五指A:WMA((能量线+RSI+J-威廉WR+CCI)/5,5);
五指B:WMA((能量线+RSI+J-威廉WR+CCI)/5,13);
DRAWBAND(五指A,RGB(255,155,0),五指B,RGB(0,40,255));
WMA((能量线+RSI+J-威廉WR+CCI)/5,5),COLOR00FF00,LINETHICK3;
IF(五指A REF(五指A,1),五指A,DRAWNULL),COLOR0000FF,LINETHICK3;
DRAWTEXT_FIX(1,0.02,0,0, ◆能量线,RSI3.KDJ,W amp;R,CCI,【五个指标共振线.[红].[绿].变化是信号.颜色及标记是配合信号】 ),COLOR00FFFF,LINETHICK3;
KC:=FORCAST(((2*C+H+L)/4*0.618+C*0.382),3);
AAX:=(KC-MA(KC,9))/MA(KC,9)*100;
VAR0:=MIN(EXIST(KC,55),9);
AAX1:=EMA(AAX,VAR0)*VAR0;
AAX2:=MA(AAX1,3);
AAX3:=MA(AAX1,5);
卖:=AAX3 3ANDAAX1 REF(AAX1,1)ANDCROSS(AAX2,AAX1);
VBA:=FILTER(卖,5);
DRAWTEXT(VBA,五指A*1.08, ★卖出 ),COLOR0044FF;
VB2:=EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6)*100;
VB3:=IF(LLV(VB2,3)=LLV(VB2,11)ANDCOUNT(VB2 0,2)ANDCROSS(VB2,MA(VB2,2)),1,0);
VB4:=FILTER(VB3=1,5);
DRAWTEXT(VB4,五指A*0.97, ★买入 ),COLOR00FFFF;
MA5:EMA(CLOSE,5),COLORWHITE;
MA10:EMA(CLOSE,10),COLORYELLOW;
MA20:EMA(CLOSE,20),COLORFF00FF;
MA40:EMA(CLOSE,40),COLOR00FF00;
MA60:EMA(C,60),COLOR888888;
MA250:EMA(C,250),COLORFFCC66;
月价托:=MA5 MA20ANDMA5 MA10ANDCROSS(MA10,MA20);
季价托:=MA20 MA60ANDMA20 MA40ANDCROSS(MA40,MA60);
短长价托:=MA5 MA60ANDMA5 MA10ANDCROSS(MA10,MA60);
DRAWICON(月价托,L-0.10,3);
DRAWICON(季价托,L-0.10,4);
DRAWICON(短长价托,L-0.10,5);
VOL5:=MA(VOL,5);
VOL10:=MA(VOL,10);
VOL20:=MA(VOL,20);
量托:=VOL5 =VOL20ANDCROSS(VOL10,VOL20)ANDREF(VOL10,1) REF(VOL20,1);
DRAWICON(量托,L-0.10,6);
AA:=BARSLAST(MA40 MA60AND(MA20=MA40ORMA20 MA40));
BB:=REF(COUNT(C MA60,AA)=AA,1);
CC:=CROSS(C,MA60)ANDVOL MA(VOL,5)AND(C-REF(C,1))/REF(C,1)*100 3;
芙蓉出水:=BBANDCC;
DRAWICON(芙蓉出水,L-0.10,9);
STICKLINE(C REF(C,1),H,L,0,1),COLOR0000FF;
STICKLINE(C REF(C,1),O,C,3.2,0),COLOR000055;
STICKLINE(C REF(C,1),O,C,2.7,0),COLOR000077;
STICKLINE(C REF(C,1),O,C,2.1,0),COLOR000099;
STICKLINE(C REF(C,1),O,C,1.5,0),COLOR0000BB;
STICKLINE(C REF(C,1),O,C,0.9,0),COLOR0000DD;
STICKLINE(C REF(C,1),O,C,0.3,0),COLOR0000FF;
STICKLINE(C REF(C,1),H,L,0,1),COLORFFFF00;
STICKLINE(C REF(C,1),O,C,3.2,0),COLOR990000;
STICKLINE(C REF(C,1),O,C,2.7,0),COLORCC0000;
STICKLINE(C REF(C,1),O,C,2.1,0),COLORFF4400;
STICKLINE(C REF(C,1),O,C,1.5,0),COLORFF8800;
STICKLINE(C REF(C,1),O,C,0.9,0),COLORFFCC00;
STICKLINE(C REF(C,1),O,C,0.3,0),COLORFFFF00;
STICKLINE(C=REF(C,1),H,L,0,1),COLORFFFFFF;
STICKLINE(C=REF(C,1),O,C,3.2,0),COLOR555555;
STICKLINE(C=REF(C,1),O,C,2.7,0),COLOR777777;
STICKLINE(C=REF(C,1),O,C,2.1,0),COLOR999999;
STICKLINE(C=REF(C,1),O,C,1.5,0),COLORBBBBBB;
STICKLINE(C=REF(C,1),O,C,0.9,0),COLORDDDDDD;
STICKLINE(C=REF(C,1),O,C,0.3,0),COLORFFFFFF;
主流:=EMA(100*(C-LLV(LOW,21))/(HHV(H,21)-LLV(LOW,21)),3),colorred,LINETHICK2;
PARTLINE(主流资金,主流资金 REF(主流资金,1),RGB(250,10,10),主流资金 =REF(主流资金,1),RGB(250,250,250)),LINETHICK3;
非主流资金:=EMA(100*(INDEXC-LLV(INDEXL,21))/(HHV(INDEXH,21)-LLV(INDEXL,21)),3),colorgreen,LINETHICK2;
PARTLINE(非主流资金,非主流资金 REF(非主流资金,1),RGB(250,10,250),非主流资金 =REF(非主流资金,1),RGB(10,250,10)),LINETHICK2;
分界线:43,LINETHICK02,POINTDOT,ColorFF26FF;
压力线:78,LINETHICK02,POINTDOT,Color2FFFFF;
寻底线:10,LINETHICK02,POINTDOT,ColorFFFF11;
N1:=3;N2:=5;N3:=8;N4:=13;
RSV:=-(HHV(HIGH,N4)-CLOSE)/(HHV(HIGH,N4)-LLV(LOW,N4))*100;
LWR1:=SMA(RSV,N1,1);
LWR2:=SMA(LWR1,N1,1);
DRAWICON(LWR1 LWR2,4,1);
DRAWICON(LWR1 LWR2,4,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,1,1), LW amp;R ),colorwhite;
A1:=LWR1 LWR2;
RSV1:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
K:=SMA(RSV1,N1,1);
D:=SMA(K,N1,1);
DRAWICON(K D,2,1);
DRAWICON(K D,2,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,2,2), KDJ ),colorwhite;
A2:=K
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),N2,1))/(SMA(ABS(CLOSE-LC),N2,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),N4,1))/(SMA(ABS(CLOSE-LC),N4,1))*100;
DRAWICON(RSI1 RSI2,3,1);
DRAWICON(RSI1 RSI2,3,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,3,3), RSI ),colorwhite;
A3:=RSI1 RSI2;
DIFF:=EMA(CLOSE,N3)-EMA(CLOSE,N4);
DEA:=EMA(DIFF,N2);
DRAWICON(DIFF DEA,1,1);
DRAWICON(DIFF DEA,1,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,4,4), MACD ),colorwhite;
A4:=DIFF
BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
DRAWICON(CLOSE BBI,5,1);
DRAWICON(CLOSE BBI,5,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,5,5), BBI ),colorwhite;
A5:=CLOSE
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,N2),N1)/EMA(EMA(ABS(MTM),N2),N1);
MMM:=100*EMA(EMA(MTM,N4),N3)/EMA(EMA(ABS(MTM),N4),N3);
DRAWICON(MMS MMM,6,1);
DRAWICON(MMS MMM,6,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,6,6), ZLMM ),colorwhite;
A6:=MMS
WJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-WJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,WJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5);
V7:=(V2*V5);
V8:=(V3*V5);
V9:=(V4*V5);
买盘:=(V9+V8);
卖盘:=(V6+V7);
买卖差:=买盘-卖盘;
DDX:=买卖差;
DX:=MA(买卖差,5)*20;
DDX1:=SMA(DX,3,1);
DDX2:=SMA(DDX1,3,1);
DDX3:=(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/15;
DRAWICON(DDX1 DDX2,7,1);
DRAWICON(DDX1 DDX2,7,2);
DRAWTEXT(ISLASTBAR=1,IF(LWR1 =0,7,7), DDX ),colorwhite;
A7:=DDX1 DDX2;
量:=V;
换手:=V/CAPITAL*100;
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买盘1:=IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
卖盘1:=IF(CLOSE OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
DLX:=(买盘1-(-卖盘1))/量*换手;
DLX1:=SUM(DLX,6);
DLX2:=MA(DLX1,5);
DRAWICON(DLX1 DLX2,8,1);
DRAWICON(DLX1 DLX2,8,2);
DRAWTEXT(ISLASTBAR=1,IF(量 =0,7.7,3), 动力线 ),colorwhite;
A8:=DLX1 DLX2;
(A1ANDA2ANDA3ANDA4ANDA5ANDA6ANDA7ANDA8),COLORFFFF00;
买入:A1ANDA2ANDA3ANDA4ANDA5ANDA6ANDA7ANDA8=1
ANDREF(A1ANDA2ANDA3ANDA4ANDA5ANDA6ANDA7ANDA8,1)=0,COLORFFFF00;
强势线:(A1+A2+A3+A4+A5+A6+A7+A8),LINETHICK2,COLOR00FF00;
公式解读:
公式解读:
编写条件:
今天成交量大于60日均量线2倍及以上的公式。
编写方法:
XG:V =ma(V,60)*2;