通达信资金主图指标 强度 饱和度 全方位一图搞定显示 降妖伏魔就靠它
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,60);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWICON(BU,L-0.1,1);
DRAWICON(SEL,H+0.1,2);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORCYAN;
STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORCYAN;
操盘线:MA(CLOSE,9),COLORYELLOW;
界点线:MA(CLOSE,20),COLORMAGENTA;
高:=REF(HHV(H,80),3);
低:=REF(LLV(L,80),3);
H19:=高-(高-低)*0.191;
H38:=高-(高-低)*0.382;
H中:=高-(高-低)*0.5;
H61:=高-(高-低)*0.618;
H80:=高-(高-低)*0.809;
顶点:REFDATE(高,DATE),POINTDOT,COLORWHITE;
疯牛:=REFDATE(H19,DATE),POINTDOT,COLORYELLOW;
突破:REFDATE(H38,DATE),POINTDOT,COLORMAGENTA;
平衡:REFDATE(H中,DATE),POINTDOT,COLORRED;
回落:REFDATE(H61,DATE),POINTDOT,COLORGREEN;
低点:=REFDATE(低,DATE),POINTDOT,COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点,顶点),COLORWHITE;
DRAWTEXT(ISLASTBAR,低点,低点),COLORWHITE;
{主图资金模块}
超B:=L2_AMO(0,2)/1000.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;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
JGV:=(L2_VOL(0,0) - L2_VOL(0,1))*VOL/100000000,COLORRED;
DHV:=(L2_VOL(1,0) - L2_VOL(1,1))*VOL/100000000,COLORFF00FF;
ZHV:=(L2_VOL(2,0) - L2_VOL(2,1))*VOL/100000000,COLOR00FFFF;
SHV:=(L2_VOL(3,0) - L2_VOL(3,1))*VOL/100000000,COLORFFFFFF;
大量博弈:=(JGV+DHV),COLORYELLOW,NODRAW;
大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S);
大宗进:=(超B)+(大B);
大宗出:=(超S)+(大S);
非大宗进:=(中B)+(小B);
非大宗出:=(中S)+(小S);
成交总量:=(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW;
{右上角横柱}
主买A:=ACTINVOL,COLORRED,NODRAW;
主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;
主买:主买A*100/(主买A+主卖A),NODRAW,COLORRED;
主卖:主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;
大单流入:=(超B+大B)/(超B+大B+超S+大S)*100,NODRAW;
大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入);
DRAWRECTREL(650,60,885,120,RGB(0,100,0));
DRAWRECTREL(650,60,885,120,RGB(0,150,150));
DRAWRECTREL(650,60,650+CONST(大单流入限制*235/100),120,RGB(200,0,50));
DRAWTEXT_FIX(1,0.565,0.06,0,STRCAT(STRCAT('大单流入比 ',CON2STR(大单流入限制,2)),'%')),COLORYELLOW;
大单强度:=(超B+大B-超S-大S)/成交总量*100,COLORYELLOW,NODRAW;
大单强度限制:=IF(大单强度<=0,ABS(大单强度),IF(大单强度>=100,100,大单强度));
DRAWRECTREL(650,130,885,190,RGB(0,100,0));
DRAWRECTREL(650,130,885,190,RGB(0,250,50));
DRAWRECTREL(650,130,650+CONST(大单强度限制*235/100),190,RGB(175,50,250));
DRAWTEXT_FIX(1,0.565,0.136,0,STRCAT(STRCAT('大单强度比 ',CON2STR(大单强度,2)),'%')),COLORYELLOW;
总流入比:=(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;
DRAWRECTREL(650,200,885,260,RGB(0,100,0));
DRAWRECTREL(650,200,885,260,RGB(0,150,150));
DRAWRECTREL(650,200,650+CONST(总流入比*235/100),260,RGB(200,0,50));
DRAWTEXT_FIX(1,0.565,0.206,0,STRCAT(STRCAT('资金流入比 ',CON2STR(总流入比,2)),'%')),COLORYELLOW;
MVR:=REF(MA(V,5),1);
FVR:=REF(V,1);
PVR:=(MVR+FVR)/2;
资金量能比:=V/(V+PVR)*100/FROMOPEN*240;
DRAWRECTREL(650,270,885,330,RGB(0,100,0));
DRAWRECTREL(650,270,885,330,RGB(0,250,50));
DRAWRECTREL(650,270,650+CONST(资金量能比*235/100),330,RGB(175,50,250));
DRAWTEXT_FIX(1,0.565,0.276,0,STRCAT(STRCAT('资金量能比 ',CON2STR(资金量能比,2)),'%')),COLORYELLOW;
{左上角横柱}
主力买力度:=LARGEINTRDVOL*100/VOL,NODRAW;
主力卖力度:=LARGEOUTTRDVOL*100/VOL,NODRAW;
买卖力度比:=IF(主力买力度/主力卖力度*100>=100,100,IF(主力买力度/主力卖力度*100<=0,0,主力买力度/主力卖力度*100));
DRAWRECTREL(95,60,330,120,RGB(0,75,200));
DRAWRECTREL(95,60,330,120,RGB(0,150,150));
DRAWRECTREL(95,60,95+CONST(买卖力度比*235/100),120,RGB(200,0,50));
DRAWTEXT_FIX(1,0.013,0.06,0,STRCAT(STRCAT('买卖力度比 ',CON2STR(主力买力度/主力卖力度*100,2)),'%')),COLORYELLOW;
大量资金比:=大量博弈/(ABS(JGV)+ABS(DHV)+ABS(ZHV)+ABS(SHV))*100,COLORYELLOW,NODRAW;
大量资金比限制:=IF(大量资金比=0,-100,大量资金比);
大量强度比:=IF(大量资金比>0,(大量资金比限制+100)/2,IF(大量资金比<0,100-ABS((大量资金比限制-100)/2),0)),COLORGREEN,NODRAW;
DRAWRECTREL(95,130,330,190,RGB(0,75,220));
DRAWRECTREL(95,130,330,190,RGB(0,250,50));
DRAWRECTREL(95,130,95+CONST(大量强度比*235/100),190,RGB(175,50,250));
DRAWTEXT_FIX(1,0.013,0.136,0,STRCAT(STRCAT('大量强度比 ',CON2STR(大量强度比,2)),'%')),COLORYELLOW;
主买C:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;
DRAWRECTREL(95,200,330,260,RGB(0,75,200));
DRAWRECTREL(95,200,330,260,RGB(0,150,150));
DRAWRECTREL(95,200,95+CONST(主买C*235/100),260,RGB(200,0,50));
DRAWTEXT_FIX(1,0.013,0.206,0,STRCAT(STRCAT('主动买卖比 ',CON2STR(主买C,2)),'%')),COLORYELLOW;
机构参与度:=(超B+超S+大B+大S)/成交总量*100,COLORYELLOW,NODRAW;
DRAWRECTREL(95,270,330,330,RGB(0,75,220));
DRAWRECTREL(95,270,330,330,RGB(0,250,50));
DRAWRECTREL(95,270,95+CONST(机构参与度*235/100),330,RGB(175,50,250));
DRAWTEXT_FIX(1,0.013,0.276,0,STRCAT(STRCAT('机构参与度 ',CON2STR(机构参与度,2)),'%')),COLORYELLOW;
活跃度:=100*VOL/(FINANCE(7)/100)COLORYELLOW,NODRAW;
DRAWRECTREL(460,800,695,860,RGB(0,75,220));
DRAWRECTREL(460,800,695,860,RGB(0,250,50));
DRAWRECTREL(460,800,460+CONST(活跃度*235/100),860,RGB(255,147,38));
DRAWTEXT_FIX(1,0.41,0.81,0,STRCAT(STRCAT('活跃度 ',CON2STR(活跃度,2)),'%')),COLORYELLOW;
饱和度:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
DRAWRECTREL(460,870,695,930,RGB(0,75,220));
DRAWRECTREL(460,870,695,930,RGB(0,250,50));
DRAWRECTREL(460,870,460+CONST(饱和度*235/100),930,RGB(255,147,38));
DRAWTEXT_FIX(1,0.41,0.876,0,STRCAT(STRCAT('饱和度 ',CON2STR(饱和度,2)),'%')),COLORYELLOW;
{左下角竖柱}
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(20,CONST(950-(ABS(净流入)*250/DAZHIV)),60,950,IF(CONST(净流入)>0,RGB(250,0,0),RGB(0,250,0)));
DRAWRECTREL(85,CONST(950-(ABS(大宗进)*250/DAZHIV)),125,950,IF(CONST(大宗进)>0,RGB(255,0,255),RGB(0,0,50)));
DRAWRECTREL(150,CONST(950-(ABS(大宗出)*250/DAZHIV)),190,950,IF(CONST(大宗出)>0,RGB(50,50,255),RGB(255,0,0)));
DRAWRECTREL(215,CONST(950-(ABS(非大宗进)*250/DAZHIV)),255,950,IF(CONST(非大宗进)>0,RGB(250,0,250),RGB(0,0,50)));
DRAWRECTREL(280,CONST(950-(ABS(非大宗出)*250/DAZHIV)),320,950,IF(CONST(非大宗出)>0,RGB(50,50,250),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.00,1,0,' 资金驱动 主力进 主力出 散户进 散户出'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.68,0,'净流入'),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.02,0.88,0,INTPART(净流入)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.085,0.88,0,INTPART(大宗进)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.150,0.88,0,INTPART(大宗出)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.215,0.88,0,INTPART(非大宗进)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.278,0.88,0,INTPART(非大宗出)),COLORWHITE;
{画涨停板}
AA:=FRACPART(10*REF(CLOSE,1));
BB:=IF(AA>=0.5,AA+0.1,AA);
CC:=0.01*INTPART(10*REF(CLOSE,1))+0.01*ROUND(BB);
涨停板:=REF(CLOSE,1)+CC;
STICKLINE(CLOSE=涨停板,OPEN,CLOSE,1,0),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:FINANCE
该公式包含未来函数:DVOL
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
买线赋值:C的2日指数移动平均
卖线赋值:EMA(SLOPE(C,21)*20+C,60)
BU赋值:买线上穿卖线
SEL赋值:卖线上穿买线
当满足条件BU时,在L-0.1和1之间画图标
当满足条件SEL时,在H+0.1和2之间画图标
当满足条件买线>=卖线时,在最低价和最高价之间画柱状线
当满足条件买线>=卖线时,在收盘价和开盘价之间画柱状线
当满足条件买线<卖线时,在最低价和最高价之间画柱状线
当满足条件买线<卖线时,在收盘价和开盘价之间画柱状线
输出操盘线:收盘价的9日简单移动平均,画黄色
输出界点线:收盘价的20日简单移动平均,画洋红色
高赋值:REF(80日内H最高值,3)
低赋值:REF(80日内L最低值,3)
H19赋值:高-(高-低)*0.191
H38赋值:高-(高-低)*0.382
H中赋值:高-(高-低)*0.5
H61赋值:高-(高-低)*0.618
H80赋值:高-(高-低)*0.809
输出顶点:REFDATE(高,DATE),POINTDOT,画白色
疯牛赋值:REFDATE(H19,DATE),POINTDOT,画黄色
输出突破:REFDATE(H38,DATE),POINTDOT,画洋红色
输出平衡:REFDATE(H中,DATE),POINTDOT,画红色
输出回落:REFDATE(H61,DATE),POINTDOT,画绿色
低点:=REFDATE(低,DATE),POINTDOT,画白色
当满足条件ISLASTBAR时,在顶点和顶点位置书写文字
当满足条件ISLASTBAR时,在低点和低点位置书写文字
{主图资金模块}
超B赋值:L2_AMO(0,2)/1000.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
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0)
JGV赋值:(L2_成交量(0,0) - L2_成交量(0,1))*成交量/100000000,画红色
DHV赋值:(L2_成交量(1,0) - L2_成交量(1,1))*成交量/100000000,COLORFF00FF
ZHV赋值:(L2_成交量(2,0) - L2_成交量(2,1))*成交量/100000000,COLOR00FFFF
SHV赋值:(L2_成交量(3,0) - L2_成交量(3,1))*成交量/100000000,COLORFFFFFF
大量博弈赋值:(JGV+DHV),画黄色,NODRAW
大宗净流入赋值:(超B+大B)-(超S+大S),画红色,NODRAW
净流入赋值:(超B+大B+中B+小B)-(超S+大S+中S+小S)
大宗进赋值:(超B)+(大B)
大宗出赋值:(超S)+(大S)
非大宗进赋值:(中B)+(小B)
非大宗出赋值:(中S)+(小S)
成交总量赋值:(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW
{右上角横柱}
主买A赋值:ACTIN成交量,画红色,NODRAW
主卖A赋值:ACTOUT成交量,画绿色,NODRAW
输出主买:主买A*100/(主买A+主卖A),NODRAW,画红色
输出主卖:主卖A*100/(主买A+主卖A),NODRAW,画绿色
大单流入赋值:(超B+大B)/(超B+大B+超S+大S)*100,NODRAW
大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入)
DRAWRECTREL(650,60,885,120,RGB(0,100,0))
DRAWRECTREL(650,60,885,120,RGB(0,150,150))
DRAWRECTREL(650,60,650+CONST(大单流入限制*235/100),120,RGB(200,0,50))
DRAWTEXT_FIX(1,0.565,0.06,0,STRCAT(STRCAT('大单流入比 ',CON2STR(大单流入限制,2)),'%')),画黄色
大单强度赋值:(超B+大B-超S-大S)/成交总量*100,画黄色,NODRAW
大单强度限制:=IF(大单强度<=0,大单强度的绝对值,IF(大单强度>=100,100,大单强度))
DRAWRECTREL(650,130,885,190,RGB(0,100,0))
DRAWRECTREL(650,130,885,190,RGB(0,250,50))
DRAWRECTREL(650,130,650+CONST(大单强度限制*235/100),190,RGB(175,50,250))
DRAWTEXT_FIX(1,0.565,0.136,0,STRCAT(STRCAT('大单强度比 ',CON2STR(大单强度,2)),'%')),画黄色
总流入比赋值:(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW
DRAWRECTREL(650,200,885,260,RGB(0,100,0))
DRAWRECTREL(650,200,885,260,RGB(0,150,150))
DRAWRECTREL(650,200,650+CONST(总流入比*235/100),260,RGB(200,0,50))
DRAWTEXT_FIX(1,0.565,0.206,0,STRCAT(STRCAT('资金流入比 ',CON2STR(总流入比,2)),'%')),画黄色
MVR赋值:REF(V的5日简单移动平均,1)
FVR赋值:1日前的V
PVR赋值:(MVR+FVR)/2
资金量能比赋值:V/(V+PVR)*100/FROM开盘价*240
DRAWRECTREL(650,270,885,330,RGB(0,100,0))
DRAWRECTREL(650,270,885,330,RGB(0,250,50))
DRAWRECTREL(650,270,650+CONST(资金量能比*235/100),330,RGB(175,50,250))
DRAWTEXT_FIX(1,0.565,0.276,0,STRCAT(STRCAT('资金量能比 ',CON2STR(资金量能比,2)),'%')),画黄色
{左上角横柱}
主力买力度赋值:LARGEINTRD成交量*100/成交量,NODRAW
主力卖力度赋值:LARGEOUTTRD成交量*100/成交量,NODRAW
买卖力度比赋值:IF(主力买力度/主力卖力度*100>=100,100,IF(主力买力度/主力卖力度*100<=0,0,主力买力度/主力卖力度*100))
DRAWRECTREL(95,60,330,120,RGB(0,75,200))
DRAWRECTREL(95,60,330,120,RGB(0,150,150))
DRAWRECTREL(95,60,95+CONST(买卖力度比*235/100),120,RGB(200,0,50))
DRAWTEXT_FIX(1,0.013,0.06,0,STRCAT(STRCAT('买卖力度比 ',CON2STR(主力买力度/主力卖力度*100,2)),'%')),画黄色
大量资金比赋值:大量博弈/(JGV的绝对值+ABS(DHV)+ABS(ZHV)+ABS(SHV))*100,画黄色,NODRAW
如果大量资金比=0返回-100否则返回大量资金比
大量强度比赋值:IF(大量资金比>0,(大量资金比限制+100)/2,IF(大量资金比<0,100-(大量资金比限制-100的绝对值/2),0)),画绿色,NODRAW
DRAWRECTREL(95,130,330,190,RGB(0,75,220))
DRAWRECTREL(95,130,330,190,RGB(0,250,50))
DRAWRECTREL(95,130,95+CONST(大量强度比*235/100),190,RGB(175,50,250))
DRAWTEXT_FIX(1,0.013,0.136,0,STRCAT(STRCAT('大量强度比 ',CON2STR(大量强度比,2)),'%')),画黄色
主买C:=主买A*100/(主买A+主卖A),NODRAW,画红色
DRAWRECTREL(95,200,330,260,RGB(0,75,200))
DRAWRECTREL(95,200,330,260,RGB(0,150,150))
DRAWRECTREL(95,200,95+CONST(主买C*235/100),260,RGB(200,0,50))
DRAWTEXT_FIX(1,0.013,0.206,0,STRCAT(STRCAT('主动买卖比 ',CON2STR(主买C,2)),'%')),画黄色
机构参与度赋值:(超B+超S+大B+大S)/成交总量*100,画黄色,NODRAW
DRAWRECTREL(95,270,330,330,RGB(0,75,220))
DRAWRECTREL(95,270,330,330,RGB(0,250,50))
DRAWRECTREL(95,270,95+CONST(机构参与度*235/100),330,RGB(175,50,250))
DRAWTEXT_FIX(1,0.013,0.276,0,STRCAT(STRCAT('机构参与度 ',CON2STR(机构参与度,2)),'%')),画黄色
活跃度赋值:100*成交量/(FINANCE(7)/100)画黄色,NODRAW
DRAWRECTREL(460,800,695,860,RGB(0,75,220))
DRAWRECTREL(460,800,695,860,RGB(0,250,50))
DRAWRECTREL(460,800,460+CONST(活跃度*235/100),860,RGB(255,147,38))
DRAWTEXT_FIX(1,0.41,0.81,0,STRCAT(STRCAT('活跃度 ',CON2STR(活跃度,2)),'%')),画黄色
饱和度赋值:IF((成交额/C)/(20日内成交额最高值/20日内C最高值)*100>100,100,(成交额/C)/(20日内成交额最高值/20日内C最高值)*100)
DRAWRECTREL(460,870,695,930,RGB(0,75,220))
DRAWRECTREL(460,870,695,930,RGB(0,250,50))
DRAWRECTREL(460,870,460+CONST(饱和度*235/100),930,RGB(255,147,38))
DRAWTEXT_FIX(1,0.41,0.876,0,STRCAT(STRCAT('饱和度 ',CON2STR(饱和度,2)),'%')),画黄色
{左下角竖柱}
DAZHIV赋值:CONST(MAX(大宗进的绝对值,MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW
DRAWRECTREL(20,CONST(950-(净流入的绝对值*250/DAZHIV)),60,950,IF(CONST(净流入)>0,RGB(250,0,0),RGB(0,250,0)))
DRAWRECTREL(85,CONST(950-(大宗进的绝对值*250/DAZHIV)),125,950,IF(CONST(大宗进)>0,RGB(255,0,255),RGB(0,0,50)))
DRAWRECTREL(150,CONST(950-(大宗出的绝对值*250/DAZHIV)),190,950,IF(CONST(大宗出)>0,RGB(50,50,255),RGB(255,0,0)))
DRAWRECTREL(215,CONST(950-(非大宗进的绝对值*250/DAZHIV)),255,950,IF(CONST(非大宗进)>0,RGB(250,0,250),RGB(0,0,50)))
DRAWRECTREL(280,CONST(950-(非大宗出的绝对值*250/DAZHIV)),320,950,IF(CONST(非大宗出)>0,RGB(50,50,250),RGB(255,0,0)))
当满足条件 到最后交易的周期=1时,在横轴0.00纵轴1位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.02纵轴0.68位置书写文字
DRAWNUMBER_FIX( 到最后交易的周期=1,0.02,0.88,0,INTPART(净流入)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.085,0.88,0,INTPART(大宗进)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.150,0.88,0,INTPART(大宗出)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.215,0.88,0,INTPART(非大宗进)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.278,0.88,0,INTPART(非大宗出)),画白色
{画涨停板}
AA赋值:FRACPART(10*1日前的收盘价)
如果AA>=0.5返回AA+0.1否则返回AA
CC赋值:0.01*INTPART(10*1日前的收盘价)+0.01*ROUND(BB)
涨停板赋值:1日前的收盘价+CC
当满足条件收盘价=涨停板时,在开盘价和收盘价之间画柱状线