标题: 请哪位老师将MACD柱状背离改写成选股公式 [打印本页] 作者: 蓝天水秀 时间: 2016-10-2 20:15 标题: 请哪位老师将MACD柱状背离改写成选股公式 HJ1:=1;
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:=REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0;
低柱背:=DRAWLINE(HJ4=HJ3,MACD,HJ6,MACD,0),COLORRED,LINETHICK2;
DRAWICON(HJ6,MACD*1.2,25); 作者: 梦想成真 时间: 2016-10-2 21:38
{柱状背离}
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0; 作者: 梦想成真 时间: 2016-10-2 21:40
{柱状背离选股}
HJ1:=1;
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0;