首先要说明的是,此源码为飞狐版,是在J0J老师的K线微积分律的基础上融合而成,原源码只有MACD和KDJ。并且对原源码MACD和KD指标的参数进行了调整
源码
LONG:=26;
SHORT:=12;
cm:=42;
MID:=4;
m1:=3;
DFC:=c-REF(c,1);
WJXS:=(LONG-SHORT)/2;
JF:=WJXS*EMA(DFC,SHORT);
CCI:(JF-MA(JF,CM))/((0.2*CM)*AVEDEV(JF,CM)),COLOR6600FF;
FILLRGN(CCI<0,CCI,0),COLORFF0080;
FILLRGN(CCI>0,CCI,0),COLOR6600FF;
DIF:EMA(JF,LONG),COLOR1188FF,LINEDOT;
DEA:EMA(DIF,MID),COLORGREEN,LINEDOT;
FILLRGN(DIF>=DEA,DEA,DIF),COLORBROWN;
FILLRGN(DIF
K:SMA(JF,SHORT/3,1),COLORFEDCBA;
D:SMA(K,M1,1),COLOR13F8F9;
J:=2.4*K-1.5*D,COLORF813F9;
DJ:=ABS(J);
MM:=(HHV(DJ,120)+LLV(DJ,120))/2;
STICKLINE(J>K,J,K,2.3,0),COLOR1388D3;
STICKLINE(J>K,J,K,1.0,0),COLOR13AAD3;
STICKLINE(J
LC:=REF(JF,1);
rsi:SMA(MAX(JF-LC,0),SHORT,1)/SMA(ABS(JF-LC),SHORT,1)*(SHORT/5)-(SHORT/10),COLORSTICK,COLORCYAN,LINETHICK2;
STICKLINE(C>0,0,0,10,0),COLORGRAY;
STICKLINE(C>0,0.5,0.5,5,0),COLORMAGENTA;
STICKLINE(C>0,-0.5,-0.5,5,0),COLORMAGENTA;