买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B:=crOSS(买线,卖线);
S:=CROSS(卖线,买线);
AA:EMA(EMA(EMA(EMA(CLOSE,7),7),7),7),LINETHICK2,colorFF;
AAA:=1;
PARTLINE(AA>=REF(AA,1) AND AAA=1,AA),LINETHICK3,colorFF;
PARTLINE(AA<REF(AA,1) AND AAA=1,AA),LINETHICK3,colorFF00;
DD:EMA(EMA(EMA(EMA(EMA(EMA(EMA(CLOSE,133),7),7),7),7),7),7),LINETHICK2,colorFF00FF;
EE:EMA(EMA(EMA(EMA(EMA(EMA(EMA(EMA(CLOSE,256),7),7),7),7),7),7),7),LINETHICK2,colorFFFF;
TRS:=MAX(MAX(HIGH-LOW,Abs(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TRS,13);
VAR21:=REF(CLOSE,1)-REF(ATR,1);
GG:HHV(VAR21,13),LINETHICK2,colorFF8010;
HH:MA(CLOSE,12),colorFF00;
BB:EMA(EMA(EMA(EMA(EMA(CLOSE,30),7),7),7),7),LINETHICK2,colorFFFFFF;
CC:EMA(EMA(EMA(EMA(EMA(EMA(CLOSE,62),7),7),7),7),7),LINETHICK2,colorFF0000;
FF:=CROSS(CLOSE,BB) AND B;
DRAWTEXT(FF,LOW,'▲'),colorFFFF;
VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
VAR3:=(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210;
VAR4:=MA(VAR3,13);
VAR5:=EMA(MA(CLOSE,3),34);
VAR6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
VAR7:=MA(VAR6,5);
VAR8:=MA(VAR6,10);
DRAWTEXT(REF(CROSS(VAR3,VAR4),2) AND VAR3>1.005*VAR4,VAR4,'买'),colorFFFFFF;
DRAWTEXT(CROSS(VAR6,VAR7) AND VAR7<VAR8,VAR3*0.95,'转'),colorFFFF;
DRAWTEXT(CROSS(VAR7,VAR6) AND VAR7>VAR8,VAR3*1.05,'卖'),colorFFFFFF;
P:=SYSPARAM(1);