九毛八公式指标
公式模块:
把分时图的框框去掉,见图
{分时主图}
{引用 分时资金}
净流入:="分时资金.净流入(万)";
{忘了作者 动态阻力及支撑}
MA30:EMA(CLOSE,30),linethick0;
强弱:EMA(CLOSE,900),colorred,linethick1,layer0;
STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00DD00,linethick1,layer0;
支撑:L1+P1*0.5/8,COLOR00DD00,linethick1,layer0;
现价:CLOSE,COLORffffff,LINETHICK1;
支差:现价-支撑,linethick0;
阻差:现价-阻力,linethick0;
支差比:支差/MA30*100,linethick0;
阻差比:阻差/MA30*100,linethick0;
{显示画面}
{HH:=DYNAINFO(5);
LL:=DYNAINFO(6);}
{今天最新价与昨收价差}
今昨差:现价-DYNAINFO(3),linethick0;
今昨差比:今昨差/DYNAINFO(3)*100,linethick0;
{今天最高价与昨收价差}
高昨差:DYNAINFO(5)-DYNAINFO(3),linethick0;
高昨差比:高昨差/DYNAINFO(3)*100,linethick0;
STICKLINE(crOSS(支撑,现价),支撑,阻力,1,0),COLORffffff,linethick1,layer0;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*0.998,'低'),COLORgreen,linethick2,layer0;
DRAWTEXT(LONGCROSS(现价,阻力,2),现价*1.001,'高'),COLORffffff,linethick2,layer0;
DRAWTEXTABS(265,400,' 今日 昨日 最新价 昨 收'),COLORffffff,LINETHICK5;
DRAWTEXTABS(365,430,' 最高价'),COLORffffff,LINETHICK5;
DRAWTEXTABS(365,460,' 最低价'),COLORffffff,LINETHICK5;
DRAWTEXTABS(800,450,' '+NUMTOSTRN(C,2)+'元'),colorffffff,linethick5;
DRAWTEXTABS(550,430,' '+NUMTOSTRN(DYNAINFO(3),2)),COLORffffff,linethick5;
{分时横盘公式}
tt:=BARSCOUNT(C);
CC:=CLOSE;
zz:=SUM(AMOUNT,tt)/SUM(vol*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
均线:IF(zz1=0,MA(C,TT),zz),COLOR00FFFF,LINETHICK0;
上均:均线 + AVEDEV(C,tt)*2,COLOR00FF00,LINETHICK0;
下均:均线 - AVEDEV(C,tt)*2,COLORFF6600,LINETHICK0;
时长:=if(HOUR>=13 AND HOUR<15 ,1,0);
涨幅:=(close/DYNAINFO(3))>=1.03;
跌幅:=(close/DYNAINFO(3))<=0.97;
涨跌幅:=涨幅 OR 跌幅;
yy:=SMA(VOL,30,1);
放量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0;
横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<=0.05;
横涨:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(CC,上均)and DYNAINFO(22)<DYNAINFO(23) ;
横跌:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(下均,CC) ;
PP:= FILTER(横涨,100) ;
UU:= FILTER(横跌,50) ;
VERTLINE( PP,3),colorffffff;
VERTLINE( UU,3),colorffffff;
{变色设计}
PARTLINE(c,c>=REF(c,1),RGB(255,250,250),c<=REF(c,1),RGB(0,255,0)),linethick2,layer0;
{一品老师的盘中急杀----一品茶缘编写,1分钟预警指标,附送急涨指标}
JS1:=L=LLV(L,3) AND (L/HHV(H,3)-1)*100<=(0-3);
JS2:=L=LLV(L,10) AND (L/HHV(H,10)-1)*100<=(0-5);
急杀:=JS1 OR JS2;
DRAWTEXT(急杀,c,'●急杀'),COLORgreen,linethick4;
DRAWTEXT(急杀,c,'●急杀'),COLORgreen,linethick4;
{一品老师的分时过顶}
KP30:=TIME0<36000;
KPGD:=H=HHV(H,0) AND KP30;
GDSJ:=BArslAST(KPGD);
HH:REF(H,GDSJ),COLORFF00FF,POINTDOT,LINETHICK0;
过顶:IF(CROSS(C,HH),1,0),COLOR00FF00,POINTDOT,LINETHICK0;
冲高:IF(FILTER(CROSS(C,HH*1.01),15),1,0),COLOR00FFFF,POINTDOT,LINETHICK0;
DRAWTEXT(过顶,HH,'↑'),COLORyellow,linethick2;
DRAWTEXT(冲高,HH,'▲'),COLORyellow,linethick2;
{前30分钟的股价}
VERTLINE(TIME=94000,2);
VERTLINE(TIME=95000,2);
VERTLINE(TIME=100000,2);
DRAWTEXT(TIME=94000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;
DRAWTEXT(TIME=95000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;
DRAWTEXT(TIME=100000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;
{引用 分时副图 显示涨跌}
macd:"分时副图.MacD",PRECIS2,linethick0;
DRAwrECTREL(630,680,820,930,rgb(47,79,79));
DRAWRECTREL(262,690,622,930,rgb(47,79,79));
DRAWRECTREL(440,690,622,930,rgb(47,79,79));
DRAWRECTREL(262,680,622,748,rgb(10,10,20));
{颜色显示涨跌}
ssx0:=现价>DYNAINFO(3);
ssx1:=现价<DYNAINFO(3);
ssx2:=现价=DYNAINFO(3);
IF BARSTATUS=2 AND ssx0 THEN BEGIN
DRAWTEXTABS(465,430,' '+NUMTOSTRN(现价,2)),colorred,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssx1 THEN BEGIN
DRAWTEXTABS(465,430,' '+NUMTOSTRN(现价,2)),colorgreen,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssx2 THEN BEGIN
DRAWTEXTABS(465,430,' '+NUMTOSTRN(现价,2)),coloryellow,LINETHICK5;
END;
上升:((MACD>REF(MACD,1)) AND (MACD<0)) or ((MACD>REF(MACD,1)) AND (MACD>0)),LINETHICK0;
下跌:((MACD<REF(MACD,1)) AND (MACD>0)) or ((MACD<REF(MACD,1)) AND (MACD<0)),LINETHICK0;
ssxd0:=上升;
ssxd1:=下跌;
IF BARSTATUS=2 AND ssxd0 THEN BEGIN
DRAWTEXTABS(720,410,' ▲ 目前上升中 '),colorred,linethick5;
DRAWRECTREL(690,830,770,910,rgb(255,0,0));
END
ELSE
IF BARSTATUS=2 AND ssxd1 THEN BEGIN
DRAWTEXTABS(720,410,' ▼ 目前下跌中 '),colorgreen,linethick5;
DRAWRECTREL(690,830,770,910,rgb(0,255,0));
END;
ssxd3:=今昨差>0;
ssxd4:=今昨差<0;
IF BARSTATUS=2 AND ssxd3 THEN BEGIN
DRAWTEXTABS(430,460,' 涨:'+NUMTOSTRN(今昨差,2)),colorred,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssxd4 THEN BEGIN
DRAWTEXTABS(430,460,' 跌:'+NUMTOSTRN(今昨差,2)),colorgreen,LINETHICK5;
END;
ssxd5:=今昨差比>0;
ssxd6:=今昨差比<0;
IF BARSTATUS=2 AND ssxd5 THEN BEGIN
DRAWTEXTABS(550,460,' 涨幅:'+NUMTOSTRN(今昨差比,2)+'%'),colorred,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssxd6 THEN BEGIN
DRAWTEXTABS(550,460,' 跌幅:'+NUMTOSTRN(今昨差比,2)+'%'),colorgreen,LINETHICK5;
END;
{ssxd7:=高昨差比>0;
ssxd8:=高昨差比<0;
IF BARSTATUS=2 AND ssxd7 THEN BEGIN
DRAWTEXTABS(550,430,' 涨幅:'+NUMTOSTRN(高昨差比,2)+'%'),colorred,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssxd8 THEN BEGIN
DRAWTEXTABS(550,430,' 跌幅:'+NUMTOSTRN(高昨差比,2)+'%'),colorgreen,LINETHICK5;
END;
ssxd9:=高昨差>0;
ssxd10:=高昨差<0;
IF BARSTATUS=2 AND ssxd9 THEN BEGIN
DRAWTEXTABS(430,430,' 涨:'+NUMTOSTRN(高昨差,2)+'元'),colorred,LINETHICK5;
END
ELSE
IF BARSTATUS=2 AND ssxd10 THEN BEGIN
DRAWTEXTABS(430,430,' 跌:'+NUMTOSTRN(高昨差,2)+'元'),colorgreen,LINETHICK5;
END;}
DRAWTEXTABS(354,430,''+NUMTOSTRN(DYNAINFO(5),2)),colorgreen,LINETHICK5;
{分时横盘公式}
tt:=BARSCOUNT(C);
CC:=CLOSE;
zz:=SUM(AMOUNT,tt)/SUM(VOL*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
均线:IF(zz1=0,MA(C,TT),zz),COLOR00FFFF,LINETHICK0;
上均:均线 + AVEDEV(C,tt)*2,COLOR00FF00,LINETHICK0;
下均:%&&&&&% - AVEDEV(C,tt)*2,COLORFF6600,LINETHICK0;
时长:=if(HOUR>=13 AND HOUR<15 ,1,0);
涨幅:=(close/DYNAINFO(3))>=1.03;
跌幅:=(close/DYNAINFO(3))<=0.97;
涨跌幅:=涨幅 OR 跌幅;
yy:=SMA(vol,30,1);
放量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0;
横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<=0.05;
横涨:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(CC,上均)and DYNAINFO(22)<DYNAINFO(23) ;
横跌:=涨跌幅=0 and 横盘 and 时长 and %&&&&&% and CROSS(下均,CC) ;
PP:= FILTER(横涨,100) ;
UU:= FILTER(横跌,50) ;
VERTLINE( PP,3),colorffffff;
VERTLINE( UU,3),colorffffff;
{变色设计}
PARTLINE(c,c>=REF(c,1),RGB(255,250,250),c<=REF(c,1),RGB(0,255,0)),linethick2,layer0;
{一品老师的%&&&&&%急杀----一品茶缘编写,1分钟%&&&&&%指标,附送急涨指标}
JS1:=L=LLV(L,3) AND (L/HHV(H,3)-1)*100<=(0-3);
JS2:=L=LLV(L,10) AND (L/HHV(H,10)-1)*100<=(0-5);
急杀:=JS1 OR JS2;
DRAWTEXT(急杀,c,'●急杀'),COLORgreen,linethick4;
DRAWTEXT(急杀,c,'●急杀'),COLORgreen,linethick4;
{一品老师的分时过顶}
KP30:=TIME0<36000;
KPGD:=H=HHV(H,0) AND KP30;
GDSJ:=BARSLAST(KPGD);
HH:REF(H,GDSJ),COLORFF00FF,POINTDOT,LINETHICK0;
过顶:IF(CROSS(C,HH),1,0),COLOR00FF00,POINTDOT,LINETHICK0;
冲高:IF(FILTER(CROSS(C,HH*1.01),15),1,0),COLOR00FFFF,POINTDOT,LINETHICK0;
DRAWTEXT(过顶,HH,'↑'),COLORyellow,linethick2;
DRAWTEXT(冲高,HH,'▲'),COLORyellow,linethick2;
{前30分钟的股价}
VERTLINE(TIME=94000,2);
VERTLINE(TIME=95000,2);
VERTLINE(TIME=100000,2);
DRAWTEXT(TIME=94000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;
DRAWTEXT(TIME=95000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;
DRAWTEXT(TIME=100000,C,NUMTOSTR(C)),Colorffffff,LINETHICK2;