首页 > 选股公式 > 飞狐公式 > 正文

飞狐MACD和KDJ主图指标公式(选股公式/源码)

2020-10-06 04:08:48 来源:网络

最近看到很多股民说需要飞狐公式里关于飞狐MACD和KDJ主图指标公式,下面红股网整理一份《飞狐MACD和KDJ主图指标公式(选股公式/源码)》,希望让您对飞狐公式有所认识。

INPUT:N(18),S(26),P(12),M(9);

DRAWGBK(CLOSE=CLOSE,COLORRGB(80,130,130),COLORRGB(30,30,60),1);

A:=EMA(CLOSE,S);

T:=EMA(CLOSE,P);

B:=EMA(A,M);

T1:=EMA(T,M);

DEA:=EMA(T-(T1-T),2),COLORFF8866,LINETHICK2;

DIFF:=DEA-EMA(((A-B)-(T-T1)),1)*6,COLORFFFF66,LINETHICK2;

FILLRGN(DIFF>DEA,DEA,DIFF),COLORBROWN;

FILLRGN(DIFF<DEA,DEA,DIFF),COLORGRAY;

RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9));

RSV2:=(RSV1-0.5)/5*EMA(C,20);

RSVK:=SMA(RSV2,3,1);

RSVD:=SMA(RSVK,3,1);

RSVJ:=RSVK*3-RSVD*2;

K:=RSVK+EMA(C,20),COLORWHITE;

D:RSVD+EMA(C,20),COLORYELLOW;

J:RSVJ+EMA(C,20),COLORMAGENTA;

{K线}

STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;

STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,4,0),colorred;

STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),color00ff00;

STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,4,0),color00ff00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR008800;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3.5,0 ),COLOR009900;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00AA00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.5,0 ),COLOR00BB00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00CC00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.5,0 ),COLOR00DD00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00EE00;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.5,0 ),COLOR00FF00;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLORFFBBFF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLORFF00FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.5,0) ,COLORFF22FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLORFF44FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0) ,COLORFF66FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFF88FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0) ,COLORFF99FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFFAAFF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0) ,COLORFFBBFF;

{涨跌停}

ZDF:=(C-REF(C,1))/REF(C,1)*100;

{STICKLINE(ZDF>9.8,O,C,4,0),COLORFF00FF;

STICKLINE(ZDF<-9.8,O,C,4,0),COLORBLUE;}

STICKLINE(ZDF>9.8,CLOSE,O,2.8,0),COLOR000055;

STICKLINE(ZDF>9.8,CLOSE,O,2,0),COLOR000088;

STICKLINE(ZDF>9.8,CLOSE,O,1.5,0),COLOR0000AA;

STICKLINE(ZDF>9.8,CLOSE,O,1,0),COLOR0000CC;

STICKLINE(ZDF>9.8,CLOSE,O,0.5,0),COLOR0000EE;

STICKLINE(ZDF<-9.8,O,C,2.8,0),COLOR555500;

STICKLINE(ZDF<-9.8,CLOSE,O,2,0),COLOR888800;

STICKLINE(ZDF<-9.8,CLOSE,O,1.5,0),COLORAAAA00;

STICKLINE(ZDF<-9.8,CLOSE,O,0.5,0),COLORCCCC00;

STICKLINE(ZDF<-9.8,CLOSE,O,1,0),COLOREEEE00;

BOLL:=EMA(C,20);

UPPER:BOLL+2*STD(CLOSE,20),CROSSDOT,COLORRED;

LOWER:BOLL-2*STD(CLOSE,20),CROSSDOT,COLORWHITE;

以上是由“红股网”整理的“飞狐MACD和KDJ主图指标公式(选股公式/源码)”全部内容,如稿件涉及版权等问题,请与我们联系删除或处理,客服邮箱85703630@qq.com,稿件内容仅为传递更多信息之目的,不代表本网观点,亦不代表本网站赞同其观点或证实其内容的真实性。