快百科 kuaibk订阅大字版

 

 

通达信小散之家分时主图指标公式

N:=2;

DRAWBAND("SS.ZL#DAY",RGB(25,25,112),"SS.ZH#DAY",RGB(25,25,112));

{彩色框}

DRAWTEXT_FIX(1,0.05,0.26,0,"跌停K线绿色"),COLOR008E00;

DRAWTEXT_FIX(1,0.05,0.32,0,"涨停K线黄色"),COLOR00FFFF;

DRAWRECTREL(368,250,485,330,RGB(128,42,42));

DRAWTEXT_FIX(1,0.378,0.26,0,STRCAT(STRCAT("棕色水平线为3日均线",CON2STR("SS.棕MA3#DAY",2)),"元")),COLOR000000;

DRAWRECTREL(490,250,609.5,330,RGB(255,0,0));

DRAWTEXT_FIX(1,0.500,0.26,0,STRCAT(STRCAT("红色水平线为5日均线",CON2STR("SS.红MA5#DAY",2)),"元")),COLOR000000;

DRAWRECTREL(615,250,735,330,RGB(255,0,255));

DRAWTEXT_FIX(1,0.623,0.26,0,STRCAT(STRCAT("粉色水平线为7日均线",CON2STR("SS.粉MA7#DAY",2)),"元")),COLOR000000;

DRAWRECTREL(740,250,860,330,RGB(255,255,0));

DRAWTEXT_FIX(1,0.745,0.26,0,STRCAT(STRCAT("黄色水平线为13日均线",CON2STR("SS.黄MA13#DAY",2)),"元")),COLOR000000;

DRAWRECTREL(865,250,985,360,RGB(0,255,0));

DRAWTEXT_FIX(1,0.870,0.26,0,STRCAT(STRCAT("绿色水平线为昨最高价",CON2STR("SS.H1#DAY",2)),"元")),COLOR000000;

DRAWTEXT_FIX(1,0.870,0.31,0,STRCAT(STRCAT("绿色水平线为昨最低价",CON2STR("SS.L1#DAY",2)),"元")),COLOR000000;

回调昨日:=C<="SS.L1#DAY";

超昨低点:=CROSS(回调昨日,0.01);

昨低点:"SS.L1#DAY",COLOR00FF00;

昨高点:"SS.H1#DAY",COLOR00FF00;

E14:=IF(BETWEEN(TIME,0945,0945),"SS.OJ#DAY",DRAWNULL);

E24:=IF(BETWEEN(TIME,0945,0945),"SS.CJ#DAY",DRAWNULL);

E1:=IF(BETWEEN(TIME,0940,0940),"SS.O1#DAY",DRAWNULL);

E2:=IF(BETWEEN(TIME,0940,0940),"SS.C1#DAY",DRAWNULL);

E12:=IF(BETWEEN(TIME,0936,0936),"SS.O2#DAY",DRAWNULL);

E22:=IF(BETWEEN(TIME,0936,0936),"SS.C2#DAY",DRAWNULL);

E13:=IF(BETWEEN(TIME,0932,0932),"SS.O3#DAY",DRAWNULL);

E23:=IF(BETWEEN(TIME,0932,09320),"SS.C3#DAY",DRAWNULL);

{均线支撑}

EE3:IF(BETWEEN(TIME,0931,1500),"SS.棕MA3#DAY",DRAWNULL),COLOR0052A3,LINETHICK4;

EE5:IF(BETWEEN(TIME,0931,1500),"SS.红MA5#DAY",DRAWNULL),COLOR0000FF,LINETHICK4;

EE7:IF(BETWEEN(TIME,0931,1500),"SS.粉MA7#DAY",DRAWNULL),COLORFF00FF,LINETHICK4;

EE13:IF(BETWEEN(TIME,0931,1500),"SS.黄MA13#DAY",DRAWNULL),COLOR00FFFF,LINETHICK4;

{K线最高与最低}

STICKLINE(TIME=0936 AND "SS.CJ#DAY">"SS.OJ#DAY","SS.HJ#DAY","SS.LJ#DAY",0,0),COLOR0000FF;

STICKLINE(TIME=0936 AND "SS.CJ#DAY">"SS.OJ#DAY","SS.OJ#DAY","SS.CJ#DAY",12,1),COLOR0000FF;

STICKLINE(TIME=0936 AND "SS.ZTJ#DAY","SS.HJ#DAY","SS.LJ#DAY",0,0),COLOR00FFFF;

STICKLINE(TIME=0936 AND "SS.ZTJ#DAY","SS.OJ#DAY","SS.CJ#DAY",92,0),COLOR00FFFF;

STICKLINE(TIME=0936 AND "SS.CJ#DAY"<"SS.OJ#DAY","SS.HJ#DAY","SS.LJ#DAY",0,0),COLORFFFF54;

STICKLINE(TIME=0936 AND "SS.CJ#DAY"<"SS.OJ#DAY","SS.OJ#DAY","SS.CJ#DAY",92,0),COLORFFFF54;

STICKLINE(TIME=0936 AND "SS.DTJ#DAY","SS.OJ#DAY","SS.CJ#DAY",92,0),COLOR008E00;

STICKLINE(TIME=0936 AND "SS.DTJ#DAY","SS.HJ#DAY","SS.LJ#DAY",0,0),COLOR008E00;

STICKLINE(TIME=0936 AND "SS.CJ#DAY"="SS.OJ#DAY","SS.HJ#DAY","SS.LJ#DAY",0,0),COLORWHITE;

STICKLINE(TIME=0936 AND "SS.CJ#DAY"="SS.OJ#DAY","SS.OJ#DAY"+0.005,"SS.CJ#DAY",22,0),COLORWHITE;

{昨前天最高与最低}

STICKLINE(TIME=0935 AND "SS.C1#DAY">"SS.O1#DAY","SS.H1#DAY","SS.L1#DAY",0,0),COLOR0000FF;

STICKLINE(TIME=0935 AND "SS.C1#DAY">"SS.O1#DAY","SS.O1#DAY","SS.C1#DAY",12,1),COLOR0000FF;

STICKLINE(TIME=0935 AND "SS.ZT1#DAY","SS.H1#DAY","SS.L1#DAY",0,0),COLOR00FFFF;

STICKLINE(TIME=0935 AND "SS.ZT1#DAY","SS.O1#DAY","SS.C1#DAY",92,0),COLOR00FFFF;

STICKLINE(TIME=0935 AND "SS.C1#DAY"<"SS.O1#DAY","SS.H1#DAY","SS.L1#DAY",0,0),COLORFFFF54;

STICKLINE(TIME=0935 AND "SS.C1#DAY"<"SS.O1#DAY","SS.O1#DAY","SS.C1#DAY",92,0),COLORFFFF54;

STICKLINE(TIME=0935 AND "SS.DT1#DAY","SS.O1#DAY","SS.C1#DAY",92,0),COLOR008E00;

STICKLINE(TIME=0935 AND "SS.DT1#DAY","SS.H1#DAY","SS.L1#DAY",0,0),COLOR008E00;

STICKLINE(TIME=0935 AND "SS.C1#DAY"="SS.O1#DAY","SS.H1#DAY","SS.L1#DAY",0,0),COLORWHITE;

STICKLINE(TIME=0935 AND "SS.C1#DAY"="SS.O1#DAY","SS.O1#DAY"+0.005,"SS.C1#DAY",22,0),COLORWHITE;

{前天最高与最低}

STICKLINE(TIME=0934 AND "SS.C2#DAY">"SS.O2#DAY","SS.H2#DAY","SS.L2#DAY",0,0),COLOR0000FF;

STICKLINE(TIME=0934 AND "SS.C2#DAY">"SS.O2#DAY","SS.O2#DAY","SS.C2#DAY",12,1),COLOR0000FF;

STICKLINE(TIME=0934 AND "SS.ZT2#DAY","SS.H2#DAY","SS.L2#DAY",0,0),COLOR00FFFF;

STICKLINE(TIME=0934 AND "SS.ZT2#DAY","SS.O2#DAY","SS.C2#DAY",92,0),COLOR00FFFF;

STICKLINE(TIME=0934 AND "SS.C2#DAY"<"SS.O2#DAY","SS.H2#DAY","SS.L2#DAY",0,0),COLORFFFF54;

STICKLINE(TIME=0934 AND "SS.C2#DAY"<"SS.O2#DAY","SS.O2#DAY","SS.C2#DAY",92,0),COLORFFFF54;

STICKLINE(TIME=0934 AND "SS.DT2#DAY","SS.O2#DAY","SS.C2#DAY",92,0),COLOR008E00;

STICKLINE(TIME=0934 AND "SS.DT2#DAY","SS.H2#DAY","SS.L2#DAY",0,0),COLOR008E00;

STICKLINE(TIME=0934 AND "SS.C2#DAY"="SS.O2#DAY","SS.H2#DAY","SS.L2#DAY",0,0),COLORWHITE;

STICKLINE(TIME=0934 AND "SS.C2#DAY"="SS.O2#DAY","SS.O2#DAY"+0.005,"SS.C2#DAY",22,0),COLORWHITE;

{大前天最高与最低}

STICKLINE(TIME=0933 AND "SS.C3#DAY">"SS.O3#DAY","SS.H3#DAY","SS.L3#DAY",0,0),COLOR0000FF;

STICKLINE(TIME=0933 AND "SS.C3#DAY">"SS.O3#DAY","SS.O3#DAY","SS.C3#DAY",12,1),COLOR0000FF;

STICKLINE(TIME=0933 AND "SS.ZT3#DAY","SS.H3#DAY","SS.L3#DAY",0,0),COLOR00FFFF;

STICKLINE(TIME=0933 AND "SS.ZT3#DAY","SS.O3#DAY","SS.C3#DAY",92,0),COLOR00FFFF;

STICKLINE(TIME=0933 AND "SS.C3#DAY"<"SS.O3#DAY","SS.H3#DAY","SS.L3#DAY",0,0),COLORFFFF54;

STICKLINE(TIME=0933 AND "SS.C3#DAY"<"SS.O3#DAY","SS.O3#DAY","SS.C3#DAY",92,0),COLORFFFF54;

STICKLINE(TIME=0933 AND "SS.DT3#DAY","SS.O3#DAY","SS.C3#DAY",92,0),COLOR008E00;

STICKLINE(TIME=0933 AND "SS.DT3#DAY","SS.H3#DAY","SS.L3#DAY",0,0),COLOR008E00;

STICKLINE(TIME=0933 AND "SS.C3#DAY"="SS.O3#DAY","SS.H3#DAY","SS.L3#DAY",0,0),COLORWHITE;

STICKLINE(TIME=0933 AND "SS.C3#DAY"="SS.O3#DAY","SS.O3#DAY"+0.005,"SS.C3#DAY",22,0),COLORWHITE;

{大前前天最高与最低}

STICKLINE(TIME=0932 AND "SS.C4#DAY">"SS.O4#DAY","SS.H4#DAY","SS.L4#DAY",0,0),COLOR0000FF;

STICKLINE(TIME=0932 AND "SS.C4#DAY">"SS.O4#DAY","SS.O4#DAY","SS.C4#DAY",12,1),COLOR0000FF;

STICKLINE(TIME=0932 AND "SS.ZT4#DAY","SS.H4#DAY","SS.L4#DAY",0,0),COLOR00FFFF;

STICKLINE(TIME=0932 AND "SS.ZT4#DAY","SS.O4#DAY","SS.C4#DAY",92,0),COLOR00FFFF;

STICKLINE(TIME=0932 AND "SS.C4#DAY"<"SS.O4#DAY","SS.H4#DAY","SS.L4#DAY",0,0),COLORFFFF54;

STICKLINE(TIME=0932 AND "SS.C4#DAY"<"SS.O4#DAY","SS.O4#DAY","SS.C4#DAY",92,0),COLORFFFF54;

STICKLINE(TIME=0932 AND "SS.DT4#DAY","SS.O4#DAY","SS.C4#DAY",92,0),COLOR008E00;

STICKLINE(TIME=0932 AND "SS.DT4#DAY","SS.H4#DAY","SS.L4#DAY",0,0),COLOR008E00;

STICKLINE(TIME=0932 AND "SS.C4#DAY"="SS.O4#DAY","SS.H4#DAY","SS.L4#DAY",0,0),COLORWHITE;

STICKLINE(TIME=0932 AND "SS.C4#DAY"="SS.O4#DAY","SS.O4#DAY"+0.005,"SS.C4#DAY",22,0),COLORWHITE;

{量能柱线}

前3三日均线:="SS.前3三日均线#DAY";

前2三日均线:="SS.前2三日均线#DAY";

前1三日均线:="SS.前1三日均线#DAY";

三日均线:="SS.昨三日均线#DAY";

五日量均线:="SS.五日量均线#DAY";

前量3:="SS.前量3#DAY";

前量2:="SS.前量2#DAY";

前量:="SS.前量#DAY";

昨量:="SS.昨量#DAY";

今量:="SS.今量#DAY";

总量预测:="SS.总量预测#DAY";

前总3:=前量3;

前总2:=前量2;

前总:=前量;

昨总:=昨量;

总:=今量;

BMM1:=MAX(前总,昨总);

BMM2:=MAX(BMM1,前总2);

BMM3:=MAX(BMM2,总量预测);

BMM4:=MAX(BMM3,五日量均线);

BMM:=MAX(BMM4,前总3);

AMM:=IF(总/BMM>2,BMM*3,BMM);

MM:=200/AMM;

KP:=DYNAINFO(4);

ZX:=DYNAINFO(7);

A1:=IF(ZX>=KP,355,0);

A2:=IF(ZX>=KP,0,355);

A3:=IF(ZX>=KP,0,0);

DRAWRECTREL(948,900-(MM*总量预测),951,900,RGB(0,0,0));

DRAWRECTREL(940,900-(MM*今量),948,900,RGB(A1,A2,A3));

DRAWRECTREL(948,900-(MM*五日量均线),951,900,RGB(250,250,0));

昨开:="SS.昨开#DAY";

昨收:="SS.昨收#DAY";

A4:=IF(昨收>=昨开,355,0);

A5:=IF(昨收>=昨开,0,355);

A6:=IF(昨收>=昨开,0,0);

DRAWRECTREL(910,900-(MM*昨量),918,900,RGB(A4,A5,A6));

DRAWRECTREL(918,900-(MM*昨三日均线),921,900,RGB(255,255,0));

前开:="SS.前开#DAY";

前收:="SS.前收#DAY";

A7:=IF(前收>=前开,355,0);

A8:=IF(前收>=前开,0,355);

A9:=IF(前收>=前开,0,0);

DRAWRECTREL(880,900-(MM*前量),888,900,RGB(A7,A8,A9));

DRAWRECTREL(888,900-(MM*前1三日均线),891,900,RGB(255,255,0));

前开2:="SS.前开2#DAY";

前收2:="SS.前收2#DAY";

A10:=IF(前收2>=前开2,355,0);

A11:=IF(前收2>=前开2,0,355);

A12:=IF(前收2>=前开2,0,0);

DRAWRECTREL(850,900-(MM*前量2),858,900,RGB(A10,A11,A12));

DRAWRECTREL(858,900-(MM*前2三日均线),861,900,RGB(255,255,0));

前开3:="SS.前开3#DAY";

前收3:="SS.前收3#DAY";

A13:=IF(前收3>=前开3,355,0);

A14:=IF(前收3>=前开3,0,355);

A15:=IF(前收3>=前开3,0,0);

DRAWRECTREL(820,900-(MM*前量3),828,900,RGB(A13,A14,A15));

DRAWRECTREL(828,900-(MM*前3三日均线),831,900,RGB(255,255,0));

DRAWTEXT_FIX(1,0.938,0.91,0,"今量"),COLOR00FF00;

DRAWTEXT_FIX(1,0.908,0.91,0,"昨量"),COLOR00FF00;

DRAWTEXT_FIX(1,0.878,0.91,0,"前量"),COLOR00FF00;

DRAWTEXT_FIX(1,0.845,0.91,0,"前1量"),COLOR00FF00;

DRAWTEXT_FIX(1,0.815,0.91,0,"前2量"),COLOR00FF00;

DRAWTEXT_FIX(1,0.84,0.95,0,"(黄 色 柱 体 为 五 日 均 量)"),COLOR00FFFF;

DRAWTEXT_FIX(1,0.72,0.86,0,STRCAT(STRCAT("今虚拟量",CON2STR(总量预测,2)),"")),COLORFFFFFF;

DRAWTEXT_FIX(1,0.72,0.81,0,STRCAT(STRCAT("今成交量",CON2STR(总,2)),"")),COLORFFFFFF;

DRAWTEXT_FIX(1,0.72,0.76,0,STRCAT(STRCAT("昨成交量",CON2STR(昨总,2)),"")),COLORFFFFFF;

现价:CLOSE,COLORFFFFFF,LINETHICK2;

{FS分时N=30,M=13,N1=50,N2=60}

KPSJ:=IF(TIME<1200,(INTPART(TIME/100))*60+MOD(TIME,100)-570,(INTPART(TIME/100))*60+MOD(TIME,100)-660);{定义开盘分钟数}

分时均价:SUM(C*V,0)/SUM(V,0),COLORYELLOW,DOTLINE;

ZDFD:=(DYNAINFO(5)-DYNAINFO(6))/DYNAINFO(3);

HLINE:分时均价+DYNAINFO(3)*30/1000,COLORGREEN,DOTLINE;

HLINE1:分时均价+DYNAINFO(3)*60/1000,COLORGREEN,DOTLINE;

LLINE:分时均价-DYNAINFO(3)*30/1000,COLORRED,DOTLINE;

LLINE1:分时均价-DYNAINFO(3)*50/1000,COLORRED,DOTLINE;

突破:=CROSS(C,LLINE);

{DRAWTEXT(突破,LLINE,"突破"),COLORYELLOW;}

突破1:=CROSS(C,LLINE1);

{DRAWTEXT(突破1,LLINE1,"突破"),COLORYELLOW;}

DRAWICON(突破1,LLINE1,1);

DRAWICON(突破,LLINE,1);

DRAWICON(CROSS(HLINE,C),HLINE,2);

{DRAWICON(CROSS(HLINE1,C),HLINE1,2);}

MA1:MA(CLOSE,N);

 

搜索建议: