您的位置:查股网 > 查股公式 > 通达信MACD\KDJ在主图源码指标公式[查股公式]
股票行情消息查询:

通达信MACD\KDJ在主图源码指标公式[查股公式]

2022/6/16 15:46:06

{MACD+KDJ在主图显示}
{以下显示叠加指针的数值}
K:"KDJ.K",NODRAW,COLORWHITE;
D:"KDJ.D",NODRAW,COLORYELLOW;
R1:"RSI.RSI1",NODRAW,COLORC080FF;
R2:"RSI.RSI2",NODRAW,COLORFF8080;
R3:"RSI.RSI3",NODRAW,COLOR87F8F4;
F:"MACD.DIF",NODRAW,COLOR72C072;
A:"MACD.DEA",NODRAW,COLORE98210;
M:"MACD.MACD" >
{MACD+KDJ在主图显示}
{以下显示叠加指针的数值}
K:"KDJ.K",NODRAW,COLORWHITE;
D:"KDJ.D",NODRAW,COLORYELLOW;
R1:"RSI.RSI1",NODRAW,COLORC080FF;
R2:"RSI.RSI2",NODRAW,COLORFF8080;
R3:"RSI.RSI3",NODRAW,COLOR87F8F4;
F:"MACD.DIF",NODRAW,COLOR72C072;
A:"MACD.DEA",NODRAW,COLORE98210;
M:"MACD.MACD",NODRAW,COLORWHITE;
{以下计算叠加比和叠加平移量}
{1、叠加字段高度}
Q:=130;
KH:=HHV(H,Q);
KL:=LLV(L,Q);
DH:=HHV(MAX(K,D),Q);
DL:=LLV(MIN(K,D),Q);
MH:=HHV(MAX(F,A),Q);
ML:=LLV(MAX(F,A),Q);
RH:=HHV(MAX(MAX(R1,R2),R3),Q);
RL:=LLV(MIN(MIN(R1,R2),R3),Q);
{2、叠加比}
BD:=(KH-KL)/(DH-DL)/3;
BM:=(KH-KL)/(MH-ML)/3;
BR:=(KH-KL)/(RH-RL)/3;
{3、叠加平移量}
WK:=(KH-KL)/3;
WD:=(KH+KL-(DH+DL)*BD)/2-CONST(WK);
WM:=(KH+KL-(MH+ML)*BM)/2;
WR:=(KH+KL-(RH+RL)*BR)/2+CONST(WK);
{以下画叠加线}
PLOYLINE(1,K*CONST(BD)+CONST(WD)),COLORWHITE;
PLOYLINE(1,D*CONST(BD)+CONST(WD))COLORYELLOW;
{PLOYLINE(1,R1*CONST(BR)+CONST(WR)),COLORC080FF;
PLOYLINE(1,R2*CONST(BR)+CONST(WR)),COLORFF8080;
PLOYLINE(1,R3*CONST(BR)+CONST(WR)),COLOR87F8F4;}
PLOYLINE(1,F*CONST(BM)+CONST(WM)),COLOR72C072;
PLOYLINE(1,A*CONST(BM)+CONST(WM)),COLORE98210;
STICKLINE(M>0,M*CONST(BM)+CONST(WM),CONST(WM),0,-1),COLORMAGENTA;
STICKLINE(M<0,M*CONST(BM)+CONST(WM),CONST(WM),0,-1),COLORGREEN;
{以下画叠加指针的横坐标线}
PLOYLINE(1,CONST(WM)),COLORWHITE;
{PLOYLINE(1,20*CONST(BR)+CONST(WR)),COLORGREEN,POINTDOT;
PLOYLINE(1,80*CONST(BR)+CONST(WR)),COLORRED,POINTDOT;
PLOYLINE(1,50*CONST(BR)+CONST(WR)),COLORYELLOW,POINTDOT;}
PLOYLINE(1,20*CONST(BD)+CONST(WD)),COLORGREEN,POINTDOT;
PLOYLINE(1,80*CONST(BD)+CONST(WD)),COLORRED,POINTDOT;
PLOYLINE(1,50*CONST(BD)+CONST(WD)),COLORYELLOW,POINTDOT;
{以下显示叠加指针的横坐标值}
{DRAWTEXT(CURRBARSCOUNT=1,(80*CONST(BR)+CONST(WR))*1.015,'80')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(80*CONST(BR)+CONST(WR))*0.99,'RSI')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(50*CONST(BR)+CONST(WR))*1.015,'50')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(50*CONST(BR)+CONST(WR))*0.99,'RSI')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(20*CONST(BR)+CONST(WR))*1.015,'20')COLORWHITE;}
DRAWTEXT(CURRBARSCOUNT=1,(20*CONST(BD)+CONST(WD))*1.015,'20')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(20*CONST(BD)+CONST(WD))*0.99,'KDJ')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(50*CONST(BD)+CONST(WD))*1.015,'50')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(50*CONST(BD)+CONST(WD))*0.99,'KDJ')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(80*CONST(BD)+CONST(WD))*1.015,'80')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,(80*CONST(BD)+CONST(WD))*0.99,'KDJ')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,CONST(WM)*1.015,'0')COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,CONST(WM)*0.99,'MACD')COLORWHITE;
{A:=BACKSET(ISLASTBAR,BARSLAST(CROSS(K,D))+1);};

相关文章列表
天天查股公式列表

股票公式分类

天天查股:股票行情消息 实时DDX在线 资金流向 千股千评 业绩报告 十大股东 最新消息 超赢数据 大小非解禁 停牌复牌 股票分红查询 股票评级报告
广告客服:315126368   843010021
天天查股网免费查股,本站内容与数据仅供参考,不构成投资建议,据此操作,风险自担,股市有风险,投资需谨慎。 沪ICP备15043930号-29