双龙MACD副图有买入点信号
DIFF: EMA(CLOSE,12) - EMA(CLOSE,26);DEA: EMA(DIFF,9);MACD: 2*(DIFF-DEA), COLORSTICK; STICKLINE(MACD>0,MACD,0,2,1),COLOR0000DC;STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2,1),COLOR00B400;STICKLINE(MACD<=0,MACD,0,2,1),COLORGRAY;STICKLINE(MACD<=0 AND MACD>REF(MACD,1),MACD,0,2,1),COLORC800C8;XX0:=BARSLAST((CROSS(MACD,REF(MACD,1)) AND MACD>0) OR CROSS(MACD,0));XX1:=BARSLAST(CROSS(0.5,COUNT(MACD>REF(MACD,1),XX0+1)=XX0+1));{回}XX2:=COUNT(MACD<REF(MACD,1),XX1+1)=XX1+1 AND COUNT(MACD<0,XX1+1)<=2;XX3:=REF(XX2,1) AND MACD>REF(MACD,1) AND C>O AND C>REF(C,1);STICKLINE(XX1=0 AND MACD>0,MACD,0,2,0),COLORDCDC00;STICKLINE(XX3,MACD,0,2,0),COLOR0854FF;ER:=VOL/CAPITAL*100;ZD:=C/REF(C,1)*100-100;AA0:=BARSLAST(CROSS(0.5,COUNT(MACD<0,3)>=3) AND (MACD>=1 OR DIFF>=2));AA1:=CROSS(0.5,COUNT(MACD>REF(MACD,1),AA0+1)=AA0+1);AA2:=REF(HHV(ER,AA0+1),1)>=3 AND REF(HHV(ZD,AA0+3),1)>=5;BB0:=BARSLAST(AA1 AND AA2);BB1:=COUNT(MACD<REF(MACD,1),BB0+1)=BB0+1;BB2:=COUNT(MACD<0,BB0+1)<=2 AND (COUNT(C<O AND ZD<0,2)=2 OR BB0>=1);BB3:=BB1 AND BB2;BB4:=REF(BB3,1) AND MACD>REF(MACD,1) AND C>O AND ZD>0;DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));TRIX:=(DIFF-REF(DIFF,1))/REF(DIFF,1)*100;J1:=0.7*(26-12)/2*EMA((C-REF(C,1)),12);J2:EMA(EMA(J1,3),3);J3:EMA(J1,3);DRAWBAND(J3,RGB(155,50,50),J2,RGB(0,100,50)); JC:CROSS(DIFF,DEA) ,NODRAW;DRAWICON(JC,DIFF*0.9,1);
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出DIFF: 收盘价的12日指数移动平均 - 收盘价的26日指数移动平均
输出DEA: DIFF的9日指数移动平均
输出MACD: 2*(DIFF-DEA), COLORSTICK
当满足条件MACD>0时,在MACD和0之间画柱状线
STICKLINE(MACD>0 AND MACD<1日前的MACD,MACD,0,2,1),COLOR00B400
当满足条件MACD<=0时,在MACD和0之间画柱状线
STICKLINE(MACD<=0 AND MACD>1日前的MACD,MACD,0,2,1),COLORC800C8
XX0赋值:上次(CROSS(MACD,1日前的MACD距今天数 AND MACD>0) OR CROSS(MACD,0))
XX1赋值:上次CROSS(0.5,COUNT(MACD>1日前的MACD,XX0+1距今天数=XX0+1))
{回}XX2赋值:COUNT(MACD<1日前的MACD,XX1+1)=XX1+1 AND COUNT(MACD<0,XX1+1)<=2
XX3赋值:1日前的XX2 AND MACD>1日前的MACD AND C>O AND C>1日前的C
当满足条件XX1=0 AND MACD>0时,在MACD和0之间画柱状线
当满足条件XX3时,在MACD和0之间画柱状线
ER赋值:成交量/当前流通股本*100
ZD赋值:C/1日前的C*100-100
AA0赋值:上次CROSS(0.5,统计3日满足MACD<0的天数>=3距今天数 AND (MACD>=1 OR DIFF>=2))
AA1赋值:CROSS(0.5,COUNT(MACD>1日前的MACD,AA0+1)=AA0+1)
AA2赋值:REF(AA0+1日内ER最高值,1)>=3 AND REF(AA0+3日内ZD最高值,1)>=5
BB0赋值:上次AA1 AND AA2距今天数
BB1赋值:COUNT(MACD<1日前的MACD,BB0+1)=BB0+1
BB2赋值:统计BB0+1日满足MACD<0的天数<=2 AND (统计2日满足C=1)
BB3赋值:BB1 AND BB2
BB4赋值:1日前的BB3 AND MACD>1日前的MACD AND C>O AND ZD>0
DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10))
TRIX赋值:(DIFF-1日前的DIFF)/1日前的DIFF*100
J1赋值:0.7*(26-12)/2*EMA((C-1日前的C),12)
输出J2:J1的3日指数移动平均,3)
输出J3:J1的3日指数移动平均
DRAWBAND(J3,RGB(155,50,50),J2,RGB(0,100,50))
输出JC:DIFF上穿DEA ,NODRAW
当满足条件JC时,在DIFF*0.9和1之间画图标