{背景长线}
UR:=10;LR:=10;
TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
A:=EMA((LOW+CLOSE+OPEN)/3,28);
B:=REF(EMA((LOW+CLOSE+OPEN)/3,28),1);
N:=IF(BARSCOUNT(C)>=45,45,BARSCOUNT(C)); 上线:=SMA(C,6.5,1); {背景中线} JJ:=(CLOSE+HIGH+LOW)/3; A0:=(L+H+C*2)/4; AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF (YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 AND MONTH<10,REF(AF,1),0)),0); STICKLINE(A1>B1 OR AA10>AA12 OR A1X>=0 OR AF>BF ,UPPER,LOWER,4.2,0),COLORADEAEA; DRAWKLINE(H,O,L,C); {1}{ {提示点} 多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
D:=C>=MA(C,N);
E:=C
下线:=SMA(C,13.5,1);
上线1:=SMA(C,3,1);
下线1:=SMA(C,8,1);
{}
STICKLINE( A>B OR D>0 OR 上线>下线,UPPER*1.01,LOWER*0.99,4.2,0),COLORADEAEA;
STICKLINE( A0 OR 下线>上线,UPPER*1.01,LOWER*0.99,4.2,0),COLORA8A8A8;
AA10:=MA(CLOSE,8);
AA12:=MA(CLOSE,12);
BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);
BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);
A1:=EMA(JJ,10);
B1:=REF(A1,1);
A111:=EMA(A0,14),LINETHICK2;
A211:=EMA(A0,25),LINETHICK2;
A1X:=(A111-REF(A111,1))/REF(A111,1)*100,NODRAW;
A2X:=(A211-REF(A211,1))/REF(A211,1)*100,NODRAW;
看多:=IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL);
逃顶:=IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL);
{}
STICKLINE(A1
{
MA3:=MA(CLOSE,3);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLOR0000FF;
牵牛线:=MA(CLOSE,26),COLORFF00FF;
等待:=IF(MA3>辰星线,辰星线,MA3);
IF(等待>REF(等待,1),等待,DRAWNULL),LINETHICK2,COLOR0000FF;
IF(辰星线>REF(辰星线,1),辰星线,DRAWNULL),LINETHICK2,COLOR0000FF;}
AA05:MA(C,5),LINETHICK3,COLOR00CCFF;
五日乖离率:=(C-AA05)/AA05*100;
BB051:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB051>30 AND AA05>REF(AA05,1), AA05,DRAWNULL),LINETHICK3,COLORRED;
AA101:=MA(C,10);AA20:=MA(C,20);
BB101:=ATAN((AA101/REF(AA101,1)-1)*100)*180/3.1416;
IF(BB051<0 AND AA05
{};
{1}
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
短线:=VAR1,COLORWHITE;
中线:=VAR6,COLORYELLOW;
DRAWBAND(短线,RGB(220,163,0),中线,RGB(0,0,220));
买线:=EMA(C,4);
卖线:=EMA(SLOPE(C,20)*10+C,35);
DRAWTEXT(CROSS(买线,卖线),LOW*0.98,'买'),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(卖线,买线),HIGH*1.02,'卖'),COLORGREEN;
{}
FF1:=EMA(CLOSE,3);
MA151:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF1,MA151),(LOW * 0.99),'上拐点'),COLOR00FFFF;
DRAWTEXT(CROSS(MA151,FF1),(HIGH * 1.02),'下拐点'),COLOR00FF00;
{}
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
卖:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖1'),COLORGREEN;
{}
{}
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
,3,1),2,1);
天线:=78.89;
DRAWTEXT(CROSS(天线,多方趋势),H*1.01,'逃顶'),COLOR00FF00;
{}
VAR51:=3;
VAR52:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
DRAWTEXT(CROSS(VAR52,VAR51), LOW,'←启动')COLORMAGENTA;