通达信选股指标“黄金坑”求改为大智慧
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

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;


选股票看什么指标最好 >股票指标网