九毛八公式指标
麻烦老师将股龙黄金坑改写为通达信可用的,谢谢老师~ 源码:XZ1:=(C/REF(C,1)-1)*100; XZ2:=CONST(HHV(XZ1,N)); XZ3:=CONST(LLV(XZ1,N)); TR:=EXPMEMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),M); HD:=H-REF(H,1); LD:=REF(L,1)-L; DMP:=EXPMEMA(IF(HD>0 AND HD>LD,HD,0),M); DMM:=EXPMEMA(IF(LD>0 AND LD>HD,LD,0),M); VAR1:=DMP/TR; VAR2:=DMM/TR; VAR3:=EXPMEMA(VAR1,M); VAR4:=EXPMEMA(VAR2,M); VAR5:=IF(VAR3>VAR4,XZ2,XZ3); VAR6:=REF(VAR5,2)>0 AND LAST(VAR5<0,1,1); VAR7:=REF(VAR5,3)>0 AND LAST(VAR5<0,2,1); DRAWBAND(VAR5,RGB(150,50,50),0,RGB(0,130,50)); 黄金:IF(VAR1>VAR3 AND VAR2
公式模块:
XZ1:=(C/REF(C,1)-1)*100;
XZ2:=CONST(HHV(XZ1,N)); XZ3:=CONST(LLV(XZ1,N)); TR2:=EXPMEMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),M); HD:=H-REF(H,1); LD:=REF(L,1)-L; DMP:=EXPMEMA(IF(HD>0 AND HD>LD,HD,0),M); DMM:=EXPMEMA(IF(LD>0 AND LD>HD,LD,0),M); VAR1:=DMP/TR; VAR2:=DMM/TR; VAR3:=EXPMEMA(VAR1,M); VAR4:=EXPMEMA(VAR2,M); VAR5:=IF(VAR3>VAR4,XZ2,XZ3); VAR6:=REF(VAR5,2)>0 AND LAST(VAR5<0,1,1); VAR7:=REF(VAR5,3)>0 AND LAST(VAR5<0,2,1); DRAWBAND(VAR5,RGB(150,50,50),0,RGB(0,130,50)); 黄金:IF(VAR1>VAR3 AND VAR2<VAR3,XZ2/2,0),COLORYELLOW; DRAWBAND(黄金,RGB(250,150,50),0,RGB(250,150,50)); 黄金坑:(VAR6 OR VAR7) AND VAR5>0,NODRAW,COLORYELLOW; DRAWTEXT(黄金坑,XZ3/2,'黄金坑'),COLORYELLOW; DIF:(EMA(CLOSE,12)-EMA(CLOSE,26))*10,COLORWHITE; DEA:EMA(DIF,9),COLORYELLOW;