{工作线}
A0:=(L+H+C*2)/4;
工作线:EMA(A0,14),LINETHICK2,COLORRED;
A2:=EMA(A0,25);
A1X:=(工作线-REF(工作线,1))/REF(工作线,1)*100;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100;
PARTLINE(工作线,A1X<0 AND A2X<0),LINETHICK2,COLORGREEN;
PARTLINE(工作线,A1X>=0),LINETHICK2,COLORRED;
PARTLINE(工作线,A1X<0),LINETHICK2,COLORGREEN;
{元旦主图}
Q6:=atan((MA(C,5)/ref(MA(C,5),1)-1)*100)*57.3;Q2:=atan((MA(C,13)/ref(MA(C,13),1)-1)*100)*57.3;
Q1:=atan((MA(C,23)/ref(MA(C,23),1)-1)*100)*57.3;Q:=atan((MA(C,34)/ref(MA(C,34),1)-1)*100)*57.3;
Q3:=atan((MA(C,68)/ref(MA(C,68),1)-1)*100)*57.3;Q5:=atan((MA(C,250)/ref(MA(C,250),1)-1)*100)*57.3;
DRAWTEXTREL(0,150,'5 日线夹角: '+NUMTOSTRN(Q6,2)+' 度'),COLORred;
DRAWTEXTREL(220,150,'13日线夹角: '+NUMTOSTRN(Q2,2)+' 度'),COLOR00DDEE;
DRAWTEXTREL(450,150,'22日线夹角: '+NUMTOSTRN(Q1,2)+' 度'),COLOREE00EE;
DRAWTEXTREL(0,200,'34日线夹角: '+NUMTOSTRN(Q,2)+' 度'),COLOR00EE00;
DRAWTEXTREL(220,200,'68日线夹角: '+NUMTOSTRN(Q3,2)+' 度'),COLOREEDD00;
DRAWTEXTREL(450,200,'250日线夹角: '+NUMTOSTRN(Q5,2)+' 度'),COLORFF8800;
DRAWTEXTREL(20,50,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+' 家'),COLOR0066FF;
DRAWTEXTREL(180,50,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+' 家'),COLOR99FF99;
DRAWTEXTREL(340,50,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)+' 家'),COLOREEEEEE;
DRAWTEXTREL(20,100,STKLABEL+' '+STKNAME+' '+STRLEFT(BKNAME,40)),ColorFFB060;
{LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.01),'RSI'),Colorred;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
DRAWTEXT(HIGH>=REF(CLOSE,1)*1.095,HIGH,'涨停'),COLORMAGENTA;
STICKLINE(V/REF(V,1)>2,OPEN,CLOSE,3,0),COLORGREEN;
DRAWTEXT(REF(CLOSE,1)>=LOW*1.095,LOW,'跌停'),COLORblue;}
压力线: EMA(COST(27),120), CIRCLEDOT,COLORF0F000;
中期临界线: DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),POINTDOT,COLORred;
STICKLINE(L>REF(H,1),L,REF(H,1),50,1001),Color408080;
STICKLINE(REF(L,1)>H,ref(L,1),H,50,1001),Color808040;
DRAWTEXT(L>REF(H,1),REF(H,1),NUMTOSTRN(REF(H,1),2)+'-'+NUMTOSTRN(L,2)),Color408080;
DRAWTEXT(REF(L,1)>H,REF(L,1),NUMTOSTRN(ref(l,1),2)+'-'+NUMTOSTRN(h,2)),VALIGN2,Color808040;
{融轨道}
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AA*102/100;
通2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CROSSDOT,COLOR0099FF;
下:(1-7/100)*DD,CROSSDOT,COLOR0099FF;
中:(上+下)/2,LINETHICK1,COLOR0099FF;
夹角:ATAN((中/REF(中,1)-1)*100)*180/3.1416,LINETHICK0 ,COLORred;
顶:(1+14/100)*DD,LINETHICK2,COLORWHITE;
底:(1-14/100)*DD,LINETHICK2,COLORBLUE;
A := DISPSTATUS=2;
DRAWTEXT(A AND 上,上,NUMTOSTRN(上,2)),ColorEA91B5;
DRAWTEXT(A AND 中,中,NUMTOSTRN(中,2)),ColorEA91B5;
DRAWTEXT(A AND 下,下,NUMTOSTRN(下,2)),ColorEA91B5;
DRAWTEXT(A AND 顶,顶,NUMTOSTRN(顶,2)),ColorEA91B5;
DRAWTEXT(A AND 底,底,NUMTOSTRN(底,2)),ColorEA91B5;
{MACD主升}
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);
DEA := EMA(DIFF,9);
MACD := 2*(DIFF-DEA);
PARTLINE(中,DIFF<=0 OR MACD<=0),LINETHICK1,COLORGREEN;
PARTLINE(中,DIFF>0 and MACD>0),LINETHICK1,COLORRED;
N:=60;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K值:=SMA(RSV,3,1);
DD:=C=LLV(C,N);{60日最低点}
DDSJ:=BARSLAST(REF(DD,1));{上一低点时间}
DDGJ:=REF(CLOSE,DDSJ+1)>CLOSE;{股价趋势}
KDZB:=REF(K值,DDSJ+1)<K值;{KDJ.K指标趋势}
K底背离:=DDGJ AND KDZB{ AND K超卖};
DRAWTEXT(FILTER(K底背离>0,5),L*0.98,'K底'),COLORff00ff;{KDJ底背离}
GD:=C=HHV(C,N);{60日最高点}
GDSJ:=BARSLAST(REF(GD,1));{上一高点时间}
GDGJ:=REF(CLOSE,GDSJ+1)<CLOSE;{股价趋势}
KGZB:=REF(K值,GDSJ+1)>K值;
K顶背离:=GDGJ AND KGZB;
MACD:="MACD.MACD";
MDZB:=REF(MACD,DDSJ+1)<MACD;{MACD指标趋势}
M底背离:=DDGJ AND MDZB;
MGZB:=REF(MACD,GDSJ+1)>MACD;
M顶背离:=GDGJ AND MGZB;
RSI:="RSI.RSI1";
RDZB:=REF(RSI,DDSJ+1)<RSI;{RSI指标趋势}
R底背离:=DDGJ AND RDZB;
RGZB:=REF(RSI,GDSJ+1)>RSI;
R顶背离:=GDGJ AND RGZB;
TYP:=(HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));
CDZB:=REF(CCI,DDSJ+1)<CCI;{CCI指标趋势}
C底背离:=DDGJ AND CDZB;
CGZB:=REF(CCI,GDSJ+1)>CCI;
C顶背离:=GDGJ AND CGZB;
BIAS:="BIAS.BIAS1";
BDZB:=REF(BIAS,DDSJ+1)<BIAS;{BIAS指标趋势}
BIAS底背离:=DDGJ AND BDZB;
BGZB:=REF(BIAS,GDSJ+1)>BIAS;
BIAS顶背离:=GDGJ AND BGZB;
DRAWTEXT(FILTER(M底背离>0,5),L*0.94,'M底'),COLOR0055ff;{MACD底背离}
DRAWTEXT(FILTER(R底背离>0,5),L*0.96,'R底'),COLORyellow;{RSI底背离}
DRAWTEXT(FILTER(C底背离>0,5),L*0.92,'C底'),COLORf0f000;{CCI底背离}
DRAWTEXT(FILTER(BIAS底背离>0,5),L*0.9,'B底'),COLOR00ff00;{BIAS底背离}
DRAWTEXT(FILTER(M顶背离>0,5),H*1.03,'M顶'),COLORyellow;{MACD顶背离}
DRAWTEXT(FILTER(K顶背离>0,5),H*1.05,'K顶'),COLORf0f000;{KDJ顶背离}
DRAWTEXT(FILTER(R顶背离>0,5),H*1.01,'R顶'),COLOR00ff00;{RSI顶背离}
DRAWTEXT(FILTER(C顶背离>0,5),H*1.07,'C顶'),COLOR0055ff;{CCI顶背离}
DRAWTEXT(FILTER(BIAS顶背离>0,5),H*1.09,'B顶'),COLORff00ff;{BIAS顶背离};
202108211203.jpg
|