以下是分时组图一

分时

建立一个引用公式:

总引

超B:L2_AMO(0,2)/10000.0;
大B:L2_AMO(1,2)/10000.0;
中B:L2_AMO(2,2)/10000.0;
小B:L2_AMO(3,2)/10000.0;
超S:L2_AMO(0,3)/10000.0;
大S:L2_AMO(1,3)/10000.0;
中S:L2_AMO(2,3)/10000.0;
小S:L2_AMO(3,3)/10000.0;
大单动向:(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7);
涨跌动因:IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);
大单差分:IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);
今量:VOL;
昨量:REF(VOL,1);
前量:REF(VOL,2);
昨开:REF(O,1);
昨收:REF(C,1);
前开:REF(O,2);
前收:REF(C,2);
ZO:REF(O,1);
ZC:REF(C,1);
ZH:REF(H,1);
ZL:REF(L,1);
JO:REF(O,2);
JC:REF(C,2);
JH:REF(H,2);
JL:REF(L,2);
JO3:REF(O,3);
JC3:REF(C,3);
JH3:REF(H,3);
JL3:REF(L,3);
JO4:REF(O,4);
JC4:REF(C,4);
JH4:REF(H,4);
JL4:REF(L,4);
JO5:REF(O,5);
JC5:REF(C,5);
JH5:REF(H,5);
JL5:REF(L,5);
JO6:REF(O,6);
JC6:REF(C,6);
JH6:REF(H,6);
JL6:REF(L,6);
JO7:REF(O,7);
JC7:REF(C,7);
JH7:REF(H,7);
JL7:REF(L,7);
JO8:REF(O,8);
JC8:REF(C,8);
JH8:REF(H,8);
JL8:REF(L,8);
JO9:REF(O,9);
JC9:REF(C,9);
JH9:REF(H,9);
JL9:REF(L,9);
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA60:MA(C,60);

 

分时组图一

超引B1:=”总引.超B#DAY”;
超引B2:=”总引.大B#DAY”;
超引B3:=”总引.中B#DAY”;
超引B4:=”总引.小B#DAY”;
超引S1:=”总引.超S#DAY”;
超引S2:=”总引.大S#DAY”;
超引S3:=”总引.中S#DAY”;
超引S4:=”总引.小S#DAY”;
TESTSKIP(NOT(超引B1 OR 超引B2 OR 超引B3 OR 超引B4 OR 超引S1 OR 超引S2 OR 超引S3 OR 超引S4)!=0);

Q:=250;
高点:=HHV(C,Q);
低点:=LLV(C,Q);
最高:=CONST(高点),NODRAW;
最低:=CONST(低点),NODRAW;
轴差:=最高-最低;
中价轴:=(最高+最低)/2;
HL3:=(100-0)/2*1.3;
HL4:=(100-0)/1*1.3;
中间价轴:=(50-HL3)*轴差/HL4+中价轴;
平安轴:=(中价轴+中间价轴)/2;
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((CLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((CLOSE*BGTYU),BARSCOUNT((CLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))));
起动线:=EXPMA((CLOSE/VBNH),20)*1,COLORYELLOW,POINTDOT;
主力线:=EXPMA((CLOSE/VBNH),60)*1,COLORMAGENTA,LINETHICK2;
散户线:=EXPMA((CLOSE/VBNH),120)*1,COLORGREEN,LINETHICK2;
限制起动线:=起动线*中间价轴;
限制主力线:=主力线*中间价轴;
限制散户线:=散户线*中间价轴;
主散MIN:=MIN(限制主力线,限制散户线);
DRAWBAND(限制主力线,RGB(250,125,0),限制散户线,RGB(0,100,250));
STICKLINE(起动线<主力线,限制起动线,限制主力线,0,0),COLOR00FF00;
STICKLINE(起动线>主力线,限制起动线,限制主力线,0,0),COLORFFFFFF;
STICKLINE(VOL>EMA(VOL,60) AND 起动线>主力线,限制起动线,限制主力线,0,0),COLORFF00FF;
STICKLINE(VOL>EMA(VOL,30) AND 起动线>主力线 AND 起动线>1.01 AND 起动线>REF(起动线,1),限制起动线,限制主力线,0,0),COLOR00FFFF;

总A:=(超引B1+超引B2+超引B3+超引B4)+(超引S1+超引S2+超引S3+超引S4),NODRAW;
净流入:=SUM((超引B1+超引B2+超引B3+超引B4)-(超引S1+超引S2+超引S3+超引S4),1),NODRAW,COLORCYAN;
流入:=(超引B1+超引B2+超引B3+超引B4),COLORRED,NODRAW;
流出:=(超引S1+超引S2+超引S3+超引S4),COLORGREEN,NODRAW;
流入比:=(超引B1+超引B2+超引B3+超引B4)/总A*100;
流出比:=(超引S1+超引S2+超引S3+超引S4)/总A*100;
DRAWRECTREL(640,1000,940,940,RGB(190,190,190));
DRAWRECTREL(640,995,940,945,RGB(200,200,200));
DRAWRECTREL(640,990,940,950,RGB(210,210,210));
DRAWRECTREL(640,985,940,955,RGB(220,220,220));
DRAWRECTREL(640,980,940,960,RGB(230,230,230));
DRAWRECTREL(640,975,940,965,RGB(240,240,240));
DRAWRECTREL(640,970,940,970,RGB(250,250,250));

DRAWRECTREL(790-CONST(流入*300/总A),1000,790,940,RGB(140,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),995,790,945,RGB(148,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),990,790,950,RGB(168,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),985,790,955,RGB(188,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),980,790,960,RGB(208,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),975,790,965,RGB(228,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),970,790,970,RGB(248,0,0));
DRAWRECTREL(790-CONST(流入*300/总A),940,790-CONST(流入*300/总A),1000,RGB(128,0,0));
DRAWRECTREL(790,1000,790+CONST(流出*300/总A),940,RGB(0,128,0));
DRAWRECTREL(790,995,790+CONST(流出*300/总A),945,RGB(0,148,0));
DRAWRECTREL(790,990,790+CONST(流出*300/总A),950,RGB(0,168,0));
DRAWRECTREL(790,985,790+CONST(流出*300/总A),955,RGB(0,188,0));
DRAWRECTREL(790,980,790+CONST(流出*300/总A),960,RGB(0,208,0));
DRAWRECTREL(790,975,790+CONST(流出*300/总A),965,RGB(0,228,0));
DRAWRECTREL(790,970,790+CONST(流出*300/总A),970,RGB(0,248,0));
DRAWRECTREL(790+CONST(流出*300/总A),940,790+CONST(流出*300/总A),1000,RGB(0,128,0));

DRAWRECTREL(789.8,940,790.2,1000,RGB(0,0.0,10));
DRAWRECTREL(639.8,940,640.2,1000,RGB(0,0,10));
DRAWRECTREL(939.8,940,940.2,1000,RGB(0,0,10));
DRAWRECTREL(0,940,1000,940.2,RGB(0,0,10));

DRAWTEXT_FIX(1,0.61,0.88,0,STRCAT(STRCAT(‘流入=’,CON2STR(流入,1)),’万’)),COLOR0000FF;
DRAWTEXT_FIX(1,0.9,0.88,0,STRCAT(STRCAT(‘流出=’,CON2STR(流出,1)),’万’)),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)>0,0.755,0.88,0,STRCAT(‘净流= ‘,STRCAT(CON2STR(净流入,1),’万’))) COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)<0,0.755,0.88,0,STRCAT(‘净流= ‘,STRCAT(CON2STR(净流入,1),’万’))) COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)=0,0.755,0.88,0,STRCAT(‘净流= ‘,STRCAT(CON2STR(净流入,1),’万’))) COLOR80FFFF;
DRAWTEXT_FIX(1,0.80,0.955,0,STRCAT(STRCAT(‘ ‘,CON2STR(流出比,1)),’%%’)),COLORBLUE;
DRAWTEXT_FIX(1,0.74,0.955,0,STRCAT(STRCAT(”,CON2STR(流入比,1)),’%%’)),COLORBLUE;

H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORGREEN;
支撑:L1+P1*0.5/8,COLORRED;
中:(支撑+阻力)/2,COLORWHITE,POINTDOT;
DRAWTEXT(CURRBARSCOUNT=4,阻力,’顶’),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=4,支撑,’底’),COLORRED;
DRAWTEXT(CURRBARSCOUNT=4,(支撑+阻力)/2,’中’),COLORWHITE;

前量:=”总引.前量#DAY”;
昨量:=”总引.昨量#DAY”;
今量:=”总引.今量#DAY”;
前总:=前量;
昨总:=昨量;
总:=今量,NODRAW;
BMM:=MAX(前总,昨总);
AMM:=IF(总/BMM>2,BMM*3,BMM);
MM:=150/AMM;
KP1:=DYNAINFO(4);
ZX1:=DYNAINFO(7);
A1:=IF(ZX1>=KP1,355,0);
A2:=IF(ZX1>=KP1,0,355);
A3:=IF(ZX1>=KP1,0,0);
量差:=IF(C>400,今量-昨量,(今量-昨量)/10000);
DRAWRECTREL(0,80,MM*今量,114,RGB(A1,A2,A3));
DRAWTEXT_FIX(1,0.04,0.08,0,STRCAT(STRCAT(‘量差=’,CON2STR(量差,2)),’万’)),COLORWHITE;
昨开:=”总引.昨开#DAY”;
昨收:=”总引.昨收#DAY”;
A4:=IF(昨收>=昨开,355,0);
A5:=IF(昨收>=昨开,0,355);
A6:=IF(昨收>=昨开,0,0);
DRAWRECTREL(0,40,MM*昨量,70,RGB(A4,A5,A6));
前开:=”总引.前开#DAY”;
前收:=”总引.前收#DAY”;
A7:=IF(前收>=前开,355,0);
A8:=IF(前收>=前开,0,355);
A9:=IF(前收>=前开,0,0);
DRAWRECTREL(0,0,MM*前量,30,RGB(A7,A8,A9));

现价:=C,LINETHICK2,COLORFFFF00;
DRAWICON(CROSS(现价,”总引.ZH#DAY”),现价,13);

GJ:=C,COLORWHITE;
JJ:SUM(C*V,FROMOPEN)/SUM(V,FROMOPEN),COLORYELLOW,LINETHICK1.5;
均量:=MA(V,5);
量连增:=均量>REF(均量,1) AND REF(均量,1)>REF(均量,2);
价连涨:=C>=REF(C,1) AND REF(C,1)>REF(C,2);
价量线上:=C>JJ AND V>均量;
倍量:=V>=REF(V,1)*2 ;
价新高:=C>=HHV(C,FROMOPEN);
量新高:=V>=HHV(V,FROMOPEN);
限幅:=C/DYNAINFO(3)<=1.02;
起爆:=FILTER(量连增 AND 价连涨 AND 价量线上 AND 倍量 AND 价新高 AND 量新高 AND 限幅,20);
DRAWTEXT(起爆,C,’起爆’),COLOR00FFFF;
DRAWICON(起爆,C,1);
STICKLINE(起爆,C,JJ,1,0),COLOR1000FF;
VV:=BARSSINCE(起爆);
起爆价:=REF(C,VV);
起爆时间:=REF(TIME/100,VV);
收益:=(DYNAINFO(7)-起爆价)/起爆价*100;
DRAWICON(VV>=2,起爆价,17);
DRAWTEXT_FIX(1,0,0.82,0,’起爆时间:’),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.05,0.82,0,CONST(起爆时间)),COLOR00FFFF;
DRAWTEXT_FIX(1,0.013,0.89,0,’起爆价:’),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.05,0.89,0,CONST(起爆价)),COLOR00FFFF;
DRAWTEXT_FIX(1,0.022,1,0,’收益:’),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.05,1,0,CONST(收益)),COLOR00FFFF;

ZS1:=DYNAINFO(3);{前收盘价}
KP:=DYNAINFO(4);{今开}
ZX:=DYNAINFO(7);{现价}
ZG:=DYNAINFO(5);{最高}
ZD:=DYNAINFO(6);{最底}
OP:=500-(KP/ZS1-1)*4000;
CL:=500-(ZX/ZS1-1)*4000;
HI:=500-(ZG/ZS1-1)*4000;
LO:=500-(ZD/ZS1-1)*4000;
N1:=IF(TIME>=130000 OR TIME<91500,360,860);
DRAWRECTREL(N1+613,OP,N1+615,HI,RGB(255,0,255)),COLORFF00FF;{今日最高}{玫红}
DRAWRECTREL(N1+613,CL,N1+615,LO,RGB(0,128,0)),COLOR008000;{今日最低}{暗绿}
Q1:=IF(ZX>=KP,255,0);
Q2:=IF(ZX>=KP,0,255);
Q3:=IF(ZX>=KP,0,255);
DRAWRECTREL(N1+606,OP,N1+622,CL,RGB(Q1,Q2,Q3));{今日实体}{255,0,0大红}{0,255,255青}
ZO:=”总引.ZO#DAY”;
ZC:=”总引.ZC#DAY”;
ZH:=”总引.ZH#DAY”;
ZL:=”总引.ZL#DAY”;
ZKP:=500-(ZO/ZS1-1)*4000;
ZCP:=500-(ZC/ZS1-1)*4000;
ZZG:=500-(ZH/ZS1-1)*4000;
ZZD:=500-(ZL/ZS1-1)*4000;
DRAWRECTREL(N1+577,ZKP,N1+579,ZZG,RGB(255,0,255)),COLORFF00FF;{昨日最高}{玫红}
DRAWRECTREL(N1+577,ZCP,N1+579,ZZD,RGB(0,128,0)),COLOR008000;{昨日最低}{暗绿}
Q4:=IF(ZC>=ZO,255,0);
Q5:=IF(ZC>=ZO,0,255);
Q6:=IF(ZC>=ZO,0,255);
DRAWRECTREL(N1+570,ZKP,N1+586,ZCP,RGB(Q4,Q5,Q6)),COLOR00FFFF;{昨日实体}{大红或青}
JO:=”总引.JO#DAY”;
JC:=”总引.JC#DAY”;
JH:=”总引.JH#DAY”;
JL:=”总引.JL#DAY”;
ZZKP:=500-(JO/ZS1-1)*4000;
ZZCP:=500-(JC/ZS1-1)*4000;
ZZZG:=500-(JH/ZS1-1)*4000;
ZZZD:=500-(JL/ZS1-1)*4000;
DRAWRECTREL(N1+541,ZZKP,N1+543,ZZZG,RGB(255,0,255)),COLORFF00FF;{前日最高}{玫红}
DRAWRECTREL(N1+541,ZZCP,N1+543,ZZZD,RGB(0,128,0)),COLOR008000;{前日最低}{暗绿}
Q7:=IF(JC>=JO,255,0);
Q8:=IF(JC>=JO,0,255);
Q9:=IF(JC>=JO,0,255);
DRAWRECTREL(N1+534,ZZKP,N1+550,ZZCP,RGB(Q7,Q8,Q9)),COLOR00FFFF;{前日实体}{大红或青}
JO3:=”总引.JO3#DAY”;
JC3:=”总引.JC3#DAY”;
JH3:=”总引.JH3#DAY”;
JL3:=”总引.JL3#DAY”;
ZZKP3:=500-(JO3/ZS1-1)*4000;
ZZCP3:=500-(JC3/ZS1-1)*4000;
ZZZG3:=500-(JH3/ZS1-1)*4000;
ZZZD3:=500-(JL3/ZS1-1)*4000;
DRAWRECTREL(N1+505,ZZKP3,N1+507,ZZZG3,RGB(255,0,255)),COLORFF00FF;{四日最高}{玫红}
DRAWRECTREL(N1+505,ZZCP3,N1+507,ZZZD3,RGB(0,128,0)),COLOR008000;{四日最低}{暗绿}
Q10:=IF(JC3>=JO3,255,0);
Q11:=IF(JC3>=JO3,0,255);
Q12:=IF(JC3>=JO3,0,255);
DRAWRECTREL(N1+498,ZZKP3,N1+514,ZZCP3,RGB(Q10,Q11,Q12)),COLOR00FFFF;{四日实体}{大红或青}
JO4:=”总引.JO4#DAY”;
JC4:=”总引.JC4#DAY”;
JH4:=”总引.JH4#DAY”;
JL4:=”总引.JL4#DAY”;
ZZKP4:=500-(JO4/ZS1-1)*4000;
ZZCP4:=500-(JC4/ZS1-1)*4000;
ZZZG4:=500-(JH4/ZS1-1)*4000;
ZZZD4:=500-(JL4/ZS1-1)*4000;
DRAWRECTREL(N1+469,ZZKP4,N1+471,ZZZG4,RGB(255,0,255)),COLORFF00FF;{五日最高}{玫红}
DRAWRECTREL(N1+469,ZZCP4,N1+471,ZZZD4,RGB(0,128,0)),COLOR008000;{五日最低}{暗绿}
Q13:=IF(JC4>=JO4,255,0);
Q14:=IF(JC4>=JO4,0,255);
Q15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(N1+462,ZZKP4,N1+478,ZZCP4,RGB(Q13,Q14,Q15)),COLOR00FFFF;{五日实体}{大红或青}

A51:=”总引.MA5#DAY”;
XMA5:=500-(A51/ZS1-1)*4000;
DRAWRECTREL(N1+595,XMA5-5,N1+630,XMA5+5,RGB(255,255,255));{白}
DRAWTEXT_FIX(ISLASTBAR,0.2,1,0,STRCAT(‘MA5 : ‘,CON2STR(A51,2))),COLORWHITE;
A10:=”总引.MA10#DAY”;
XMA10:=500-(A10/ZS1-1)*4000;
DRAWRECTREL(N1+580,XMA10-5,N1+630,XMA10+5,RGB(255,255,0));{黄}
DRAWTEXT_FIX(ISLASTBAR,0.3,1,0,STRCAT(‘MA10 : ‘,CON2STR(A10,2))),COLORYELLOW;
A20:=”总引.MA20#DAY”;
XMA20:=500-(A20/ZS1-1)*4000;
DRAWRECTREL(N1+565,XMA20-5,N1+630,XMA20+5,RGB(255,0,255)),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.4,1,0,STRCAT(‘MA20 : ‘,CON2STR(A20,2))),COLORMAGENTA;
A60:=”总引.MA60#DAY”;
XMA60:=500-(A60/ZS1-1)*4000;
DRAWRECTREL(N1+550,XMA60-5,N1+630,XMA60+5,RGB(0,125,0)),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.5,1,0,STRCAT(‘MA60 : ‘,CON2STR(A60,2))),COLORGREEN;
 

Z1:=STRCAT(HYBLOCK,’ ‘);
Z2:=STRCAT(Z1,FGBLOCK);
Z3:=STRCAT(Z2,DYBLOCK);
Z4:=STRCAT(Z3,’ ‘);
DRAWTEXT_FIX(ISLASTBAR,0.97,0,1,STRCAT(Z4,GNBLOCK)),COLORYELLOW;

最新:C,LINETHICK4,COLORGREEN;
IF(C>REF(C,1),C,DRAWNULL),LINETHICK4,COLORRED;
IF(C=REF(C,1),C,DRAWNULL),LINETHICK4,COLORWHITE;
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,C,C),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.1,1.0,0,STRCAT(‘均价 : ‘,CON2STR(均价,2))),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,阻力,阻力)COLORCYAN;
DRAWNUMBER(ISLASTBAR,支撑,支撑)COLORCYAN;

大1:=”总引.大单动向#DAY”;
涨跌:=”总引.涨跌动因#DAY”;
大2:=”总引.大单差分#DAY”;
DRAWRECTREL(185,875,100,915,IF(CONST(大1)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(295,875,205,915,IF(CONST(涨跌)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(395,875,311,915,IF(CONST(大2)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWTEXT_FIX(1,0.101,0.88,0,STRCAT(‘【DDX】:’,CON2STR(大1,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.205,0.88,0,STRCAT(‘【DDY】:’,CON2STR(涨跌,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.311,0.88,0,STRCAT(‘【DDZ】:’,CON2STR(大2,2))),COLORYELLOW;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。