大智慧黄金主图指标
源码
input:VAR1(1,0,500),VAR2(1,0,500);
AA:=EMA(C,8);
BB:=EMA(C,17);
CC:=EMA(AA-BB,9);
XMP:9*REF(CC,1)-7*REF(AA,1)+8*REF(BB,1);
ah:hhvall(if(VAR1=1,h,VAR1)),COLORYELLOW,POINTDOT;
al:llvall(if(VAR2=1,l,VAR2)),COLORYELLOW,POINTDOT;
ahl:=ah-al;
a23:al+ahl*0.236,COLORYELLOW,POINTDOT;
a38:al+ahl*0.382,COLOREE00EE,POINTDOT;
a50:al+ahl*0.50,COLORYELLOW,POINTDOT;
a61:al+ahl*0.618,COLOREE00EE,POINTDOT;
a76:al+ahl*0.764,COLORYELLOW,POINTDOT;
{标注数字}y:=999;
DRAWTEXTREL(5,0,'100% '+ah),COLOREE00EE;
DRAWTEXTREL(5,y*0.236,'76.4% '+a76),COLORYELLOW;
DRAWTEXTREL(5,y*0.382,'61.8% '+a61),COLOREE00EE;
DRAWTEXTREL(5,y*0.50,'50% '+a50),COLORYELLOW;
DRAWTEXTREL(5,y*0.618,'38.2% '+a38),COLOREE00EE;
DRAWTEXTREL(5,y*0.764,'23.6% '+a23),COLORYELLOW;
DRAWTEXTREL(5,y-30,'最低 '+al),COLOREE00EE;