相关简介: 通达信主图公式指标公式大全
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:主图
通达信指标公式源码:
{通道主图}
{*主图}
{INPUT:N(20),M(30),P1(80),P2(100);}
N:=20;
M:=30;
P11:=80;
P22:=100;
VAR1:=(C+H+O+L)/4;
卖出:XMA(VAR1,N)*(1+P11/1000),COLORFF00FF,LINETHICK2;
买入:XMA(VAR1,M)*(1-P22/1000),COLOR00FF00,LINETHICK2;
幅度:100*(卖出-买入)/买入,NODRAW;
MA1:=MA(VAR1,3);
STICKLINE(卖出>LOWAND卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;
STICKLINE(卖出>MIN(C,O)AND卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;
STICKLINE(卖出>LOWAND卖出<HIGH,卖出,HIGH,0,0),COLORGREEN;
STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;
STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;
STICKLINE(买入>LOWAND买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;
STICKLINE(买入>MIN(C,O)AND买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;
STICKLINE(买入>LOWAND买入<HIGH,买入,LOW,0,0),COLORMAGENTA;
STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;
STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;
DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'←买'),COLORYELLOW,LINETHICK2;
DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'←卖'),COLORGREEN;
DRAWICON(CROSS(HIGH,卖出),HIGH*1.02,12);
{红财神布林线主图}
BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
UPR:BBI+P*STD(BBI,N);
DWN:BBI-P*STD(BBI,N);
DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))AND(REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,1);
DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1)>=REF(ZIG(3,5),2))AND(REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,2);
{单线持股双线持币主图}
双线持币:HHV(MA(HIGH,2),2),COLORGREEN,LINETHICK2;
单线持股:LLV(MA(HIGH,2),1),COLORRED,LINETHICK2;
DRAWICON(REF(双线持币,1)>REF(单线持股,1)AND单线持股=双线持币,L-0.2,1);
{K线主图}
N:=5;
S:=maX(C,O);
X:=MIN(C,O);
A:=X>REF(S,1)ORS<REF(X,1);
XG:=HHV(X,N)<=LLV(S,N)ANDCOUNT(A,N)>0;
Q:=BacKSET(XG,N);
QD:=BArslAst(crOSS(Q,0.5));
G:=REFX(LLV(S,N),N-1);
D:=REFX(HHV(X,N),N-1);
HH:=REFX(HHV(H,N),N-1);
LL:=REFX(LLV(L,N),N-1);
DRAWLINE(QD=0,G,XG,LLV(S,N),0),COLORGREEN;
DRAWLINE(QD=0,D,XG,HHV(X,N),0),COLORGREEN;
DRAWLINE(QD=0ANDS<REF(X,1),HH,XGANDREF(S<REF(X,1),N-1),HHV(H,N),0),DOTLINE,COLORBLUE;
DRAWLINE(QD=0ANDS<REF(X,1),LL,XGANDREF(S<REF(X,1),N-1),LLV(L,N),0),DOTLINE,COLORBLUE;
STICKLINE(QD=0ANDS<REF(X,1),HH,LL,0,-1),COLORBLUE;
STICKLINE(XGANDREF(S<REF(X,1),N-1),HHV(H,N),LLV(L,N),0,-1),COLORBLUE;
DRAWLINE(QD=0ANDX>REF(S,1),HH,XGANDREF(X>REF(S,1),N-1),HHV(H,N),0),DOTLINE,COLORMAGENTA;
DRAWLINE(QD=0ANDX>REF(S,1),LL,XGANDREF(X>REF(S,1),N-1),LLV(L,N),0),DOTLINE,COLORMAGENTA;
STICKLINE(QD=0ANDX>REF(S,1),HH,LL,0,-1),COLORMAGENTA;
STICKLINE(XGANDREF(X>REF(S,1),N-1),HHV(H,N),LLV(L,N),0,-1),COLORMAGENTA;
{
选股公式:
N:=5;
S:=MAX(C,O);
X:=MIN(C,O);
A:=X>REF(S,1)ORS<REF(X,1);
HHV(X,N)<=LLV(S,N)ANDCOUNT(A,N)>0;
}
{轨道主图}
日上轨:ma(H,24),colorWhite;
日下轨:MA(L,24),colorWhite;
周上轨:MA(H,120),colorYellow;
周下轨:MA(L,120),colorYellow;
月上轨:MA(H,528),DOTLINE,Colorred;
月下轨:MA(L,528),DOTLINE,Colorred;
PARTLINE(日上轨,日上轨>REF(日上轨,1),rgb(255,255,255),日上轨<=REF(日上轨,1),rgb(110,110,110)),LINETHICK1;
PARTLINE(日下轨,日下轨>REF(日下轨,1),rgb(255,255,255),日下轨<=REF(日下轨,1),rgb(110,110,110)),LINETHICK1;
PARTLINE(周上轨,周上轨>REF(周上轨,1),rgb(255,255,0),周上轨<=REF(周上轨,1),rgb(128,128,0)),LINETHICK2;
PARTLINE(周下轨,周下轨>REF(周下轨,1),rgb(255,255,0),周下轨<=REF(周下轨,1),rgb(128,128,0)),LINETHICK2;
PARTLINE(月上轨,月上轨>REF(月上轨,1),rgb(255,0,0),月上轨<=REF(月上轨,1),rgb(128,0,0)),LINETHICK3;
PARTLINE(月下轨,月下轨>REF(月下轨,1),rgb(255,0,0),月下轨<=REF(月下轨,1),rgb(128,0,0)),LINETHICK3;
{均价主图}
ma5:MA(C,5);
MA13:MA(C,13);
MA24:MA(C,24),COLORBLUE,LINETHICK3;
MA72:MA(C,72)LINETHICK2;
MA133:MA(C,133)LINETHICK2;
MA200:MA(C,200)LINETHICK2;
MA250:MA(C,250)COLORLICYAN,LINETHICK2;
MA480:MA(C,480)COLORRED,LINETHICK2;
X1:=EMA(C,24);
X2:=REF(X1,1);
廿四日均线斜率:(X1-X2)/X2*100,NODRAW;
活跃度:IF(DATE>1000101,(MA(vol,11)+MA(VOL,11*2)+MA(VOL,11*3)+MA(VOL,11*4))/4/CAPITAL*1000,1),NODRAW;
买:IF(MA24>REF(MA24,1),MA24,DRAWNULL),COLORMAGENTA,LINETHICK3;
卖:IF(MA24<REF(MA24,1),MA24,DRAWNULL),COLORFFA042,LINETHICK3;
买1:IF(MA72>REF(MA72,1),MA72,DRAWNULL),COLORGREEN,LINETHICK2;
卖2:IF(MA72<REF(MA72,1),MA72,DRAWNULL),COLOR00ddfF,LINETHICK2;
N:=10;
T1:=CONst(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL);
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,T0,'量能平台');
涨家数:INDEXADV,COLOR0066FF,NODRAW;
跌家数:INDEXDEC,COLOR99FF99,NODRAW;
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;
DK:=MA24;
STICKLINE(DK<=CANDCLOSE>=OPEN,HIGH,LOW,0,1),COLORRED;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,3.2,0),COLOR000044;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,2.7,0),COLOR000033;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,2.1,0),COLOR000055;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,1.5,0),COLOR000077;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,0.9,0),COLOR000099;
STICKLINE(DK<=CANDCLOSE>=OPEN,CLOSE,OPEN,0.3,0),COLORLIMAGENTA;
STICKLINE(DK<=CANDCLOSE<OPEN,HIGH,LOW,0,1),COLORGREEN;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,3.2,0),COLOR003300;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,2.7,0),COLOR005500;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,2.1,0),COLOR007700;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,1.5,0),COLOR009900;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,0.9,0),COLOR00CC00;
STICKLINE(DK<=CANDCLOSE<OPEN,CLOSE,OPEN,0.3,0),COLOR00CC00;
STICKLINE(DK>CANDCLOSE>=OPEN,HIGH,LOW,0,1),COLORGREEN;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,3.2,0),COLORA200A2;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,2.7,0),COLORCE00CE;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,2.1,0),COLORE800E8;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,1.5,0),COLORFF00FF;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,0.9,0),COLORFF60FF;
STICKLINE(DK>CANDCLOSE>=OPEN,CLOSE,OPEN,0.3,0),COLORFFD2FF;
STICKLINE(DK>CANDCLOSE<OPEN,HIGH,LOW,0,1),COLORCYAN;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,3.2,0),COLOR555555;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,2.7,0),COLOR777777;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,2.1,0),COLOR999999;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,1.5,0),COLOR999999;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,0.9,0),COLORDDDDDD;
STICKLINE(DK>CANDCLOSE<OPEN,CLOSE,OPEN,0.3,0),COLORFFFFFF;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)