短中线简缠主图,有解盘文字
操作符“多”:买线上穿卖线;操作符“空”:买线下穿卖线。买线:EMA(C,1);卖线:EMA(SLOPE(C,10)*10+C,20),即收盘价的10天的线性回归斜率乘以10加上收盘价的20天的指数移动平均数。
源码如下:
X_1:=EMA(CLOSE,5);
买线:=EMA(C,1);
卖线:=EMA(SLOPE(C,10)*10+C,20);
STICKLINE(C>=O,C,O,3,0),COLOR000045;
STICKLINE(C>=O,C,O,2,0),COLOR000085;
STICKLINE(C>=O,C,O,1,0),COLOR0000C5;
STICKLINE(C>=O,C,O,0.3,0),COLOR0000E5;
STICKLINE(C>=O,H,L,0,0),COLOR0000FF;{立体红颜色};
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORFFFF00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR000000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR6A6A00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORDDDD00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0),COLORFFFF00;{立体青色};
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+
4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)
AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)
AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和度:=IF(SAT>1,1,SAT)*100;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ1,0.88,0.00,0,'调整结束短线介入'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ2,0.88,0.04,0,'上升通道走势良好'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ3,0.88,0.08,0,'股价偏离注意调整'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ4,0.88,0.12,0,'上升通道调整洗盘'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ5,0.88,0.16,0,'转向特征注意离场'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ6,0.88,0.20,0,'通道改变坚决离场'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD1,0.88,0.24,0,'下跌通道只宜观望'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD2,0.88,0.28,0,'短期底部准备进入'),COLORYELLOW;
操作线20日:EMA(C,20),DOTLINE,COLOR0000FF;
红升:IF(操作线20日>REF(操作线20日,1),操作线20日,DRAWNULL),COLOR0000FF,LINETHICK3;
绿降:IF(操作线20日<REF(操作线20日,1),操作线20日,DRAWNULL),DOTLINE,COLOR00FF00;
趋势线:EXPMA(C,5),DOTLINE,COLORYELLOW;
蓝降:IF(趋势线<REF(趋势线,1),趋势线,DRAWNULL),DOTLINE,COLORBLUE;
KK1:=趋势线<REF(趋势线,1);
IF(KK1,趋势线,DRAWNULL),DOTLINE,COLORYELLOW;
DD1:=趋势线>REF(趋势线,1);
IF(DD1,趋势线,DRAWNULL),COLOR00FFFF,LINETHICK2;
A:=HHV(H,13)=H AND H>REF(H,1);
A1:=FILTER(A,12);
B:=LLV(L,13)=L AND L<REF(L,1);
B1:=FILTER(B,12);
TS1:=BARSLAST(A1);
压力:REF(HIGH,TS1),COLORWHITE,NODRAW;
STICKLINE(1,压力,压力,1.5,0),COLORAEAE00;
TS2:=BARSLAST(B1);
支撑:REF(LOW,TS2),COLORYELLOW,NODRAW;
STICKLINE(1,支撑,支撑,1.5,0),COLOR006DDB;
STICKLINE(1,支撑,支撑,1.5,0),COLOR005EBB;
空间:=100*(压力-支撑)/支撑;
卖空:=REF(压力,1)&&O<=压力&&C>压力;
DRAWICON(CROSS(买线,卖线),L,42);{小图标多}
DRAWICON(CROSS(卖线,买线),H,43);{小图标空}
{以下为大马路123添加}
EMA10:EMA(C,10),COLORWHITE;
{强弱界:EMA(CLOSE,20),COLORCYAN,LINETHICK3;
上升趋势:IF(EMA(CLOSE,20)>=REF(EMA(CLOSE,20),1),EMA(CLOSE,20),DRAWNULL),COLORYELLOW,LINETHICK3;}
EMA30:EMA(C,30),COLORMAGENTA;
EMA60:EMA(C,60),COLORCYAN;
EMA60平升:IF(EMA(CLOSE,60)>=REF(EMA(CLOSE,60),1),EMA(CLOSE,60),DRAWNULL),COLORYELLOW;
EMA120:EMA(C,120),COLORBLUE;
MAE250:EMA(C,250),COLOR00FF00;
EMA250升:IF(EMA(C,250)>=REF(EMA(C,250),1),EMA(C,250),DRAWNULL),COLORRED;
半分位:(REF(C,1)+REF(O,1))/2,COLORWHITE,DOTLINE;
STICKLINE(半分位,半分位,半分位,4,0),COLORWHITE;
DRAWNUMBER(ISLASTBAR ,C,C),COLORFF00FF;
202251221236033.png
|