您的位置:爱股网 > 查股公式 > MACD+KDJ+RSI副图指标源码[查股公式]
股票行情消息数据:

MACD+KDJ+RSI副图指标源码[查股公式]

2021/12/27 8:30:03
MACD+KDJ+RSI副图指标源码
SQX:=(C-MA(CLOSE,13))*100;

DIF:=EMA(MA(SQX,7),1);

DEA:=EMA(DIF,7);

MACD:=(DIF-DEA)*2;

RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*247.2-123.6;

A11:=BARSLAST(REF(CROSS(DIF,DEA),1));

B1:=REF(C,A11+1) > C AND REF(DIF,A11+1) < DIF AND CROSS(DIF,DEA);

A12:=BARSLAST(REF(CROSS( " KDJ.K " , " KDJ.D " ),1));

B2:=REF(C,A12+1) > C AND REF( " KDJ.K " ,A12+1) < " KDJ.K " AND CROSS( " KDJ.K " , " KDJ.D " );

A13:=BARSLAST(REF(CROSS( " RSI.RSI1 " , " RSI.RSI2 " ),1));

B3:=REF(C,A13+1) > C AND REF( " RSI.RSI1 " ,A13+1) < " RSI.RSI1 " AND CROSS( " RSI.RSI1 " , " RSI.RSI2 " );

C1:=BARSLAST(REF(CROSS(DEA,DIF),1));

D1:=REF(C,C1+1) < C AND REF(DIF,C1+1) > DIF AND CROSS(DEA,DIF);

C2:=BARSLAST(REF(CROSS( " KDJ.D " , " KDJ.K " ),1));

D2:=REF(C,C2+1) < C AND REF( " KDJ.K " ,C2+1) > " KDJ.K " AND CROSS( " KDJ.D " , " KDJ.K " );

C3:=BARSLAST(REF(CROSS( " RSI.RSI2 " , " RSI.RSI1 " ),1));

D3:=REF(C,C3+1) < C AND REF( " RSI.RSI1 " ,C3+1) > " RSI.RSI1 " AND CROSS( " RSI.RSI2 " , " RSI.RSI1 " );

STICKLINE(MACD > 0 AND MACD > REF(MACD,1),MACD,0,0.1,0),COLORRED;

STICKLINE(MACD > 0 AND MACD < REF(MACD,1),MACD,0,0.1,0),COLOR00FFFF;

STICKLINE(MACD < 0 AND MACD < REF(MACD,1),MACD,0,0.1,0),COLORFFFF00;

STICKLINE(MACD < 0 AND MACD > REF(MACD,1),MACD,0,0.1,0),COLORFF00FF;

K:SMA(SMA( RSV,3,1),3,1),COLORWHITE;

D:MA(EMA(K,3),3),COLORYELLOW;

J:3*K-2*D,COLORMAGENTA;

MACD底背:IF(B1 > 0,50,0),LINETHICK2,COLORRED;

KDJ底背:IF(B2 > 0,65,0),LINETHICK2,COLORFF00FF;

RSI底背:IF(B3 > 0,80,0),LINETHICK2,COLORYELLOW;

MACD顶背:IF(D1 > 0,-50,0),LINETHICK2,COLORFF00FF;

KDJ顶背:IF(D2 > 0,-65,0),LINETHICK2,COLORFFCC66;

RSI顶背:IF(D3 > 0,-80,0),LINETHICK2,COLORWHITE;

DRAWICON((CROSS(K,D) AND K < 0 ),K,7);

DRAWICON((CROSS(D,K) AND K > 0 ),D,8);

DRAWICON(J < (REF(J,1))AND K > (REF(K,1)) AND D > (REF(D,1) AND J > 0),REF(J,1),12);

DRAWICON(J > (REF(J,1)) AND K < (REF(K,1)) AND D < (REF(D,1) AND J < 0),REF(J,1),13);


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

股票公式分类

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