通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信金蜘蛛均线粘合指标公式
M:=2;
MA30:=MA(C,30);
MA60:=MA(C,60);
MA90:=MA(C,90);
MA250:=MA(C,250);
MA120:=MA(C,120);
AA:=MAX(MA120,MAX(MA30,MAX(MA60,MA90)));
{30/60/90、120日均线中做大值}
BB:=MIN(MA120,MIN(MA30,MIN(MA60,MA90)));
{30/60/90、120日均线中做小值}
CC:=(AA+BB)/2;
{30、60、90、120日均线股价平均值}
TJ7:=DYNAINFO(7)>DYNAINFO(3)*1.04;
{当前股价大于昨日收盘价涨幅4%}
TJ1:=(AA-BB)/BB*100<5;
{最大值与最小值偏离小于5%}
TJ2:=EVERY(MA250>REF(MA250,1),M);
{连续M日年线上升}
TJ3:=MA30>MA250ANDMA60>MA250ANDMA90>MA250ANDMA120>MA250;
{30/60/90/120日均线在250日均线之上}
TJ4:=DYNAINFO(7)>CC*1.04ANDDYNAINFO(7)<CC*1.15;
{股价上涨且与30、60、90/120日均价偏离4%-15%之间}
强势选:TJ7ANDTJ1ANDTJ2ANDTJ3ANDTJ4;
EMA5:=EMA(C,5);
EMA10:=EMA(C,10);
EMA20:=EMA(C,20);
EMA60:=EMA(C,40);
AA:=MAX(MAX(EMA5,EMA10),MAX(EMA20,EMA60));
BB:=MIN(MIN(EMA5,EMA10),MIN(EMA20,EMA60));
粘合度:(BB/AA)*100;
STICKLINE(C<=O,H,L,0,0),COLORWHITE;
A:=(2*C+O+H+L)/5;
X1:MA(A,5),COLORYELLOW;
X2:MA(X1,8),COLORYELLOW,LINETHICK2;
X3:MA(X2,13),COLORFFF000;
X4:MA(X3,21),COLORFFF000,LINETHICK2;
X5:MA(X4,34),COLORFF00FF;
X6:MA(X5,55),COLORFF00FF,LINETHICK2;
EMA3:EMA(C,3),COLORWHITE;
EMA47:EMA(C,47),LINETHICK0,COLORRED;
红线上涨:IF(EMA47>REF(EMA47,1),EMA47,DRAWNULL),LINETHICK2,COLORRED;
绿线下跌:IF(EMA47<=REF(EMA47,1),EMA47,DRAWNULL),LINETHICK2,COLORGREEN;
主营收入:FINANCE(20)/100000000,COLOR00EEBB,NODRAW;
主营利润:FINANCE(23)/100000000,COLOR00EEBB,NODRAW;
流通市值:FINANCE(40)/100000000,COLOR00EEBB,NODRAW;
业绩报告:FINANCE(37),COLOR00EEBB,NODRAW;
MA5:MA(CLOSE,5),COLORRED,LINETHICK2;
MA13:MA(CLOSE,13),COLOR00FF00;
MA21:MA(CLOSE,21),COLORFF0000,LINETHICK1;
MA34:MA(CLOSE,34),COLORFFFFFF;
VAR1:=EMA(C,1);
VAR2:=MA5;
AA:=VAR1>=VAR2;
BB:=VAR2>VAR1;
买入:DRAWICON(CROSS(AA,BB),L*0.98,1);
卖出:DRAWICON(CROSS(BB,AA),H*1.02,2);
STICKLINE(AA,C,O,3,0),COLORFFBBFF;
STICKLINE(AA,H,L,0,0),COLOR00FFFF;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0,0),COLORFF0000;
STICKLINE(AA,CLOSE,OPEN,3.0,0),COLORFF00FF;
STICKLINE(AA,CLOSE,OPEN,2.6,0),COLORFF22FF;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLORFF44FF;
STICKLINE(AA,CLOSE,OPEN,1.8,0),COLORFF66FF;
STICKLINE(AA,CLOSE,OPEN,1.4,0),COLORFF88FF;
STICKLINE(AA,CLOSE,OPEN,1,0),COLORFF99FF;
STICKLINE(AA,CLOSE,OPEN,0.5,0),COLORFFAAFF;
STICKLINE(AA,CLOSE,OPEN,0.1,0),COLORFFBBFF;
STICKLINE(BB,CLOSE,OPEN,3,0),COLOR008800;
STICKLINE(BB,CLOSE,OPEN,2.6,0),COLOR009900;
STICKLINE(BB,CLOSE,OPEN,2.2,0),COLOR00AA00;
STICKLINE(BB,CLOSE,OPEN,1.8,0),COLOR00BB00;
STICKLINE(BB,CLOSE,OPEN,1.4,0),COLOR00CC00;
STICKLINE(BB,CLOSE,OPEN,1,0),COLOR00DD00;
STICKLINE(BB,CLOSE,OPEN,0.6,0),COLOR00EE00;
STICKLINE(BB,CLOSE,OPEN,0.2,0),COLOR00FF00;
STICKLINE(买入,O,(C-O)/2+O,3,0),COLOR335555;
STICKLINE(买入,O,(C-O)/2+O,2.2,0),COLOR338888;
STICKLINE(买入,O,(C-O)/2+O,1.5,0),COLOR33AAAA;
STICKLINE(买入,O,(C-O)/2+O,1,0),COLOR33CCCC;
STICKLINE(买入,O,(C-O)/2+O,0,0),COLOR33EEEE;
STICKLINE(卖出,O,(C-O)/2+O,3,0),COLOR550055;
STICKLINE(卖出,O,(C-O)/2+O,2.2,0),COLOR880088;
STICKLINE(卖出,O,(C-O)/2+O,1.5,0),COLORAA00AA;
STICKLINE(卖出,O,(C-O)/2+O,1,0),COLORCC00CC;
STICKLINE(卖出,O,(C-O)/2+O,0.5,0),COLOREE00EE;
A:=EMA(EMA(AMOUNT/10000000,5),10);
N1:=A;
【最高】:N1,LINETHICK;
【最低】:N1,LINETHICK;
【收盘】:N1,LINETHICK;
【开盘】:REF(【收盘】,1),LINETHICK;
STICKLINE(【收盘】>【开盘】,【最高】,【最低】,0,0),COLOR0000FF;
STICKLINE(【收盘】>【开盘】,【收盘】,【开盘】,2,0),COLOR0000FF;
STICKLINE(【收盘】<【开盘】,【收盘】,【开盘】,2,0),COLOR00FF00;
STICKLINE(【收盘】<【开盘】,【最高】,【最低】,0,0),COLOR00FF00;
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;
VARV:=(2*C+H+L)/4;
VARU:=LLV(LOW,30);
VARA1:=HHV(HIGH,30);
B:=EMA((VARV-VARU)/(VARA1-VARU)*100,8);
B1:=EMA(B,5);
STICKLINE(B-B1>0,B,B1,8,1),colorred;
STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
低吸:IF(CROSS(RSI,11),70,0),colorwhite,POINTDOT;
STICKLINE(低吸,70,0,4,0),colorwhite;
VAR7:=EMA(AMOUNT/VOL/100,3);
VAR8:=EMA(VAR7,88);
VAR9:=EMA(VAR7,88)*0.85;
VARA:=VAR9*0.87;
VARB:=LOW<VARAANDCLOSE>REF(CLOSE,1)*1.02;
STICKLINE(FILTER(VARB,6),65,0,4,0),COLORFF00FF;
坚决买进:IF(FILTER(VARB,6),65,0),COLORFF00FF,POINTDOT;
VARF:=(2*CLOSE+HIGH+LOW)/4;
VA4:=LLV(LOW,34);
VA5:=HHV(HIGH,34);
VA6:=EMA((VARF-VA4)/(VA5-VA4)*100,6);
VA7:=EMA(0.667*REF(VA6,1)+0.333*VA6,4);
出击:IF(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3ANDCOUNT(VA6>VA7,3)ANDREF(LOW,1)=LLV(LOW,120)AND
CLOSE>OPEN,1,0),60,0),coloryellow,POINTDOT;
STICKLINE(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3ANDCOUNT(VA6>VA7,3)AND
REF(LOW,1)=LLV(LOW,120)ANDCLOSE>OPEN,1,0),60,0,4,0),coloryellow;
A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/211;
D2:=EMA(D1,2);
D3:=EMA(D2,2);
K1:=EMA(D3,2);
波段买入:IF(CROSS(D1,K1),55,0),COLOR0099FF,POINTDOT;
STICKLINE(CROSS(D1,K1),55,0,4,0),COLOR0099FF;
多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
,3,1),2,1);
天线:=78.89;
STICKLINE(CROSS(天线,多方趋势),90,95,6,0),COLOR00FF00;
STICKLINE(B>0ANDB-B1>=0,79,80,6,0),colorred;
STICKLINE(B>0ANDB-B1<0,79,80,6,0),COLOR00FF00;
STICKLINE(B>0ANDB-B1>=0,49,50,6,0),colorred;
STICKLINE(B>0ANDB-B1<0,49,50,6,0),COLORFF8899;
STICKLINE(B>0ANDB-B1>=0,19,20,6,0),colorred;
STICKLINE(B>0ANDB-B1<0,19,20,6,0),COLOR00FF00;
STICKLINE(B-B1>0,B,B1,8,1),colorred;
STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;
地量:DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01ANDJ<0),L*1,'地量'),COLOR00FFFF;
STICKLINE(地量>0,0,30,2,0),COLOR008888;
STICKLINE(地量>0,0,30,1.5,0),COLOR00AAAA;
STICKLINE(地量>0,0,30,0.8,0),COLOR00DDDD;
STICKLINE(地量>0,0,30,0.3,0),COLOR00FFFF;
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,VARR1),10,15);
VAR10:=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);
VAR11:=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);
VAR12:=VAR10<REF(VAR11,1)ANDVOL>REF(VOL,1)ANDCLOSE>REF(CLOSE,1);
DRAWTEXT(VAR12ANDCOUNT(VAR12,30)=1,40,'有大资金进场迹象,关注!');
MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
AA:=CROSS(MA1,MA2);
AAA:=COUNT(AA,3)>=1;
T1:=MA(VOL,5);
T2:=MA(VOL,10);
BB:=CROSS(T1,T2);
BBB:=COUNT(BB,3)>=1;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
CC:=CROSS(DIF,DEA);
CCC:=COUNT(CC,3)>=1;
三金:=AAAANDBBBANDCCC;
三金叉:FILTER(三金,3)*100,COLORFF00FF;
[源码注释]通达信公式动态翻译结果
输出XG: 最近3日一直存在(模糊匹配品种代码并且0日前的收盘价>=计算涨停价)
每日通达信公式解答:
选股条件
下跌N周K线选股公式。
编写源码
every(c<ref(c,1),N){选周线周期选股,N自填}
评论(0)