N:=13;
M:=3;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=crOSS(买线,卖线);
SEL:=CROSS(卖线,买线);
{DRAWICON(BU,L-0.1,1);}
{DRAWICON(SEL,H+0.1,2);}
DRAWTEXT(BU,L-0.1,'▲B'),COLORRED;
DRAWTEXT(SEL,H+0.1,'◆S'),COLORGREEN;
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,1),COLORRED;
JC:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
参考价:=SMA(JC,5,1), CIRCLEDOT,COLORGREEN;
价:=IF(C>=参考价,参考价,参考价*0.98 ), CIRCLEDOT,COLOR0000FF;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(买线<卖线,CLOSE,OPEN,3,1),COLORGREEN;
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,日),昨前);
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;
VAR2:=CLOSE*vol;
MID:=EMA((expma(VAR2,3)/EXPMA(VOL,3)+EXPMA(VAR2,6)/EXPMA(VOL,6)+EXPMA(VAR2,12)/EXPMA(VOL,12)+EXPMA(VAR2,24)/EXPMA(VOL,24))/4,N);
主趋势线:MID;
MID2:=MID*1.01;
SDN:=MID*0.94;
SDN3:=REFDATE(CLOSE,1050609),COLORYELLOW;
SUP:=1.06*MID,COLORBLUE;
VAR4:=EXPMA(CLOSE,9);
B9:=COUNT(HIGH>SUP,5);
VAR1:=MID;
RSDN:IF(VAR1>REF(VAR1,1),VAR1,DRAWNULL),LINETHICK2,COLORRED;
GSDN:IF(VAR1<REF(VAR1,1),VAR1,DRAWNULL),LINETHICK2,COLORGREEN;