通达信【资金流揭秘】分时主图指标 把握涨停节点 源码
HS:=100*DYNAINFO(8)/CAPITAL;
ZHWS:=STRCAT(VAR2STR(DYNAINFO(8)/10000,2),'万手');
JHS:=STRCAT('今换手:',STRCAT(VAR2STR(HS,2),'%'));
JHS1:=STRCAT(JHS,' ≈ ');
DRAWTEXT_FIX(1,0.20,0.99,0,STRCAT(JHS1,ZHWS))COLORYELLOW;
LTPDW:=IF((FINANCE(46))/1000000>1,'亿股','万股');
LTP:=IF((FINANCE(46))/1000000>1,CON2STR((FINANCE(46))/100000000,2),CON2STR((FINANCE(46))/10000,0));
LTP1:=STRCAT(STRCAT('自由流通盘:',LTP),LTPDW);
LTPWS:=STRCAT(VAR2STR(FINANCE(46)/1000000,2),'万手');
LTP2:=STRCAT(LTP1,' ≈ ');
DRAWTEXT_FIX(1,0.37,0.99,0,STRCAT(LTP2,LTPWS))COLORMAGENTA;
DRAWTEXT_FIX(1,0.37,0.92,0,STRCAT(STRCAT('自由流通市值:',CON2STR(FINANCE(46)*C/100000000,2)),'亿元'))COLORMAGENTA;
KP:=(DYNAINFO(4)-DYNAINFO(3))/DYNAINFO(3)*100;
DRAWTEXT_FIX(1,0.2,0.65,0,STRCAT('开盘:',STRCAT(VAR2STR(KP,2),'%')))COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.85,0,STRCAT('最高价:',CON2STR(DYNAINFO(5),2)))COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.90,0,STRCAT('最低价:',CON2STR(DYNAINFO(6),2)))COLORYELLOW;资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金流量:=资金出入,COLORFFFFFF,LINETHICK1;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
增强流量比:=IF(资金流量比>50,资金流量比,50);
攻击量:=((HSL*0.50+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=攻击量A+攻击量B,COLORSTICK;
NOTEXT攻击线:=攻击流量,COLORYELLOW,LINETHICK1;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击度:=IF(攻击比>0,(攻击比+50),100-ABS((攻击比-50)));
攻击度限制:=IF(资金攻击度>100,100,IF(资金攻击度<0,0,资金攻击度));
增强攻击度:=IF(资金攻击度>50,资金攻击度,50);
开始攻击:=CROSS(攻击流量,0) AND (C>REF(C,2) OR (资金流量>0 AND 资金流量>攻击流量));
开始攻击量:=CROSS(攻击流量,0) AND C>REF(C,2) AND V>LLV(V,3)*3;
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:=1;
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(限制主力线,限制散户线);
主力:限制主力线,DOTLINE,COLORFF00FF,LINETHICK1;
分时均价线:=SUM(C*V,240)/SUM(V,240),DOTLINE,COLORFFFFFF,LINETHICK1;
追击涨停:=限制散户线>分时均价线 AND CROSS(C,限制散户线);
拉升量:=IF(C>REF(C,1),VOL,0);
昨拉升最高值:=CONST(FINDHIGH(拉升量,FROMOPEN,240,1)),LINETHICK1,COLORMAGENTA;
今拉升最高值:=CONST(REF(HHV(拉升量,FROMOPEN),0)),COLORYELLOW,NODRAW;
攻击力度:=今拉升最高值/昨拉升最高值,NODRAW;
TT:=BARSCOUNT(C);{取得有效收盘价}
均价黄:=SUM(C*V,TT)/SUM(V,TT);{分时均线的取值}
量两步:=MA(V,5)>REF(MA(V,5),1) AND REF(MA(V,5),1)>REF(MA(V,5),2);
价两步:= C>=REF(C,1) AND REF(C,1)>REF(C,2);
价上岗量破5:=C>均价黄 AND V>MA(V,5);
量起爆:=V>=REF(V,1)*1 ;
价创新高:=C>=HHV(C,0);
量创新高:=V>=HHV(V,0);
对昨日涨幅:=(C/DYNAINFO(3)-1)*100<=2.50;{涨幅控制2个点以内}
每日一点:=量两步 AND 价两步 AND 价上岗量破5 AND 量起爆 AND 价创新高 AND 量创新高 AND 对昨日涨幅;
TA:=BARSLAST(TIME=100000);
TC:=REF(HHV(C,0),TA+1);
TV:=REF(HHV(V,0),TA+1);
ZF:=C/DYNAINFO(3)<1.05;
XG1:=CROSS(C,TC) AND V>TV AND ZF,COLORWHITE;
TA1:=BARSLAST(TIME=110000);
CC1:=REF(HHV(C,0),TA1+1);
VV1:=REF(HHV(V,0),TA1+1);
ZF1:=CC1/DYNAINFO(3)<1.05;
XG2:=CROSS(C,CC1) AND V>VV1 AND ZF1,COLORYELLOW;
突破:=XG1 OR XG2,COLORRED;
STICKLINE(FILTER(突破=1,15),最低+轴差*0.60,最低,1,0),COLORWHITE;
DRAWTEXT(FILTER(突破=1,15),最低+轴差*0.60,'∠分时突破'),COLORWHITE;
STICKLINE(FILTER(开始攻击量=1,15),最低+轴差*0.45,最低,1,0),COLORMAGENTA;
STICKLINE(FILTER(开始攻击=1,30),最低+轴差*0.30,最低,1,0),COLORYELLOW;
STICKLINE(CROSS(EXPMA((CLOSE/VBNH),60),EXPMA((CLOSE/VBNH),120)),最低+轴差*0.15,最低,1,0),COLORCYAN;
DRAWTEXT(FILTER(开始攻击量=1,15),最低+轴差*0.45,'∠攻击量'),COLORMAGENTA;
DRAWTEXT(FILTER(开始攻击,30),最低+轴差*0.30,'开始攻'),COLORYELLOW;
DRAWICON(FILTER(CROSS(起动线,1.01),30),限制散户线,17);
DRAWTEXT(FILTER(CROSS(起动线,1.01),30),最低,'可能涨停'),COLORMAGENTA;
DRAWTEXT(FILTER(追击涨停,30),分时均价线+(限制散户线-分时均价线)/2,'追击'),COLORRED;
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,COLORMAGENTA;
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主攻:=EXPMA(CLOSE/XX,20);
大户:=EXPMA(CLOSE/XX,60);
散户:=EXPMA(CLOSE/XX,120);
底:=1;1.02,NODRAW;
高:=1.03;
AA:=主攻>大户 AND 主攻>1.003 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60);
DRAWTEXT(主攻>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主攻=HHV(主攻,30) AND CROSS(主攻,1.003),C*0.999,'-主攻'),COLORYELLOW;
DRAWTEXT(CROSS(主攻,1.02),C*0.999,'--拉升'),COLORCYAN;
DRAWTEXT(CROSS(主攻,1.04),C*0.999,'--冲涨停'),COLORLIMAGENTA;
DRAWTEXT(CROSS(散户,主攻),C*0.9995,'--小心'),COLORGREEN;
DRAWTEXT(CROSS(散户,大户),C*0.9995,'--走弱'),COLORGREEN;
成交额:=V*C/100,NODRAW;{万元}
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=(A2+A3);
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买 = ',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖 = ',CON2STR((100*A3)/A6,0)),'%');
AAA3:=STRCAT(STRCAT('机构总买 = ',CON2STR((100*(A2-A3))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0,0.89,0,AAA1),COLOR00FFFF;
DRAWTEXT_FIX(DD1=1,0,0.945,0,AAA2),COLOR00FF00;
现手买:=BUYVOL*DYNAINFO(7)*100/10000 COLOR0000FF,NODRAW;
现手卖:=SELLVOL*DYNAINFO(7)*100/10000 COLOR00FF00,NODRAW;
合:=ABS(现手买)+ABS(现手卖)COLOR80FFFF,NODRAW;
差:=ABS(现手买)-ABS(现手卖)COLOR80FFFF,NODRAW;
MPB1:=ABS(现手买)/合*100;
MPB2:=ABS(现手卖)/合*100;
TESTSKIP(NOT(现手买 OR 现手卖 OR 合 OR 差 OR MPB1 OR MPB2)!=0);
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-现手卖*210/合,1000,790,940,RGB(0,128,0));
DRAWRECTREL(790-现手卖*210/合,995,790,945,RGB(0,148,0));
DRAWRECTREL(790-现手卖*210/合,990,790,950,RGB(0,168,0));
DRAWRECTREL(790-现手卖*210/合,985,790,955,RGB(0,188,0));
DRAWRECTREL(790-现手卖*210/合,980,790,960,RGB(0,208,0));
DRAWRECTREL(790-现手卖*210/合,975,790,965,RGB(0,228,0));
DRAWRECTREL(790-现手卖*210/合,970,790,970,RGB(0,248,0));
DRAWRECTREL(790-现手卖*210/合,940,790-现手卖*210/合,1000,RGB(0,128,0));
DRAWRECTREL(790,1000,790+现手买*210/合,940,RGB(128,0,0));
DRAWRECTREL(790,995,790+现手买*210/合,945,RGB(148,0,0));
DRAWRECTREL(790,990,790+现手买*210/合,950,RGB(168,0,0));
DRAWRECTREL(790,985,790+现手买*210/合,955,RGB(188,0,0));
DRAWRECTREL(790,980,790+现手买*210/合,960,RGB(208,0,0));
DRAWRECTREL(790,975,790+现手买*210/合,965,RGB(228,0,0));
DRAWRECTREL(790,970,790+现手买*210/合,970,RGB(248,0,0));
DRAWRECTREL(790+现手买*210/合,940,790+现手买*210/合,1000,RGB(128,0,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.8,0.88,0,STRCAT(STRCAT('',CON2STR(现手买,2)),'万')),COLOR0000FF;
DRAWTEXT_FIX(1,0.68,0.88,0,STRCAT(STRCAT('',CON2STR(现手卖,2)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)>0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR00FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)<0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)=0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR80FFFF;
DRAWTEXT_FIX(1,0.935,0.97,0,STRCAT(STRCAT(' ',CON2STR(MPB2,2)),'%')),COLOR00FF00;
DRAWTEXT_FIX(1,0.585,0.97,0,STRCAT(STRCAT('',CON2STR(MPB1,2)),'%')),COLOR0000FF;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
该公式包含未来函数:DHIGH
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HS赋值:100*DYNAINFO(8)/CAPITAL
ZHWS赋值:STRCAT(VAR2STR(DYNAINFO(8)/10000,2),'万手')
JHS赋值:STRCAT('今换手:',STRCAT(VAR2STR(HS,2),'%'))
JHS1:=STRCAT(JHS,' ≈ ')
DRAWTEXT_FIX(1,0.20,0.99,0,STRCAT(JHS1,ZHWS))画黄色
LTPDW赋值:IF((FINANCE(46))/1000000>1,'亿股','万股')
LTP赋值:IF((FINANCE(46))/1000000>1,CON2STR((FINANCE(46))/100000000,2),CON2STR((FINANCE(46))/10000,0))
LTP1:=STRCAT(STRCAT('自由流通盘:',LTP),LTPDW)
LTPWS:=STRCAT(VAR2STR(FINANCE(46)/1000000,2),'万手')
LTP2:=STRCAT(LTP1,' ≈ ')
DRAWTEXT_FIX(1,0.37,0.99,0,STRCAT(LTP2,LTPWS))COLORMAGENTA
DRAWTEXT_FIX(1,0.37,0.92,0,STRCAT(STRCAT('自由流通市值:',CON2STR(FINANCE(46)*C/100000000,2)),'亿元'))COLORMAGENTA
KP赋值:(开盘价-DYNAINFO(3))/DYNAINFO(3)*100
DRAWTEXT_FIX(1,0.2,0.65,0,STRCAT('开盘:',STRCAT(VAR2STR(KP,2),'%')))画黄色
DRAWTEXT_FIX(1,0.2,0.85,0,STRCAT('最高价:',CON2STR(DYNAINFO(5),2)))画黄色
DRAWTEXT_FIX(1,0.2,0.90,0,STRCAT('最低价:',CON2STR(DYNAINFO(6),2)))画黄色
资金流入赋值:SUM(IF(C>1日前的C,V,0),FROM开盘价),STICK,画红色
资金流出赋值:-SUM(IF(C<1日前的C,V,0),FROM开盘价),STICK,COLOR00FF00
资金出入赋值:资金流入+资金流出,COLORSTICK
资金流量赋值:资金出入,COLORFFFFFF,LINETHICK1
资金比赋值:资金出入/FROM开盘价的V日累和*100,COLOR00FFFF,LINETHICK1
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-(资金比-100的绝对值/2))
如果资金流量比>50返回资金流量比否则返回50
攻击量赋值:((HSL*0.50+(1日前的HSL*0.33))+(2日前的HSL*0.17))*FROM开盘价的C日累和/FROM开盘价
攻击量A:=SUM(IF(C>1日前的C,攻击量*V,0),FROM开盘价),COLOR0000FF,LINETHICK0
攻击量B:=-SUM(IF(C<1日前的C,攻击量*V,0),FROM开盘价),COLOR00FF00,LINETHICK0
攻击流量赋值:攻击量A+攻击量B,COLORSTICK
NOTEXT攻击线赋值:攻击流量,画黄色,LINETHICK1
攻击比赋值:攻击流量/FROM开盘价的V日累和*100,画红色,LINETHICK1
资金攻击度赋值:IF(攻击比>0,(攻击比+50),100-(攻击比-50的绝对值))
攻击度限制赋值:IF(资金攻击度>100,100,IF(资金攻击度<0,0,资金攻击度))
如果资金攻击度>50返回资金攻击度否则返回50
开始攻击赋值:攻击流量上穿0 AND (C>2日前的C OR (资金流量>0 AND 资金流量>攻击流量))
开始攻击量赋值:攻击流量上穿0 AND C>2日前的C AND V>3日内V最低值*3
Q赋值:250
高点赋值:Q日内C最高值
低点赋值:Q日内C最低值
最高赋值:CONST(高点),NODRAW
最低赋值:CONST(低点),NODRAW
轴差赋值:最高-最低
中价轴赋值:(最高+最低)/2
HL3赋值:(100-0)/2*1.3
HL4赋值:(100-0)/1*1.3
中间价轴赋值:(50-HL3)*轴差/HL4+中价轴
平安轴赋值:(中价轴+中间价轴)/2
BGTYU赋值:1
GHYJKU赋值:BETWEEN((收盘价*BGTYU)/(SUM(成交额,(收盘价*BGTYU的有效数据周期数))/SUM(成交量*100,(收盘价*BGTYU的有效数据周期数))),1.05,0.95)
VBNH赋值:IF(GHYJKU=0,MA((收盘价*BGTYU),(收盘价*BGTYU的有效数据周期数)),(SUM(成交额,(收盘价*BGTYU的有效数据周期数))/SUM(成交量*100,(收盘价*BGTYU的有效数据周期数))))
起动线赋值:EXPMA((收盘价/VBNH),20)*1,画黄色,POINTDOT
主力线赋值:EXPMA((收盘价/VBNH),60)*1,COLORMAGENTA, 线宽为2
散户线赋值:EXPMA((收盘价/VBNH),120)*1,画绿色, 线宽为2
限制起动线赋值:起动线*中间价轴
限制主力线赋值:主力线*中间价轴
限制散户线赋值:散户线*中间价轴
主散MIN赋值:限制主力线和限制散户线的较小值
输出主力:限制主力线,DOTLINE,COLORFF00FF,LINETHICK1
分时均价线赋值:240的C*V日累和/240的V日累和,DOTLINE,COLORFFFFFF,LINETHICK1
追击涨停赋值:限制散户线>分时均价线 AND C上穿限制散户线
拉升量赋值:IF(C>1日前的C,成交量,0)
昨拉升最高值:=CONST(FIND最高价(拉升量,FROM开盘价,240,1)),LINETHICK1,COLORMAGENTA
今拉升最高值:=CONST(REF(FROM开盘价日内拉升量最高值,0)),画黄色,NODRAW
攻击力度赋值:今拉升最高值/昨拉升最高值,NODRAW
TT赋值:C的有效数据周期数
{取得有效收盘价}
均价黄赋值:TT的C*V日累和/TT的V日累和
{分时均线的取值}
量两步赋值:V的5日简单移动平均>REF(V的5日简单移动平均,1) AND REF(V的5日简单移动平均,1)>REF(V的5日简单移动平均,2)
价两步赋值: C>=1日前的C AND 1日前的C>2日前的C
价上岗量破5赋值:C>均价黄 AND V>V的5日简单移动平均
量起爆赋值:V>=1日前的V*1
价创新高赋值:C>=0日内C最高值
量创新高赋值:V>=0日内V最高值
对昨日涨幅赋值:(C/DYNAINFO(3)-1)*100<=2.50
{涨幅控制2个点以内}
每日一点赋值:量两步 AND 价两步 AND 价上岗量破5 AND 量起爆 AND 价创新高 AND 量创新高 AND 对昨日涨幅
TA赋值:上次TIME=100000距今天数
TC赋值:REF(0日内C最高值,TA+1)
TV赋值:REF(0日内V最高值,TA+1)
ZF赋值:C/DYNAINFO(3)<1.05
XG1赋值:C上穿TC AND V>TV AND ZF,画白色
TA1:=上次TIME=110000距今天数
CC1赋值:REF(0日内C最高值,TA1+1)
VV1赋值:REF(0日内V最高值,TA1+1)
ZF1:=CC1/DYNAINFO(3)<1.05
XG2赋值:C上穿CC1 AND V>VV1 AND ZF1,画黄色
突破赋值:XG1 OR XG2,画红色
STICKLINE(突破=1的15过滤,最低+轴差*0.60,最低,1,0),画白色
DRAWTEXT(突破=1的15过滤,最低+轴差*0.60,'∠分时突破'),画白色
STICKLINE(开始攻击量=1的15过滤,最低+轴差*0.45,最低,1,0),COLORMAGENTA
STICKLINE(开始攻击=1的30过滤,最低+轴差*0.30,最低,1,0),画黄色
STICKLINE(CROSS(EXPMA((收盘价/VBNH),60),EXPMA((收盘价/VBNH),120)),最低+轴差*0.15,最低,1,0),画青色
DRAWTEXT(开始攻击量=1的15过滤,最低+轴差*0.45,'∠攻击量'),COLORMAGENTA
DRAWTEXT(开始攻击的30过滤,最低+轴差*0.30,'开始攻'),画黄色
DRAWICON(FILTER(起动线上穿1.01,30),限制散户线,17)
DRAWTEXT(FILTER(起动线上穿1.01,30),最低,'可能涨停'),COLORMAGENTA
DRAWTEXT(追击涨停的30过滤,分时均价线+(限制散户线-分时均价线)/2,'追击'),画红色
H1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1赋值:H1-L1
阻力赋值:L1+P1*7/8,画绿色
支撑赋值:L1+P1*0.5/8,COLORMAGENTA
XX赋值:SUM(成交额,收盘价的有效数据周期数)/SUM(V*100,收盘价的有效数据周期数)
主攻赋值:收盘价/XX的20日指数移动平均
大户赋值:收盘价/XX的60日指数移动平均
散户赋值:收盘价/XX的120日指数移动平均
底赋值:1
1.02,NODRAW
高赋值:1.03
AA赋值:主攻>大户 AND 主攻>1.003 AND 大户>散户 AND C>C的20日指数移动平均 AND C的10日指数移动平均>C的20日指数移动平均 AND C的20日指数移动平均>C的60日指数移动平均
DRAWTEXT(主攻>大户 AND 大户>散户 AND C>C的20日指数移动平均 AND C的10日指数移动平均>C的20日指数移动平均 AND C的20日指数移动平均>C的60日指数移动平均 AND 主攻=30日内主攻最高值 AND 主攻上穿1.003,C*0.999,'-主攻'),画黄色
DRAWTEXT(主攻上穿1.02,C*0.999,'--拉升'),画青色
DRAWTEXT(主攻上穿1.04,C*0.999,'--冲涨停'),COLORLIMAGENTA
DRAWTEXT(散户上穿主攻,C*0.9995,'--小心'),画绿色
DRAWTEXT(散户上穿大户,C*0.9995,'--走弱'),画绿色
成交额赋值:V*C/100,NODRAW
{万元}
A2赋值:SUM((IF(((成交额/8>20) AND (收盘价>(1日前的收盘价))),成交额,0)),0)
A3赋值:SUM((IF(((成交额/8>20) AND (收盘价<(1日前的收盘价))),成交额,0)),0)
A6赋值:(A2+A3)
A7赋值:IF((ISLASTBAR),((100*A2)/A6),0)
A8赋值:IF((ISLASTBAR),((100*A3)/A6),0)
DD1赋值:1
AAA1:=STRCAT(STRCAT('机构买 = ',CON2STR((100*A2)/A6,0)),'%')
AAA2:=STRCAT(STRCAT('机构卖 = ',CON2STR((100*A3)/A6,0)),'%')
AAA3赋值:STRCAT(STRCAT('机构总买 = ',CON2STR((100*(A2-A3))/A6,0)),'%')
当满足条件DD1=1时,在横轴0纵轴0.89位置书写文字
当满足条件DD1=1时,在横轴0纵轴0.945位置书写文字
现手买赋值:BUY成交量*现价*100/10000 COLOR0000FF,NODRAW
现手卖赋值:SELL成交量*现价*100/10000 COLOR00FF00,NODRAW
合赋值:现手买的绝对值+ABS(现手卖)COLOR80FFFF,NODRAW
差赋值:现手买的绝对值-ABS(现手卖)COLOR80FFFF,NODRAW
MPB1赋值:现手买的绝对值/合*100
MPB2赋值:现手卖的绝对值/合*100
TESTSKIP(NOT(现手买 OR 现手卖 OR 合 OR 差 OR MPB1 OR MPB2)!=0)
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-现手卖*210/合,1000,790,940,RGB(0,128,0))
DRAWRECTREL(790-现手卖*210/合,995,790,945,RGB(0,148,0))
DRAWRECTREL(790-现手卖*210/合,990,790,950,RGB(0,168,0))
DRAWRECTREL(790-现手卖*210/合,985,790,955,RGB(0,188,0))
DRAWRECTREL(790-现手卖*210/合,980,790,960,RGB(0,208,0))
DRAWRECTREL(790-现手卖*210/合,975,790,965,RGB(0,228,0))
DRAWRECTREL(790-现手卖*210/合,970,790,970,RGB(0,248,0))
DRAWRECTREL(790-现手卖*210/合,940,790-现手卖*210/合,1000,RGB(0,128,0))
DRAWRECTREL(790,1000,790+现手买*210/合,940,RGB(128,0,0))
DRAWRECTREL(790,995,790+现手买*210/合,945,RGB(148,0,0))
DRAWRECTREL(790,990,790+现手买*210/合,950,RGB(168,0,0))
DRAWRECTREL(790,985,790+现手买*210/合,955,RGB(188,0,0))
DRAWRECTREL(790,980,790+现手买*210/合,960,RGB(208,0,0))
DRAWRECTREL(790,975,790+现手买*210/合,965,RGB(228,0,0))
DRAWRECTREL(790,970,790+现手买*210/合,970,RGB(248,0,0))
DRAWRECTREL(790+现手买*210/合,940,790+现手买*210/合,1000,RGB(128,0,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.8,0.88,0,STRCAT(STRCAT('',CON2STR(现手买,2)),'万')),COLOR0000FF
DRAWTEXT_FIX(1,0.68,0.88,0,STRCAT(STRCAT('',CON2STR(现手卖,2)),'万')),COLOR00FF00
DRAWTEXT_FIX( 到最后交易的周期=1 AND(差)>0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR00FFFF
DRAWTEXT_FIX( 到最后交易的周期=1 AND(差)<0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR00FF00
DRAWTEXT_FIX( 到最后交易的周期=1 AND(差)=0,0.755,1.88,0,STRCAT(' ',STRCAT(CON2STR(差,2),'万'))) COLOR80FFFF
DRAWTEXT_FIX(1,0.935,0.97,0,STRCAT(STRCAT(' ',CON2STR(MPB2,2)),'%')),COLOR00FF00
DRAWTEXT_FIX(1,0.585,0.97,0,STRCAT(STRCAT('',CON2STR(MPB1,2)),'%')),COLOR0000FF