大智慧分时解盘主图指标公式
{盘囗分笔}
分钟数:IF(TIME0/60-570<=130,TIME0/60-570,TIME0/60-660),PRECIS0,linethick0,colorffffff;
{DRAWTEXTAbs(200,15,'以上涨下跌时段计 ' ),COLORWHITE;}
DRAWTEXTABS(200,15,'买/总买;卖/总卖;比>100%,有对倒之嫌!' ),COLORWHITE;
DRAWTEXTABS(450,15,'价涨幅/量涨幅>0,欠量上涨;价跌幅/量跌幅<0,有量下跌' ),COLORWHITE;
停牌:=(DYNAINFO(4)=0);
tj:=BARPOS>1 and BARPOS<31;
HH:=HHV(h,20);
t:=BArslAst(tj and h=HHV(H,10));
Y10:=max(HHV(ref(HH,t),0),DYNAINFO(4));
LL:=LLV(l,20);
tl:=BARSLAST((tj and l=LLV(LL,10)));
x10:=if(停牌,DYNAINFO(3),min(LLV(ref(L,tl),0),DYNAINFO(4)));
dkd:=c-DYNAINFO(4);
STICKLINE(dkd>0 and BARPOS>1 and BARPOS<31 and not(停牌),c,DYNAINFO(4),0,1),COLOR000aaa;
STICKLINE(dkd<0 and BARPOS>1 and BARPOS<31 and not(停牌),c,DYNAINFO(4),0,1),COLOR008800;
tj1:=BARPOS>31 and BARPOS<61;
t1:=BARSLAST(tj1);
Y11:=HHV(ref(H,t1),0);
tl1:=BARSLAST((tj1));
x11:=llV(ref(L,tl1),0);
as:=hhv(if(BARPOS=31,c,0),0);
dkd1:=c-as;
STICKLINE(dkd1>0 and BARPOS>31 and BARPOS<61,c,as,0,1),COLOR000aaa;
STICKLINE(dkd1<0 and BARPOS>31 and BARPOS<61,c,as,0,1),COLOR008800;
tj2:=BARPOS>61 and BARPOS<91;
t2:=BARSLAST(tj2);
Y12:=HHV(ref(H,t2),0);
tL2:=BARSLAST((tj2));
x12:=llV(ref(L,tl2),0);
as1:=hhv(if(BARPOS=61,c,0),0);
dkd2:=c-as1;
STICKLINE(dkd2>0 and BARPOS>61 and BARPOS<91,c,as1,0,1),COLOR000aaa;
STICKLINE(dkd2<0 and BARPOS>61 and BARPOS<91,c,as1,0,1),COLOR008800;
tj3:=BARPOS>91 and BARPOS<121;
t3:=BARSLAST(tj3);
Y13:=HHV(ref(H,t3),0);
tl3:=BARSLAST((tj3));
x13:=llV(ref(L,tl3),0);
as2:=hhv(if(BARPOS=91,c,0),0);
dkd3:=c-as2;
STICKLINE(dkd3>0 and BARPOS>91 and BARPOS<121,c,as2,0,1),COLOR000aaa;
STICKLINE(dkd3<0 and BARPOS>91 and BARPOS<121,c,as2,0,1),COLOR008800;
tj4:=BARPOS>121 and BARPOS<151;
t4:=BARSLAST(tj4);
Y14:=HHV(ref(H,t4),0);
tl4:=BARSLAST((tj4));
x14:=llV(ref(L,tl4),0);
as3:=hhv(if(BARPOS=121,c,0),0);
dkd4:=c-as3;
STICKLINE(dkd4>0 and BARPOS>121 and BARPOS<151,c,as3,0,1),COLOR000aaa;
STICKLINE(dkd4<0 and BARPOS>121 and BARPOS<151,c,as3,0,1),COLOR008800;
tj5:=BARPOS>151 and BARPOS<181;
t5:=BARSLAST(tj5);
Y15:=HHV(ref(H,t5),0);
tl5:=BARSLAST((tj5));
x15:=llV(ref(L,tl5),0);
as4:=hhv(if(BARPOS=151,c,0),0);
dkd5:=c-as4;
STICKLINE(dkd5>0 and BARPOS>151 and BARPOS<181,c,as4,0,1),COLOR000aaa;
STICKLINE(dkd5<0 and BARPOS>151 and BARPOS<181,c,as4,0,1),COLOR008800;
tj6:=BARPOS>181 and BARPOS<211;
t6:=BARSLAST(tj6);
Y16:=HHV(ref(H,t6),0);
tl6:=BARSLAST((tj6));
x16:=llV(ref(L,tl6),0);
as5:=hhv(if(BARPOS=181,c,0),0);
dkd6:=c-as5;
STICKLINE(dkd6>0 and BARPOS>181 and BARPOS<211,c,as5,0,1),COLOR000aaa;
STICKLINE(dkd6<0 and BARPOS>181 and BARPOS<211,c,as5,0,1),COLOR008800;
tj7:=BARPOS>211 and BARPOS<241;
t7:=BARSLAST(tj7);
Y17:=HHV(ref(H,t7),0);
tl7:=BARSLAST((tj7));
x17:=llV(ref(L,tl7),0);
as6:=hhv(if(BARPOS=211,c,0),0);
dkd7:=c-as6;
STICKLINE(dkd7>0 and BARPOS>211 and BARPOS<241,c,as6,0,1),COLOR000aaa;
STICKLINE(dkd7<0 and BARPOS>211 and BARPOS<241,c,as6,0,1),COLOR008800;
涨量:=IF(C>ref(c,1),vol,0);
涨量占:SUM(涨量,0)/SUM(V,0)*100,linethick0,color0000ff;
跌量:=IF(C<ref(c,1),VOL,0);
跌量占:SUM(跌量,0)/SUM(V,0)*100,linethick0,Color00FF00;
平量:=IF(C=ref(c,1),VOL,0);
平量占:SUM(平量,0)/SUM(V,0)*100,linethick0,Color00FF00;
{叠加大盘}
DPC1:=strcmp('上证指数',stkname)<>0 and strcmp('深证指数',stkname)<>0;{当前是否为大盘指数}
今开:=DYNAINFO(4);
振距:=max(DYNAINFO(5)-今开,今开-DYNAINFO(6));
振比:=振距/今开;
大盘:=INDEXC-REF(INDEXC,barscount(c)-1);
大盘副比:=大盘*振比/max(hhvall(大盘),abs(llvall(大盘)));
大盘指数:=(大盘副比+1)*今开;
大盘指数,COLOR009999;
DRAWTEXT( BARSTATUS=2,大盘指数,'大盘指数:'+ NUMTOSTRN(INDEXC,2)),COLORffffff;
TC:=STRCMP(STRLEFT(MARKETLABEL,2),'SZ');
DPSH:="SH000001$CLOSE"/HHV(STKINDI('SH000001','03引.RC#DAY'),0);
DPSZ:="399001$CLOSE"/HHV(STKINDI('399001','03引.RC#DAY'),0);
DPC:=IF(INBLOCK('A股板块'),DYNAINFO(3)*IF(C=0,DPSZ,DPSH),C);
{POLYLINE(C>0,DPC),COLORff00FF,LAYER0,linethick2;}
DRAWTEXTABS(10,55,IFS(("03引.大盘涨幅#day" >= 0) ,'大盘涨幅 '+NUMTOSTRN("03引.大盘涨幅#day",3)+'%,','')),linethick1,color0000FF;
DRAWTEXTABS(10,55,IFS(("03引.大盘涨幅#day" < 0), '大盘涨幅 '+NUMTOSTRN("03引.大盘涨幅#day",3)+'%,','')),linethick1,color00FF00;
DRAWTEXTABS(10,10,' 涨家数: '+NUMTOSTRN(DYNAINFO(69),0)+ ''),COLOR0000ff,LINETHICK1;
DRAWTEXTABS(10,25,' 跌家数: '+NUMTOSTRN(DYNAINFO(70),0)+ ''),COLOR00ff00,LINETHICK1;
DRAWTEXTABS(10,40,' 平家数: '+NUMTOSTRN(DYNAINFO(71),0)+ ''),COLORffFFff,LINETHICK1;
主动买:="bsvol.主动买#tick";
主动卖:="bsvol.主动卖#tick";
{上涨时间}
tt:=BARSCOUNT(C);
CC:=CLOSE;
zz:=SUM(AMOUNT,tt)/SUM(VOL*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
{均线:SUM(C*V,0)/SUM(V,0),COLOR00FFFF,LINETHICK0,PRECIS2;}
均线:IF(zz1=0,MA(C,TT),zz),COLOR00FFFF,LINETHICK0,PRECIS2;
a:=if(c>=均线,1,0);
均线上:=COUNT(a=1 ,0 );
均线下:=COUNT(a=0 ,0 );
PARTLINE(CLOSE,CLOSE>均线,RGB(255,0,0),CLOSE<均线,RGB(0,255,0),1,RGB(0,0,255)),LINETHICK2;
上涨:=COUNT(c>REF(c,1),0);下跌:=COUNT(c<REF(c,1),0);平盘:=COUNT(c=REF(c,1),0);
涨时占:=sum(上涨,0)/sum((上涨+下跌+平盘),0)*100;
跌时占:=sum(下跌,0)/sum((上涨+下跌+平盘),0)*100;
平时占:=sum(平盘,0)/sum((上涨+下跌+平盘),0)*100;
均价上占:=sum(均线上,0)/sum((均线上+均线下),0)*100;
均价下占:=sum(均线下,0)/sum((均线上+均线下),0)*100;
上涨买:=sum(主动买,上涨)/sum(vol,0);
上涨卖:=SUM(主动卖,上涨)/sum(vol,0);
涨净:=上涨买-上涨卖;
下跌买:=SUM(主动买,下跌)/sum(vol,0);
下跌卖:=SUM(主动卖,下跌)/sum(vol,0);
跌净:=下跌买-下跌卖;
平盘买:=SUM(主动买,平盘)/sum(vol,0);
平盘卖:=SUM(主动卖,平盘)/sum(vol,0);
均线上买:=SUM(主动买,均线上)/sum(vol,0);
均线上卖:=SUM(主动卖,均线上)/sum(vol,0);
均线上净:=均线上买-均线上卖;
均线下买:=SUM(主动买,均线下)/sum(vol,0);
均线下卖:=SUM(主动卖,均线下)/sum(vol,0);
均线下净:=均线下买-均线下卖;
DRAWTEXTABS(20 ,190 ,'上涨分时 : '+上涨 ),COLORff00ff,linethick1;
DRAWTEXTABS(120,190,'上涨时占:'+NUMTOSTRN(涨时占,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(220,190,'分买:'+NUMTOSTRN(上涨买,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(320,190,'分卖:'+NUMTOSTRN(上涨卖,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(20 ,210,'下跌分时 : '+下跌 ),COLORgreen,linethick1;
DRAWTEXTABS(120,210,'下跌时占:'+NUMTOSTRN(跌时占,2)+'%'),COLORgreen,linethick1;
DRAWTEXTABS(220,210,'分买:'+NUMTOSTRN(下跌买,2)+'%'),COLORgreen,linethick1;
DRAWTEXTABS(320,210,'分卖:'+NUMTOSTRN(下跌卖,2)+'%'),COLORgreen,linethick1;
DRAWTEXTABS(20 ,230,'平盘分时 : '+平盘),COLORffffff,linethick1;
DRAWTEXTABS(120,230,'平盘时占:'+NUMTOSTRN(平时占,2)+'%'),COLORffffff,linethick1;
DRAWTEXTABS(220,230,'分买:'+NUMTOSTRN(平盘买,2)+'%'),COLORffffff,linethick1;
DRAWTEXTABS(320,230,'分卖:'+NUMTOSTRN(平盘卖,2)+'%'),COLORffffff,linethick1;
DRAWTEXTABS(20 ,270,'均价线上 : '+均线上),COLORd3a4ff,linethick1;
DRAWTEXTABS(120,270,'均价上占:'+NUMTOSTRN(均价上占,2)+'%'),COLORd3a4ff,linethick1;
DRAWTEXTABS(220,270,'分买:'+NUMTOSTRN(均线上买,2)+'%'),COLORd3a4ff,linethick1;
DRAWTEXTABS(320,270,'分卖:'+NUMTOSTRN(均线上卖,2)+'%'),COLORd3a4ff,linethick1;
DRAWTEXTABS(20 ,290,'均价线下 : '+均线下),COLORffff00,linethick1;
DRAWTEXTABS(120,290,'均价下占:'+NUMTOSTRN(均价下占,2)+'%'),COLORffff00,linethick1;
DRAWTEXTABS(220,290,'分买:'+NUMTOSTRN(均线下买,2)+'%'),COLORffff00,linethick1;
DRAWTEXTABS(320,290,'分卖:'+NUMTOSTRN(均线下卖,2)+'%'),COLORffff00,linethick1;
总主动买:=上涨买+下跌买+平盘买;
总主动卖:=上涨卖+下跌卖+平盘卖;
被动买:=100-总主动买;
被动卖:=100-总主动卖;
DRAWTEXTABS(20,170,'总主动'),color00ffff,linethick2;
DRAWTEXTABS(220,170,'分买:'+NUMTOSTRN(总主动买,2)+'%'),COLOR00ffff,linethick2;
DRAWTEXTABS(320,170,'分卖:'+NUMTOSTRN(总主动卖,2)+'%'),COLOR00ffff,linethick2;
DRAWTEXTABS(20,250,'被动买卖'),color0098ff;
DRAWTEXTABS(220,250,'分买:'+NUMTOSTRN(被动买,2)+'%'),COLOR0098ff,linethick1;
DRAWTEXTABS(320,250,'分卖:'+NUMTOSTRN(被动卖,2)+'%'),COLOR0098ff,linethick1;
总买入:="马留引用.总买入#tick";
总卖出:="马留引用.总卖出#tick";
进出比例:=(总买入-总卖出)/(总买入+总卖出)*100;
DRAWTEXTABS(220,350,'资金进出比:'+NUMTOSTRN(进出比例,2)+'%'),COLOR00ffff,linethick3;
现涨幅:=100*(C/REF(C,上涨)-1);{linethick0,colorff00ff;}
总涨幅:=SUM(现涨幅,0);
现跌幅:=100*(C/REF(C,下跌)-1);{linethick0,color00ff00;}
总跌幅:=SUM(现跌幅,0);
DRAWTEXTABS(420,190,'现涨幅:'+NUMTOSTRN(现涨幅,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(420,210,'现跌幅:'+NUMTOSTRN(现跌幅,2)+'%'),COLOR00ff00,linethick1;
DRAWTEXTABS(520,190,'总涨幅:'+NUMTOSTRN(总涨幅,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(520,210,'总跌幅:'+NUMTOSTRN(总跌幅,2)+'%'),COLOR00ff00,linethick1;
现涨幅2:=100*(C/REF(C,均线上)-1);
总涨幅2:=SUM(现涨幅2,0);
现跌幅2:=100*(C/REF(C,均线下)-1);
总跌幅2:=SUM(现跌幅2,0);
DRAWTEXTABS(520,270,'总涨幅2:'+NUMTOSTRN(总涨幅2,2)+'%'),COLORff00ff,linethick1;
DRAWTEXTABS(520,290,'总跌幅2:'+NUMTOSTRN(总跌幅2,2)+'%'),COLOR00ff00,linethick1;
涨量幅比:=现涨幅/涨净;
跌量幅比:=现跌幅/跌净;
DRAWTEXTABS(630,190,'涨量幅比:'+NUMTOSTRN(涨量幅比,2)+'%'),COLORd3a4ff,linethick1;
DRAWTEXTABS(630,210,'跌量幅比:'+NUMTOSTRN(跌量幅比,2)+'%'),COLORffff00,linethick1;
线涨量幅比:=现涨幅2/均线上净;
线跌量幅比:=现跌幅2/均线下净;
DRAWTEXTABS(630,270,'线涨量幅比:'+NUMTOSTRN(线涨量幅比,2)+'%'),COLORd3a4ff,linethick1;
DRAWTEXTABS(630,290,'线跌量幅比:'+NUMTOSTRN(线跌量幅比,2)+'%'),COLORffff00,linethick1;
A1:=DYNAINFO(23) / DYNAINFO(22);
A2:=DYNAINFO(17);
DRAWTEXTREL(750,15,IFS((A1 >= 1),'能量:'+NUMTOSTRN(A1,2)+' 量比: '+NUMTOSTRN(A2,2),'')),linethick2,color00ffff;
DRAWTEXTREL(750,15,IFS((A1 < 1),'能量:'+NUMTOSTRN(A1,2)+' 量比: '+NUMTOSTRN(A2,2),'')),linethick2,color00ffff;
{信手抓个股截图}