相关简介:通达信红财神主图指标(量能选股)公式源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:主图
一个自带买卖点的主图,选择一只趋势、形态都向好的股票,在市场行情好的背景下,可以傻瓜式操作
通达信指标公式源码:
量能饱和:IF((AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100);
Va:=FILTER(C>0,COUNT(C>0,0));
STICKLINE(Va,20,121,6,1),COLORFFFFFF;
Va1:=FILTER(量能饱和 <= 5,COUNT(量能饱和 <= 5,0));
STICKLINE(Va1,21,(20 + 量能饱和),5,0),COLORFFFFFF;
Va2:=FILTER(量能饱和 > 5,COUNT(量能饱和 > 5,0));
STICKLINE(Va2,21,(20 + 量能饱和),5,0),COLORCCFF88;
Va3:=FILTER(量能饱和 > 20,COUNT(量能饱和 > 20,0));
STICKLINE(Va3,21,(20 + 量能饱和),5,0),COLORFF00FF;
Va4:=FILTER(量能饱和 > 40,COUNT(量能饱和> 40,0));
STICKLINE(Va4,21,(20 + 量能饱和),5,0),COLOR0000FF
AA05:=MA(C,5);
WRGLL:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
SD5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
JSD5:=EMA((SD5-REF(SD5,1)),3);
AA10:=MA(C,10);
AA30:=MA(C,30);
SXRGLL:=(C-AA30)/AA30*100;
JC:=CROSS(0,WRGLL) AND SXRGLL<REF(SXRGLL,1) AND AA10>REF(AA10,1);
MR:=COUNT(CROSS(WRGLL,0),3)>=1 AND SXRGLL>REF(SXRGLL,1) AND
AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
MT1:=FILTER(MR,10);
MT2:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND SXRGLL>REF(SXRGLL,1)
AND AA10>REF(AA10,1) AND JSD5>REF(JSD5,1) AND SD5>REF(SD5,1) ,10);
CT1:=FILTER(JC,10);
XG:MT1 OR MT2;
P:=30;
N:=8;
线A1:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3;
线A2:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20)+MA(CLOSE,30)+MA(CLOSE,60)+MA(CLOSE,120))/6;
线A3:=(MA(CLOSE,20)+MA(CLOSE,60)+MA(CLOSE,120))/3;
线A4:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;
STICKLINE(线A1>线A4,线A1,线A4,0.1,1),COLORFF0080;
STICKLINE(线A1<线A4,线A1,线A4,0.1,1),COLOR00FF00;
STICKLINE(C>O OR (C=O AND C>REF(C,1)),H,L,0.1,0),COLORRED;
STICKLINE(C>O OR (C=O AND C>REF(C,1)),O,C,4,1),COLORRED;
STICKLINE(C<O OR (C=O AND C<=REF(C,1)),H,L,0.1,0),COLORFFEEAF;
STICKLINE(C<O OR (C=O AND C<=REF(C,1)),O,C,4,0),COLORFFEEAF;
DRAWICON(CROSS(线A1,线A4),线A1,1);
线:IF(线A1<线A3,线A1,线A3),COLOR00FF00;
IF(线A1<线A3,线A3,线A1),COLORRED;
HV1:=REF(H,P)=HHV(H,2*P+1);
HV2:=FILTER(HV1,P);
HV3:=BACKSET(HV2,P+1);
HV4:=FILTER(HV3,P);
R11:=BACKSET(ISLASTBAR,BARSLAST(HV4)+1);
S11:=R11>REF(R11,1);
BOH:DRAWLINE(HV4,H,S11,H,1),COLORBLUE;
AA2:=REF(L,P)=LLV(L,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
BOL:DRAWLINE(DD2,L,U11,L,1),COLOR00FFFF;
BOV:=L<=BOL AND C>BOL;
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDD+1);
GDCS22:=CONST(DINGBUTS11);
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
线1:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORFFAA99,LINETHICK1;
线2:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLOR9966FF,LINETHICK1;
卖出:H>=线1 AND REF(H<线1,1),COLOR00FFFF,NODRAW;
STICKLINE(卖出,O,C,3,0),COLOR00FFFF;
[源码注释]通达信公式动态翻译结果
GWSC赋值:KDJ的D上穿KDJ的K
T赋值:上次GWSC距今天数
输出XG:T<=10 AND T日前的KDJ的D>90 AND 收盘价上穿T日前的最高价
评论(0)