x1:=(O+H+L+3*C)/6; x2:=(x1+7*(o+C+l+h)/2)/15; x3 :=EMA(x1,13)-EMA(x1,21); x4 :=EMA(x3,3); x5 :=EMA(x3,10); x6:=EMA(x2,7)-EMA(x2,21); x7:=EMA((0.668*REF(x6,1)+0.333*x6),1); Q1:=EMA(C,12)-EMA(C,26);{macd} Q2:=EMA(Q1,9); Q3:=Q1-Q2; B1:=EMA(C,5)-EMA(C,13); B2:=EMA(B1,3); B3:=B1-B2; B4:=Q1>0 and B3>0;{中线处于强势中的调整,短线强势} B5:=B1>0 AND Q3>0 AND B3>0;{中短线强势,短线处于强势中的强势} B6:=Q1>REF(Q1,1)AND B1>REF(B1,1)AND Q2>REF(Q2,1)AND B2>REF(B2,1);{四线同时向上} B7:=Q3>0 AND B3>0; B8:=B4 OR B5 OR B6 AND B7; 短关注:STICKLINE(B3>0 and Q1-Q2<0,10*B3,0,5,1),colorWHITE; explain(B3>0 and Q1-Q2<0,'短关注'),colorwhite; stickline(B3>0 and Q1-Q2<0,-0.1,-0.2,5,0),colorwhite; 买区:STICKLINE(B8,10*B3,0,5,1),Colorred; stickline(b8,-0.25,-0.35,5,0),colorred; explain(b8,'买区'),colorred; 短加速:STICKLINE(cross(B1,0),10*B3,0,5,0),COLORFF9966; 中加速:STICKLINE(cross(Q1,0),10*Q3,0,5,0),COLOR0099ff; stickline(cross(B1,0),-0.38,-0.48,5,0),colorff9966; stickline(cross(Q1,0),-0.5,-0.6,5,0),color0099ff; 强势:STICKLINE(Q3>0 and Q1>0,10*Q3,0,5,1),Color6268FF;{中线强势中的强势} stickline(Q3>0 and Q1>0,-0.62,-0.72,5,0),color6268ff; 弱强:STICKLINE(Q3>0 and Q1<0,10*Q3,0,5,1),ColorB2A8FF;{中线弱势中的强势} stickline(Q3>0 and Q1<0,-0.75,-0.85,5,0),colorb2a8ff; 减仓:STICKLINE(B3>0 and Q1>0 and B3<ref(B3,1),10*B3,0,5,1),Colorgreen; stickline(B3>0 and Q1>0 and B3<ref(B3,1),-0.88,-0.98,5,0),colorgreen; 做多:intpart(IF(x6>=x7,x6+0.018,x7)*4000)/1000,Color0098FF; 做空:intpart(IF(x7-x6,x7,x6)*4000)/1000,COLORGREEn; partline(做空>ref(做空,1),做空),colorred,linethick2; partline(做多>做空,做多),linethick2,Color0098FF; 涨:intpart(IF(x4>=x5,x4+0.011,x5)*4000)/1000,COLORwhite; 跌:intpart(IF(x5-x4,x5,x4)*4000)/1000,Colorcyan; partline(涨>跌,涨),linethick2,COLORwhite; partline(跌>ref(跌,1),跌),linethick2,coloryellow; 涨跌方向:=(涨>ref(涨,1) and 跌>ref(跌,1)) or 涨>跌; 滤网:=close>ref(high,1) and close>open; 提示一:=filter(做多>做空 and count(做多=做空,3)>=1and 滤网 and (做多<0 or 做空<0),1) ; 提示二:=filter(count(ref(涨>跌,1)=0,3)>=1 and 涨>跌 and 做多>做空 and 滤网,1); 提示:提示一 or 提示二,COLORMAGENTA,linethick2; drawicon(做多>做空 and ref(做多=做空,1)=1,做空,1); EXPLAIN(cross(B1,0),'短加速信号'),COLORFF9966; EXPLAIN(cross(q1,0),'中加速信号'),COLOR0099ff; explain(Q3>0 and Q1>0,'中线强势中的强势'),color6268ff; explain(Q3>0 and Q1<0,'中线弱势中的强势'),colorb2a8ff; explain(B3>0 and Q1>0 and B3<ref(B3,1),'减仓'),colorgreen; {费氏数} yt:=0.25*MA(CLOSE,3); cj:=0.58*REF(MA(CLOSE,31),1); vma:=yt+cj; 费氏数:=ZIG(3,10)>REF(ZIG(3,10),1); 成立距今:=BARSLAST(费氏数=1); DRAWTEXT(成立距今=5,0,'5'),COLORcyan; DRAWTEXT(成立距今=8,0,'8'),COLOR99ffff; DRAWTEXT(成立距今=13,0,'13'),COLOR99ffff; DRAWTEXT(成立距今=21,0,'21'),COLOR99ffff; DRAWTEXT(成立距今=34,0,'34'),COLOR99ffff; DRAWTEXT(成立距今=55,0,'55'),COLOR99ffff; DRAWTEXT(成立距今=89,0,'89'),COLOR99ffff; DRAWTEXT(成立距今=144,0,'144'),COLOR99ffff; DRAWTEXT(成立距今=233,0,'233'),COLOR99ffff; DRAWTEXT(成立距今=377,0,'377'),COLOR99ffff; DRAWTEXT(成立距今=610,0,'610'),COLOR99ffff; |