黃金分割
P1:=(CROSS(MA(CLOSE,3),MA(CLOSE,13)) and MA(CLOSE,13)>REF(MA(CLOSE,13),1));
啟動成本:=REF(LOW,P1),COLORMAGENTA;
VAR1:=LLV(LOW,0);
VAR2:=HHV(HIGH,0);
VAR3:=VAR2-VAR1;
低:= VAR1;
H1:= VAR3*0.191+VAR1;
H2:= VAR3*0.382+VAR1;
H3:= VAR3*0.5+VAR1;
H4:= VAR3*0.618+VAR1;
H5:= VAR3*0.809+VAR1;
高:= VAR2;
頂點:REFDATE(高,DATE),COLORWHITE,LINETHICK1;
%19.8:REFDATE(H1,DATE),COLOR00F662,LINETHICK1;
%38.2:REFDATE(H2,DATE),COLORRED,LINETHICK1;
%50:REFDATE(H3,DATE),,COLORBLUE,LINETHICK1;
%61.8:REFDATE(H4,DATE),,COLORRED,LINETHICK1;
%80.9:REFDATE(H5,DATE),,COLOR00F662,LINETHICK1;
低點:REFDATE(低,DATE),COLORWHITE,LINETHICK1;
DRAWTEXT(ISLASTBAR,頂點,'頂點'),COLORRED;
DRAWTEXT(ISLASTBAR,%19.8,'%19.8'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,%38.2,'%38.2'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%50,'%50'),COLORRED;
DRAWTEXT(ISLASTBAR,%61.8,'%61.8'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%80.9,'%80.9'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低點,'低點'),COLORWHITE;
選股源碼:
選股指標(biāo)
P1:=(CROSS(MA(CLOSE,3),MA(CLOSE,13))&&MA(CLOSE,13)>REF(MA(CLOSE,13),1));
啟動成本:=REF(LOW,P1),COLORMAGENTA;
VAR1:=LLV(LOW,0);
VAR2:=HHV(HIGH,0);
VAR3:=VAR2-VAR1;
低:= VAR1;
H1:= VAR3*0.191+VAR1;
H2:= VAR3*0.382+VAR1;
H3:= VAR3*0.5+VAR1;
H4:= VAR3*0.618+VAR1;
%61.8:=REFDATE(H4,DATE),COLOR00C5FF;
XG:C<%61.8;
最后這個兩句你可以調(diào)整
%61.8:=REFDATE(H4,DATE),COLOR00C5FF;
XG:C<%61.8;