日:=150;昨前:=3;
{世民黄金波段主图}
{黄金分割加提示中线买点}
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H10:=高1-(高1-低1)*0.191;
H20:=高1-(高1-低1)*0.382;
H30:=高1-(高1-低1)*0.5;
H40:=高1-(高1-低1)*0.618;
H50:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORGREEN,CROSSDOT,LINETHICK2;
一0.191:REFDATE(H10,DATE),COLORCYAN;
二0.382:REFDATE(H20,DATE),COLORYELLOW;
三0.5:REFDATE(H30,DATE),COLORRED;
四0.618:REFDATE(H40,DATE),COLORYELLOW;
五0.809:REFDATE(H50,DATE),COLORGREEN;
低:REFDATE(低1,DATE),COLORRED,CROSSDOT,LINETHICK2;
AM3:=IF(PERIOD=4,4,1/5);
AM4:=IF(PERIOD=10,1/10,AM3);
AM5:=IF(PERIOD=5,1,AM4);
AM6:=IF(PERIOD=6,1/20,AM5);
AM7:=IF(PERIOD=7,1/30,AM6);
DIF:=EMA(CLOSE,AM7*60)-EMA(CLOSE,AM7*260);
DEA:=EMA(DIF,AM7*90),COLORYELLOW;
DRAWTEXT(CROSS(DIF,DEA),L*0.98,'██买'),COLOR0000FF;