本人用分时主图波段趋势中做T+0:主要参考5日均线,17日均线,昨最低点,大盘指数,供参考.
当现价上穿5日均线后,有下面几种走势:1直接高开上涨,2低开缩量回探于5日均线,3低开缩量回探于17日均线,3缩量回探于5日均线,4缩量回探于5日均线.
源码公式:
1.步骤1引用指标,命名YY1-见附件2TXT文件
2.步骤2新建分时主图指标{可命名分时突破}-见附件2TXT文件
MA16:EMA(C,17),COLORFF0000,dotline,LINETHICK1;
{分时红绿柱}
{rcc:=DYNAINFO(3); s2:=sma(c,3,1); s6:=sma(c,5,1);
dk:=10*(s2-s6); kk:=IF(DATATYPE=8,0.95,1);
STICKLINE(dk>0,rcc*kk,rcc*kk+dk,0,1),COLORRED;
STICKLINE(dk<0,rcc*kk,rcc*kk+dk,0,1),COLORCYAN;}
{分时突破}
最高价:HHV(H,480),DOTLINE,COLORRED;
STICKLINE(FILTER(CROSS(C,REF(最高价,1)),10),C*0.99,C,8,0),COLORGREEN;
DRAWTEXT(FILTER(CROSS(C,REF(最高价,1)),10),C*0.99,'上突'),COLORYELLOW;
T:=BARSCOUNT(C);
TP:= FILTER( C>=HHV(H,T) AND V>MA(V,0)*2 AND DYNAINFO(17)>1 AND TIME0>39600 ,240) ;
DRAWTEXT(TP,L,'★突破'),COLORred;
VERTLINE( tp,1),COLORGREEN,LINETHICK2;
HHV(h,T),DOTLINE,Color00FFFF;
日MA5:"yy1.ma5#day",ColorFF00FF,LINETHICK2;
日MA10:"yy1.ma10#day",LINETHICK2;
{MA20:"yy1.ma20#day";
MA60:"yy1.ma60#day";}
前日最高:="yy1.HH#day";
前日最低:"yy1.LL#day",COLORGREEN,LINETHICK2;
DRAWTEXT(BARSTATUS=2,日MA5,' 日5线'),ColorFF00FF,PRECIS0;
DRAWTEXT(BARSTATUS=2,日MA10,' 日10线'),colorgray,PRECIS0;
DRAWTEXT(BARSTATUS=2,前日最低,' 前日最低'),COLORGREEN,PRECIS0;
a1:='sh000001';
a2:='sz399001';
a3:=STRTONUM(STRLEFT(STKLABEL,1));
昨收:=if(a3=6,hhv(STKINDI(a1,'大盘引用.昨收#day'),0),hhv(STKINDI(a2,'大盘引用.昨收#day'),0));
开盘:=if(a3=6,HHv(STKINDI(a1,'大盘引用.开盘#day'),0),HHv(STKINDI(a2,'大盘引用.开盘#day'),0));
收盘:=if(a3=6,if(time>093000,STKINDI(a1,'大盘引用.收盘#min1'),开盘),if(time>093000,STKINDI(a2,'大盘引用.收盘#min1'),开盘));
大盘涨幅:(收盘-昨收)/昨收*100,colorred,PRECIS2,LINETHICK0;
大盘线:收盘/昨收*DYNAINFO(3),colorffff00,PRECIS0,LINETHICK1;
if a3=6 then
DRAWTEXT(BARSTATUS=2,大盘线,' 上证'),Colorffff00,PRECIS0;
if a3<6 then
DRAWTEXT(BARSTATUS=2,大盘线,' 深证'),Colorffff00,PRECIS0;
{大盘红绿柱}
{A:=ema(c,3);B:=ema(c,9);md:=A-B;D:=DYNAINFO(3);
STICKLINE(md>0,d,d+md*2,3,0),COLORRED;
STICKLINE(md<0,d,d+md*2,3,0),COLOR00FF00;}
MA30:=EMA(CLOSE,30);
强弱界定:EMA(CLOSE,900);
STICKLINE((MA30>强弱界定),MA30,强弱界定,1,0),COLOR0000FF;
STICKLINE((MA30<强弱界定),MA30,强弱界定,1,0),COLOR00FF00;
{SJ:=IF(HOUR<12,(HOUR-9.5)*60+MINUTE,(HOUR-11)*60+MINUTE);
F:=DYNAINFO(3)*(1+(C/REF(C,MIN(SJ,5))-1)*1.5);
STICKLINE(F<DYNAINFO(3),DYNAINFO(3),F,0,0),COLORGREEN;
STICKLINE(F>DYNAINFO(3),DYNAINFO(3),F,0,0),COLORRED;};
partline(MA16,MA16>REF(MA16,1),rgb(0,0,255)),linethick2,LAYER0;
DRAWTEXTREL(1,10,'■所属板块:'+BKNAME),COLORRED{红色};
DRAWTEXTREL(1,60,'■流通盘 :'+CAPITAL/1000000+'亿{股}'),COLORYELLOW;
DRAWTEXTREL(1,110,'■流通市值:'+DYNAINFO(57)/100000000+'亿'),COLORYELLOW;
{DRAWTEXTREL(1,160,'■每股收益:'+FINANCE2(3)),COLORYELLOW;
DRAWTEXTREL(1,210,'■每股净资收益率:'+FINANCE2(5)),COLORYELLOW;
DRAWTEXTREL(1,260,'■每股现金流 :'+FINANCE2(6)),COLORYELLOW;
DRAWTEXTREL(1,310,'■主营收入:'+FINANCE2(27)),COLORYELLOW;
DRAWTEXTREL(1,360,'■利润增长:'+FINANCE2(10)+'%'),COLORYELLOW;};