【通达信源码分享】简单实用的主图指标公式源码

通达信免费指标 07-27 阅读:528 评论:0

30-1P2061HA3.png

A:=(3*C+L+O+H)/6;

X:=(20A+19REF(A,1)+18REF(A,2)+17REF(A,3)+16REF(A,4)+15REF(A,5)+

14REF(A,6)+13REF(A,7)+12REF(A,8)+11REF(A,9)+10REF(A,10)+9REF(A,11)+8*REF(A,12)

+7REF(A,13)+6REF(A,14)+5REF(A,15)+4REF(A,16)+3REF(A,17)+2REF(A,18)+

REF(A,20))/210;

回调认同:EMA(X,13),COLORGREEN;

周MACD:="MACD.MACD#WEEK"(12,26,9);

MACD:="MACD.MACD#DAY"(12,26,9);

斜率:=(EMA(回调认同,2)-REF(EMA(回调认同,2),2))/REF(EMA(回调认同,2),2)*100,NODRAW;

DRAWTEXT(CROSS(斜率,0),回调认同*0.97,'●')COLORRED;

DRAWTEXT(CROSS(0,MACD)AND CROSS(0,周MACD),回调认同*1.03,'●')COLORGREEN;

IF(斜率>=0,回调认同,DRAWNULL),COLORYELLOW,LINETHICK2;

IF(MACD>=0 AND 周MACD>=0,回调认同,DRAWNULL),COLORRED,LINETHICK3;

BIAS2:(C-MA(C,13))/MA(C,13)*100,NODRAW;

Q1:=CROSS(BIAS2,-30);

Q2:=CROSS(BIAS2,-25);

Q3:=CROSS(BIAS2,-20);

Q4:=CROSS(BIAS2,-15);

Q5:=CROSS(BIAS2,-10);

DRAWTEXT(Q2 AND EXIST(Q1,5),L*0.91,'J1');

DRAWTEXT(Q3 AND EXIST(Q2 OR Q1,5),L*0.92,'J2');

DRAWTEXT(Q4 AND EXIST(Q1 OR Q2 OR Q3,5),L*0.93,'J3');

DRAWTEXT(Q5 AND EXIST(Q1 OR Q2 OR Q3 OR Q4,5),L*0.95,'J4');

G1:=FILTER(CROSS(斜率,0),20);

G2:=BARSLAST(G1>0);

G3:=IFF(G2>0 AND G2<=20,1,0)=1 AND ((C-REF(C,G2))/REF(C,G2))*100>=10;

概1号:(SUM(FILTER(G3,20),0)/SUM(G1>0,0))*100,NODRAW;

STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;

STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;

STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;

STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;

STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;

STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;


版权声明

本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!

服务热线

18020657357

微信客服

微信客服