黄金分割计算
源码中的高点 低点是需要手动输入的哟
上涨测回调
高:=****,NODRAW;
低:=****,NODRAW;
E1:=高-(高-低)*0.5 ;
E2:=高-(高-低)*0.618 ;
E3:=高-(高-低)*0.764 ;
DRAWSL(ISLASTBAR,高,0,-120,0,COLORRED),DASH;
DRAWSL(ISLASTBAR,低,0,-120,0,COLORGREEN),DASH;
DRAWSL(ISLASTBAR,E1,0,-120,0,COLORYELLOW),DOT;
DRAWSL(ISLASTBAR,E2,0,-120,0,COLORYELLOW),DASHDOT;
DRAWSL(ISLASTBAR,E3,0,-120,0,COLORYELLOW),DASHDOTDOT;
DRAWNUMBER(ISLASTBAR,高,高,0,COLORRED),ALIGN0;
DRAWNUMBER(ISLASTBAR,低,低,0,COLORGREEN),ALIGN0;
DRAWNUMBER(ISLASTBAR,E1,E1,0,COLORYELLOW),ALIGN0;
DRAWNUMBER(ISLASTBAR,E2,E2,0,COLORYELLOW),ALIGN0;
DRAWNUMBER(ISLASTBAR,E3,E3,0,COLORYELLOW),ALIGN0;
高:=1877.4,NODRAW;
低:=1859.2,NODRAW;
第一目标:=SQRT(((高-低)*0.5+低)*((高-低)*0.382+低) );
第二目标:=SQRT(((高-低)*0.618+低)*((高-低)*0.764+低) );
DRAWSL(ISLASTBAR,高,0,-120,0,COLORRED);
DRAWSL(ISLASTBAR,低,0,-120,0,COLORGREEN);
DRAWSL(ISLASTBAR,第一目标,0,-120,0,COLORYELLOW);
DRAWSL(ISLASTBAR,第二目标,0,-120,0,COLORYELLOW);
DRAWNUMBER(ISLASTBAR,高,高,0,COLORRED),ALIGN0;
DRAWNUMBER(ISLASTBAR,低,低,0,COLORGREEN),ALIGN0;
DRAWNUMBER(ISLASTBAR,第一目标,第一目标,0,COLORYELLOW),ALIGN0;
DRAWNUMBER(ISLASTBAR,第二目标,第二目标,0,COLORYELLOW),ALIGN0;