在顺势交易主图基础上拼凑的主图,希望大家继续改进打造最强主图
variable:p1=0;
c1:=INTPART(cyc(5)*100*0.96)/100;
p2:=intpart(ref(cyc(5),1)*100)/100;
p3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
p40:=intpart(maxcyc*100)/100;
p41:=intpart(ref(MAXCYC,1)*100)/100;
p4:=p1=0 and c>p2 or (ref(vol/100,1)<vv and c>intpart(p2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
p5:=p1=1 and c<min(p3,p41);
p1:=if(p4=1,1,if(p5=1,0,ref(p1,1)));
STICKLINE(p1=1 and c<o,c,o,8,1),color5454ff,layer0;
STICKLINE(p1=1 and c<o,c,o,6,0),colorffff54;
STICKLINE(p1=1 and c<o,c,l,0.5,0),color5454ff;
STICKLINE(p1=1 and c<o,h,o,0.5,0),color5454ff;
STICKLINE(p1=0 and c>o,c,o,8,1),colorffff54;
STICKLINE(p1=0 and c>o,c,h,0.5,0),colorffff54;
STICKLINE(p1=0 and c>o,l,o,0.5,0),colorffff54;
DRAWTEXT(cross(p1,0),l*0.9,'B'),coloryellow,LINETHICK3;
DRAWTEXT(cross(1,p1),h*1.05,'S'),COLORgreen,LINETHICK3;
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c>0.1,c,'持币');
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)<vv,c,'明日收盘价超过'+str(c1)+';或收盘价超过'+str(intpart(c1*0.98*100)/100)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)>=vv,c,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)>0.1 ,c,'持股');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,p40))+'卖出');;
N:=2;
K1:=HHV(H,N);
K2:=LLV(L,N);
FC:=CLOSE;
A:=BARSLAST(FC>REF(K1,1));
B:=BARSLAST(FC<REF(K2,1));
JR:=IF(A>B,K1,K2);
多空分界:IF(C>JR,JR*0.998,JR*1.002),COLORyellow,linethick1;
A:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
A0:=(AH-AL)/40;
B1:=L-A0;
STICKLINE((A+0)/34=FLOOR((A+0)/34),B1,B1-1.5*A0,3,0),COLORF00FF0;
DRAWTEXT((A+0)/34=FLOOR((A+0)/34),B1-1*A0,'时窗'),COLORWHITE;
生命线:EMA(((SLOPE(CLOSE,22) * 23) + CLOSE),50),COLORYELLOW,LINETHICK2;
PARTLINE(生命线,(C>生命线)),LINETHICK2,COLORred;
PARTLINE(生命线,(C<生命线)),LINETHICK2,COLORgreen;
VAR1:=(EMA(CLOSE,55) * 0.75);
VAR2:=MA(CLOSE,5);
VAR3:=MA(CLOSE,30);
VAR4:=MA(CLOSE,20);
VAR5:=MA(CLOSE,60);
VAR6:=CROSS(VAR4,VAR5);
VAR7:=CROSS(VAR2,VAR3);
强势:DRAWTEXT((VAR2 > VAR3),VAR3,'+'),COLORRED;
弱势:DRAWTEXT((VAR2 <= VAR3),VAR3,'-'),COLORGREEN;
Var1:=AMOUNT/VOL/100;
ZBT1:=(LOW > REF(HIGH,1));
ZBT2:=(HIGH < REF(LOW,1));
DRAWTEXT(ZBT1,(LOW )*0.98,'缺口'),COLORyellow;
DRAWTEXT(ZBT2,(HIGH*1.025 ),'缺口'),COLORyellow;
黄金卖点:EMA(c+(h-l)*0.618,3),coloryellow,LINETHICK0,POINTDOT;
黄金买点:EMA((o+h+l)/3,4),colorwhite,LINETHICK0,POINTDOT;
DRAWTEXTREL(750,20,'黄金卖点:'+NUMTOSTRN(黄金卖点,2 )),LINETHICK2,coloryellow;
DRAWTEXTREL(650,20,'黄金买点:'+NUMTOSTRN(黄金买点,2 )),LINETHICK2,colorwhite;
nnl:=DISPSTATUS=2;
DRAWTEXT(nnl,黄金卖点,'---S'),ALIGN0,Colorgreen;
DRAWTEXT(nnl,黄金买点,'---B'),ALIGN0,Coloryellow;
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)>C AND
REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)<"KDJ.K" AND
CROSS("KDJ.K","KDJ.D"),L-0.10,'◎K'),COLORFF00FF;{KDJ底背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)>C AND
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)
<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")
>0,L-0.18,'◆R'),COLORFF00FF;{RSI底背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)<C
AND REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)
>"KDJ.K" AND CROSS("KDJ.D","KDJ.K")>0,H+0.08,'◎K'),COLORGREEN;{KDJ顶背离};
DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)<C AND
REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1))+1)>"RSI.RSI1"
AND CROSS("RSI.RSI2","RSI.RSI1")>0,H+0.04,'◆R'),COLORGREEN;{RSI顶背离};
四线密集:((ma(c,5)-ma(c,30))/ma(c,5))*100,LINETHICK0,colorred;
{涨停}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,8,0),COLOR00FFFF;
{跌停}
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,8,0),COLORBLUE;
股本:=FINANCE2(35)/10000;
流通:=FINANCE2(37)/10000;
占:=流通/股本*100;
市盈:=DYNAINFO(39);
市净:=c/FINANCE2(4);
净资产:=FINANCE2(4);
新收益:=FINANCE2(3);
DRAWTEXTABS(1,14,'股本:'+股本+'亿。' ),LINETHICK1,Coloryellow;
DRAWTEXTABS(80,14,'流通:'+流通+'亿'),LINETHICK1,Color00FF00;
DRAWTEXTABS(150,14,'占:'+占+'% '),LINETHICK1,Color00FF00;
DRAWTEXTABS(220,14,'新收益:'+新收益+'元 '),LINETHICK1,COLORyellow;
DRAWTEXTABS(310,14,'市盈:'+市盈+' '),LINETHICK1,Colorred;
DRAWTEXTABS(390,14,'净资产:'+净资产+'元 '),LINETHICK1,ColorFFFF07;
BEGIN DRAWTEXTREL(1,10,'所属板块:'+BKNAME),LINETHICK1,COLORyellow;end;
|