趋势:MA(MA(CLOSE,3),3),COLOR00DD00;
持股:IF(C>趋势,趋势,DRAWNULL),COLORDD00DD;
N:=25;
AA:=50;
BB:=3;
高1:=REF(HHV(H,AA),BB);
低1:=REF(LLV(L,AA),BB);
DRAWBAND(REFDATE(低1,DATE),RGB(0,20,125),LLV(L,AA),RGB(50,10,100));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORFFFF00;
一:REFDATE(H1,DATE),DOTLINE,COLORYELLOW;
二:REFDATE(H2,DATE),DOTLINE,COLORMAGENTA;
三:REFDATE(H3,DATE),DOTLINE,COLOR00FFFF;
四:REFDATE(H4,DATE),DOTLINE,COLORMAGENTA;
五:REFDATE(H5,DATE),DOTLINE,COLORYELLOW;
低:REFDATE(低1,DATE),COLOR00FF00;
TT3:=(CURRBARSCOUNT=5);
TT4:=(CURRBARSCOUNT=1);
DRAWNUMBER(TT3 AND 顶,顶,顶),COLOR999900;
DRAWTEXT(TT4 AND 顶,顶,'顶'),COLOR208FFF;
DRAWNUMBER(TT3 AND 五,五,五),COLOR999999;
DRAWTEXT(TT4 AND 五,五,'0.191'),COLOR208FFF;
DRAWNUMBER(TT3 AND 低,低*1.01,低),COLOR999900;
DRAWTEXT(TT4 AND 低,低*1.009,'底'),COLOR208FFF;