//黄金分割
90高点:=hhv(high,90);90高点位:=hhvbars(high,90);90低点:=llv(low,90);90低点位:=llvbars(low,90);
90前高:=if(90高点/ref(high,90高点位-10)>1.1 and 90高点/ref(high,90高点位+10)>1.1,90高点,0);
90前低:=if(90低点/ref(low,90低点位-10)<0.9 and 90低点/ref(low,90低点位+10)<0.9,90低点,0);
90高差:=90高点-90低点;
90波段:=90前高>0 and abs(前高价_2-90高点)/90高点>0.03 and 前高位置_2>90高点位;
90触底回升:=90低点位<90高点位 and 90波段;
90-382:=90低点+90高差*0.382;90-618:=90低点+90高差*0.618;90-中位:=90低点+90高差*0.5;
90触顶下跌:=90低点位>90高点位 and 90波段;
线长:=if(前高位置_1<ref(90高点位,1),90高点位-前高位置_1,90);
drawsl(90波段 and not(ref(90波段,1)),90高点+90高差*1,0,线长,3,colorgray,1,vtDashDot);
drawsl(90波段 and not(ref(90波段,1)),90高点+90高差*0.618,0,线长,3,colorgray,1,vtDot);
drawsl(90波段 and not(ref(90波段,1)),90高点+90高差*0.5,0,线长,3,colorgray,1,vtDot);
drawsl(90波段 and not(ref(90波段,1)),90高点+90高差*0.382,0,线长,3,colorgray,1,vtDot);
drawsl(90波段 and not(ref(90波段,1)),90高点,0,线长,3,colorgray,1,vtDASH);
drawsl(90波段 and not(ref(90波段,1)),90低点,0,线长,3,colorgray,1,vtDASH);
drawsl(90波段 and not(ref(90波段,1)),90低点+90高差*0.382,0,线长,3,colorgray,1,vtDot);
drawsl(90波段 and not(ref(90波段,1)),90低点+90高差*0.5,0,线长,3,colorgray,1,vtDot);
drawsl(90波段 and not(ref(90波段,1)),90低点+90高差*0.618,0,线长,3,colorgray,1,vtDot);
DRAWTEXT(90波段 and not(ref(90波段,1)),90高点+90高差*1,'2',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90高点+90高差*0.618,'1.618',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90高点+90高差*0.5,'1.5',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90高点+90高差*0.382,'1.382',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90低点+90高差*0.382,'0.382',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90低点+90高差*0.5,'0.5',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90低点+90高差*0.618,'0.618',COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90高点,'90高点 '&NUMTOSTR(90高点,3),COLORwhite);
DRAWTEXT(90波段 and not(ref(90波段,1)),90低点,'90低点'&NUMTOSTR(90低点,3),COLORwhite);