飞狐MACD量价平台主图指标公式
2020/11/7 18:22:43
INPUT:N(18),S(26),P(12),M(9);{N为考查量变周期,可按个人喜好设置其数值}
a:=EMA(CLOSE,s);
T:=EMA(CLOSE,P);
b:=ema(a,m);
t1:=ema(t,m);
DEA:ema(T-(t1-T),2),colorff8866,LINETHICK2;//蓝,MACD>0,DEA<0
diff:DEA-EMA(((a-b)-(t-t1)),1)*6,colorffff66,LINETHICK2;;
MACD_:STICKLINE(diff>DEA,diff,DEA,0.1,0),COLORccccff;
STICKLINE(diff<DEA,diff,DEA,0.1,0),COLOREEAA88;
KLINE(O,H,L,C,0);
PARTLINE(a-b<t-t1,DEA),colorred,LINETHICK2;//红,MACD>0,DEA>0
PARTLINE(A>T AND a-b>t-t1,DEA),color00ff00,LINETHICK2;//绿,MACD<0,DEA<0
PARTLINE(A>T AND a-b<t-t1,DEA),colorFF00BB,LINETHICK2;//紫,MACD>0,DEA>0
大量高价线:VALUEWHEN(V>REF(HHV(V,N),1),HIGH),LINETHICK;
小量低价线:VALUEWHEN(V<REF(LLV(V,N),1),L),LINETHICK;
PARTLINE(小量低价线=REF(小量低价线,1),小量低价线),COLORFF00FF;
PARTLINE(大量高价线=REF(大量高价线,1),大量高价线),COLOR00FFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS,SYSPARAM(5),'DEA线变色的意义: ■ 红:MACD>0,DEA>0 ■ 紫:MACD>0,DEA<0 ■ 绿:MACD<0,DEA<0 ■ 蓝:MACD<0,DEA>0 '),COLORFFCCEE;
投股票 网 w ww.tou18.cn
股市公式下载推荐