相关简介:通达信主图买卖点提示指标公式无未来源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:主图
均线参数是20、60、120,2次金叉和2次死叉的提示,很适合做波段和趋势。
买多和卖空的提示实用性强,解决金叉死叉在震荡中的弊端,也是不错的买点和卖点。
通达信指标公式源码:
DRAWGBK(CURRBARSCOUNT=1,RGB(110,108,108),RGB(88,30,0),0,”,0),COLORYELLOW,LINETHICK2;
{获利盘比例}
0,COLORYELLOW,LINETHICK2;
M2:=EMA(C,2);
M18:=EMA(C,18);
买点:=IF(CROSS(M18,M2),5,10*10000),COLORFF00FF,LINETHICK2;
RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
VARB2:=(RSVV/2+22)*1;
Q:=EMA(VOL,13);
Y:=EMA(AMOUNT,13);
S:=((Y/Q)/100);
X:=(((CLOSE-S)/S)*100);
F:=((X<(0))ANDZXNH);
XQ:=FANDRSVV<VARB2-2;
无未来XG:买点ANDXQCOLORYELLOW,LINETHICK3;
N:=5;M:=10;
MA5:MA(C,N),COLORWHITE;
MA18:=MA(CLOSE,18);
MA13:MA(C,M),COLORGREEN,LINETHICK2;
VAR1:=C=HHV(C,4)ANDREF(C,1)=LLV(C,4);
VAR2:=C=LLV(C,4)AND(REF(C,1)<REF(C,2)ORREF(C,1)<REF(C,3))ORREF(C,1)=LLV(C,4)ANDC<REF(C,2)ORREF(C,2)=LLV(C,4)ANDREF(C,1)=HHV(C,4)ANDC<REF(C,1)ORREF(C,3)=LLV(C,4)ANDC<REF(C,1)ANDC<REF(C,2);
VAR3:=REF(C,1)=LLV(C,4)ANDC>=REF(C,2)ORREF(C,2)=LLV(C,4)ANDREF(C,1)<=REF(C,3)ANDREF(C,2)<REF(C,4)ANDC>=REF(C,1);
A:=(3*C+L+O+H)/6;
VAR4:=(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))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(VAR4,13);
{红}
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),COLOR0000FF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{蓝}
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3,0),COLORFF9900;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.5,0),COLORFFCC00;
{粉}
STICKLINE(VAR1,C,(O+C)/2,3,0),COLORFF11FF;
STICKLINE(VAR1,C,(O+C)/2,0.5,0),COLORFFDDFF;
{灰}
STICKLINE(VAR2,C,(O+C)/2,3,0),COLOR999999;
STICKLINE(VAR2,C,(O+C)/2,0.5,0),COLORFFBBFF;
{绿}
STICKLINE(VAR3,O,(O+C)/2,3,0),COLOR00BB00;
STICKLINE(VAR3,O,(O+C)/2,0.5,0),COLOR00FF00;
卖:=HHV(DX,2)=HHV(DX,7)ANDCOUNT(DX>50,2)ANDCROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,’卖’),COLORGREEN;
买:=LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDCROSS(DX,MA(DX,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.03,’买’),COLORRED;
加仓:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
DRAWTEXT(FILTER((CROSS(加仓,0)ORCROSS(CLOSE,CB))AND买=1,3),LOW-0.03,’加’),COLORWHITE;
跟:=MA18>=REF(MA18,3)ANDCROSS(CLOSE,MA18);
DRAWTEXT(跟,LOW*0.96,’跟’),COLORCC66FF;
M1:=3;M2:=6;M3:=12;M4:=24;
熊市区:MA((2*L+C)/3,20),COLORCYAN,NODRAW;
牛市区:MA((H+2*C)/3,20),COLORRED,NODRAW;
STICKLINE(熊市区,熊市区,L,0,-1),COLORLICYAN;
STICKLINE(C>牛市区,熊市区,L,0,-1),COLOR0090FF;
STICKLINE(C>熊市区ANDC<牛市区,L,熊市区,0,-1),COLORWHITE;
DRAWBAND(熊市区,RGB(60,60,60),牛市区,RGB(60,60,60));
STICKLINE(C>熊市区ANDC<牛市区,牛市区,熊市区,2,0),COLORWHITE;
STICKLINE(C>熊市区ANDC>=O,O,C,3,1),COLORRED;
STICKLINE(C>熊市区ANDC>=O,H,C,0,0),COLORRED;
STICKLINE(C>熊市区ANDC<O,O,C,2.5,0),COLORCYAN;
STICKLINE(C>熊市区ANDC<O,O,C,1.8,0),COLORRED;
买入:=CROSS(C,牛市区);
STICKLINE(C>熊市区ANDC<O,O,H,0,1),COLORRED;
STICKLINE(C>熊市区ANDC<O,C,L,0,1),COLORRED;
卖出:=CROSS(熊市区,C);
STICKLINE(C<牛市区ANDC<熊市区ANDC>O,O,C,2.5,1),COLORGREEN;
STICKLINE(C<牛市区ANDC<熊市区ANDC<=O,C,O,3,0),COLORGREEN;
STICKLINE(C<牛市区ANDC<熊市区ANDC<=O,H,L,0,0),COLORGREEN;
STICKLINE(C<牛市区ANDC<熊市区ANDC>O,C,H,0,1),COLORGREEN;
STICKLINE(C<熊市区,牛市区,熊市区,2,0),COLORBLUE;
STICKLINE(C<牛市区ANDC<熊市区ANDC>O,O,L,0,1),COLORGREEN;
STICKLINE(C>牛市区,熊市区,牛市区,2,0),COLOR0090FF;
DRAWICON(买入,L*0.98,7);
DRAWICON(卖出,H*1.03,8);
[源码注释]通达信公式动态翻译结果
AA赋值:如果沪深品种类型=3ORFINANCE(3)=4,返回最高价=计算涨停价,否则返回最高价=计算涨停价 并且 收盘价<最高价
输出XG:AA AND 收盘价/1日前的收盘价<=0.92
评论(0)