通达信选股指标“黄金坑”求改为大智慧
2020/7/12 17:50:55
公式编写说明:
N:=20;M:=10;XZ1:=(C/REF(C,1)-1)*100;XZ2:=CONST(HHV(XZ1,N));XZ3:=CONST(LLV(XZ1,N));T:=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/T;VAR2:=DMM/T;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);黄金坑:(VAR6 OR VAR7) AND VAR5>0,COLORYELLOW;
公式源码示例:
N:=20;M:=10;
XZ1:=(C/REF(C,1)-1)*100;
XZ2:=HHV(XZ1,N);
XZ3:=LLV(XZ1,N);
T:=EMA(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:=EMA(IF(HD>0 AND HD>LD,HD,0),M);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),M);
VAR1:=DMP/T;
VAR2:=DMM/T;
VAR3:=EMA(VAR1,M);
VAR4:=EMA(VAR2,M);
VAR5:=IF(VAR3>VAR4,XZ2,XZ3);
VAR6:=REF(VAR5,2)>0 AND ref(VAR5<0,1);
VAR7:=REF(VAR5,3)>0 AND ref(VAR5<0,2);
黄金坑:(VAR6 OR VAR7) AND VAR5>0;
看股吧 公式 www.kanguba.c om
其它股票公式列表