{主图趋势}
X_84:=MA(MA(CLOSE,3),1);
轨道:MA(MA(CLOSE,3),3),COLORBLUE,LINETHICK2;
NOTEXT_升:IF(X_84>=轨道,轨道,DRAWNULL),COLORYELLOW,LINETHICK2;
HJ_1:=IF(DATE<999999999,1,DRAWNULL);
主趋势线:EMA(EMA(CLOSE,10),10)*HJ_1,COLORRED,LINETHICK2;
HJ_2:=IF(DATETODAY(DATE)<999999999,1,DRAWNULL);
HJ_3:=主趋势线>REF(主趋势线,1)*HJ_1;
IF(HJ_3-1,主趋势线,DRAWNULL)*HJ_1,COLORGREEN,LINETHICK2;
HJ_4:=EMA(CLOSE,5)>EMA(CLOSE,21)*HJ_2;
HJ_5:=EMA(CLOSE,5)<EMA(CLOSE,21)*HJ_2;
HJ_6:=EMA(CLOSE,5)>EMA(CLOSE,10)*HJ_2;
HJ_7:=EMA(CLOSE,5)<EMA(CLOSE,10)*HJ_1;
HJ_8:=CLOSE<OPEN;
STICKLINE(HJ_4,HIGH,LOW,0,0),COLORRED;
STICKLINE(HJ_4,OPEN,CLOSE,2,5),COLORRED;{3}
STICKLINE(HJ_4 AND HJ_8,OPEN,CLOSE,2,5),COLORRED;{3}
STICKLINE(HJ_5,HIGH,LOW,0,0),COLORGREEN;
STICKLINE(HJ_5,OPEN,CLOSE,3,1),COLORGREEN;
STICKLINE(HJ_5 AND HJ_8,OPEN,CLOSE,2,0),COLORGREEN;{3}
STICKLINE(HJ_5 AND HJ_6,HIGH,LOW,0,1),COLORWHITE;
STICKLINE(HJ_5 AND HJ_6,OPEN,CLOSE,3,1),COLORWHITE;
STICKLINE(HJ_5 AND HJ_6 AND HJ_8,OPEN,CLOSE,3,0),COLORWHITE;
STICKLINE(HJ_4 AND HJ_7,HIGH,LOW,0,0),COLORWHITE;
STICKLINE(HJ_4 AND HJ_7,OPEN,CLOSE,3,1),COLORWHITE;
STICKLINE(HJ_4 AND HJ_7 AND HJ_8,OPEN,CLOSE,3,0),COLORWHITE;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
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),COLORGREEN,LINETHICK2;
DRAWICON(C<MA(C,250) AND C>MA(C,10) AND REF(C,1)<REF(O,1)*0.97 AND C/O>1.03 AND V/CAPITAL>0.03,L*0.97,9);
DRAWICON(CROSS(轨道,主趋势线),主趋势线,4);
DRAWICON(CROSS(C,顶),顶,9);