BS主图
variable:a1=0;
c1:=INTPART(cyc(5)*100*0.96)/100;
a2:=intpart(ref(cyc(5),1)*100)/100;
a3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
a40:=intpart(maxcyc*100)/100;
a41:=intpart(ref(MAXCYC,1)*100)/100;
a4:=a1=0 and c>a2 or (ref(vol/100,1)<vv and c>intpart(a2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
a5:=a1=1 and c<min(a3,a41);
a1:=if(a4=1,1,if(a5=1,0,ref(a1,1)));
STICKLINE(a1=1 and c<o,c,o,8,1),color5454ff,layer0;
STICKLINE(a1=1 and c<o,c,o,6,0),colorffff54;
STICKLINE(a1=1 and c<o,c,l,0.5,0),color5454ff;
STICKLINE(a1=1 and c<o,h,o,0.5,0),color5454ff;
STICKLINE(a1=0 and c>o,c,o,8,1),colorffff54;
STICKLINE(a1=0 and c>o,c,h,0.5,0),colorffff54;
STICKLINE(a1=0 and c>o,l,o,0.5,0),colorffff54;
DRAWTEXT(cross(a1,0),l*0.9,'B'),coloryellow,LINETHICK3;
DRAWTEXT(cross(1,a1),h*1.05,'S'),COLORgreen,LINETHICK3;
DRAWFLAGTEXT(a1=0 and (c1*0.98-c)/c>0.1,c,'持币');
DRAWFLAGTEXT(a1=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(a1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)>=vv,c,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(a1=1 and (c-min(c1,a40))/min(c1,a40)>0.1 ,c,'持股');
DRAWFLAGTEXT(a1=1 and (c-min(c1,a40))/min(c1,a40)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,a40))+'卖出');
MA5:MA(CLOSE,5),colorwhite;
MA10:MA(CLOSE,10),coloryellow;
MA20:MA(CLOSE,20),COLORFF00FF;
MA30:MA(CLOSE,30),colorgreen;
ma60:ma(close,60),colorred;
ma120:ma(close,120),colorblue;
ma250:ma(close,250),colorcyan;
获利比例:=(WINNER(C)*1000)/10;
平均成本:=(COST(50)*100)/100;
穿透力:=(winner(C)-winner(ref(C,1)))/v*capital;
90%成本:=FLOOR(COST(50-90/2)*100)/100;
~:=CEILING(COST(50+90/2)*100)/100;
90集中度:=INTPART((~-90%成本)/(~+90%成本)*1000)/10;
70%成本:=FLOOR(COST(50-70/2)*100)/100;
~~:=CEILING(COST(50+70/2)*100)/100;
70集中度:=INTPART((~~-70%成本)/(~~+70%成本)*1000)/10;
DRAWTEXTABS(0,6,' 获利比例:'+STR(获利比例)),COLOR44bbff;
DRAWTEXTABS(0,18,' 平均成本:'+STR(平均成本)),COLOR44bbff;
DRAWTEXTABS(0,30,' 穿透力:'+STR(穿透力)),COLOR44bbff;
DRAWTEXTABS(0,42,'90%成本:'+STR(90%成本)+'-'+STR(~)),COLOR44bbff;
DRAWTEXTABS(0,54,'90集中度:'+STR(90集中度)),COLOR44bbff;
DRAWTEXTABS(0,66,'70%成本:'+STR(70%成本)+'-'+STR(~~)),COLOR44bbff;
DRAWTEXTABS(0,78,'70集中度:'+STR(70集中度)),COLOR44bbff; |