通达信拐点副图/选股指标公式源码

[复制链接]
查看207 | 回复0 | 2021-8-26 22:34:14 | 显示全部楼层 |阅读模式

以下是通达信拐点副图/选股指标公式源码(无源码的请下载附件导入)

N:=10;N2:=10;P10:=3;N10:=10;
 MA5:=MA(C,5);
 MA10:=MA(C,10);
 MA20:=MA(C,20);
 MA30:=MA(C,30);
 MA60:=MA(C,60);
 MA120:=MA(C,120);
短线多头:=MA5>MA10 AND MA10>MA20 AND MA20>MA30;
中线多头:=MA30>MA120 AND MA60>MA120;
均线粘合:=(HHV(MA5,HHV(MA10,MA20))/LLV(MA5,LLV(MA10,MA20))-1)*5<=N;
均线拐点:=COUNT(短线多头,10) AND COUNT(MA5<REF(MA5,1),3) AND MA5>REF(MA5,1);
 XG:=中线多头 AND 均线粘合 AND 均线拐点 AND C>REF(C,1);
拐点选股:XG AND NOT(REF(XG,1)),COLORYELLOW,LINETHICK2;
均线粘合2:=(MAX(MA5,MAX(MA10,MA20))/MIN(MA5,MIN(MA10,MA20))-1)*100<=N;
 XG2:=中线多头 AND 均线粘合2 AND 均线拐点 AND C>REF(C,1);
选股2:=(XG2 AND NOT(REF(XG2,1)))*0.5,COLORWHITE,LINETHICK2;
 MA90:=MA(CLOSE,90);
 MA250:=MA(CLOSE,250);
 DTPL:=MA10>MA30 AND MA30>REF(MA30,1);
 DG:=MAX(MAX(MA5,MA10),MAX(MA20,MA30));
 ZG:=MAX(MAX(DG,MA60),MAX(MA90,MA120));
 DD:=MIN(MIN(MA5,MA10),MIN(MA20,MA30));
 ZD:=MIN(MIN(DD,MA60),MIN(MA90,MA120));
粘合:=(ZG/ZD-1)*100<N2,POINTDOT,LINETHICK0;
高粘:=(ZG/ZD-1)*100<N2 AND ZD>MA250,POINTDOT,LINETHICK0;
穿5:=(粘合 AND CROSS(C,MA5))*0.5,COLOR000000;
穿10:=(粘合 AND CROSS(C,MA10))*1,COLOR000000;
穿20:=(粘合 AND CROSS(C,MA20))*2,COLOR000000;
穿30:=(粘合 AND CROSS(C,MA30))*3,COLOR000000;
 FLSZ:=(C/REF(C,1)-1)*100>=2 AND V>REF(V,1);
 DXTP:=((穿5/0.5)+穿10+(穿20/2)+(穿30/3))>=2;
优飞:=(FLSZ AND DXTP AND MA30>REF(MA30,1))*3,COLOR00FFFF,LINETHICK2;
选优:=(FLSZ AND DXTP AND MA30>REF(MA30,1) AND COUNT(高粘,20)>=15)*3,COLOR0000FF,LINETHICK2;
 JXDT:=MA5>MA10 AND MA10>MA20 AND MA20>MA30;
起飞:(NOT(粘合) AND REF(粘合,1) AND COUNT(粘合,20)>=15 AND DTPL)*3,COLORFF00FF,LINETHICK2;
 DRAWTEXT(优飞,3,'优飞'),COLOR00FFFF;
 DRAWTEXT(起飞,3,'起飞'),COLOR00FFFF;
 BBI:=((((MA(CLOSE,3) + MA(CLOSE,6)) + MA(CLOSE,12)) + MA(CLOSE,24)) / 4);
 UPR:=(BBI + (P10 * STD(BBI,N10)));
 DWN:=(BBI - (P10 * STD(BBI,N10)));
 BLK:=((LLV((UPR - DWN),2) = LLV((UPR - DWN),10)) AND ((UPR / DWN) <= 1.05));
布林口:=(BLK * 0.3),COLORFF00FF;
 KX1:=((((LOW < DWN) OR (LOW < BBI)) AND CROSS(HIGH,UPR)) * 0.5);
 KX2:=((COUNT(((ABS((CLOSE - OPEN)) / OPEN) <= 0.015),3) = 3) * 0.2),POINTDOT,LINETHICK0,COLORFF6600;
 KXZH:=((KX1 = 0.5) OR (KX2 = 0.2));
 P:=26;
 S:=12;
 M:=9;
 DIFF:=(EMA(CLOSE,S) - EMA(CLOSE,P));
 DEA:=EMA(DIFF,M);
 MACD:=(2 * (DIFF - DEA));
 MACD0:=(((ABS(MACD) <= 0.1) AND (DIFF > DEA)) * 0.2),POINTDOT,LINETHICK3,COLORFFFF00;
优布:(BLK AND KXZH)*3,LINETHICK2,COLORBLUE;
布林:((BLK AND KXZH) AND (MACD0 = 0.2))*3,LINETHICK2,COLORFFFF00;
 DRAWTEXT(布林,3,'布林'),COLORFF00FF;
 DRAWTEXT(优布,3,'优布'),COLORRED;

1955277297.jpg

1955277297.jpg

相关帖子

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则