ihzx 发表于 2021-8-21 14:01:34

大智慧L2资金流向指标公式

<p>{☆背景设置}<br />
DRAWGBKLAST(v&gt;1,STRIP(RGB(00,0,0),RGB(90,90,90),0));</p>
<p>{☆资金流向}<br />
{//&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;【参数定义】}<br />
ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}<br />
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//散户筹码估算}<br />
ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//散户套牢筹码比率}<br />
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}<br />
ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}<br />
ZZNTS:=BARSLAST(ZSHTL&lt;90 AND REF(ZSHTL,1)&gt;90);{//走牛天数}<br />
ZSHJJ:=EMA(ZSHTL,89);{//散户警戒}<br />
ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}<br />
ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}<br />
SH8:=EMA(ZSHTL,8);<br />
DKB:=IF(ZZLKP-REF(ZZLKP,1)&gt;ZSHTL-REF(ZSHTL,1),1,0);</p>
<p>{//&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;【数值显示】}<br />
散户套牢系数:INTPART(ZSHTL),LINETHICK0,COLORWHITE;<br />
主力控盘系数:INTPART(ZZLKP),LINETHICK0,COLORCYAN;<br />
资金流入强度:ZJLRQD,LINETHICK0,COLORRED;<br />
市场筹码总量:INTPART(ZCMZL),LINETHICK0,COLORGREEN;</p>
<p>{//&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;【图解模板】}<br />
{神秘黑洞}<br />
FILLRGN(ZSHTL,0,REF(ZSHTL,1)&gt;90 AND ZSHTL&lt;90),COLOR9966FF;<br />
{散户套牢筹码}<br />
STICKLINE(C&gt;0,ZSHTL,ZZLKP,0,0),COLOREEEEEE;<br />
{散户筹码警戒}<br />
STICKLINE(ZSHJJ&gt;REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),COLORaaaaaa;<br />
{散户线}<br />
PARTLINE(ZSHTL,C&gt;0),POINTDOT,COLORYELLOW;<br />
{主力控盘筹码}<br />
STICKLINE(C&gt;0,ZZLKP,0,7,0),COLORBLUE;<br />
{铸顶风险区}<br />
STICKLINE(ZZLKP&gt;75,ZZLKP,0,7,0),COLORFFFFFF;<br />
{主力筹码警戒}<br />
STICKLINE(ZZLJJ&gt;REF(ZZLJJ,1),ZZLKP,ZZLJJ,7,0),COLORRED;<br />
{筑底散兵坑}<br />
STICKLINE(ZSHTL&gt;=90,ZZLKP,0,7,0),COLOR66FFCC;<br />
{筹码总量}<br />
PARTLINE(ZCMZL,C&gt;0),COLORGREEN;<br />
{筹码总量上升}<br />
PARTLINE(ZCMZL,ZCMZL&gt;REF(ZCMZL,1)),COLOR0066FF;<br />
{增量资金}<br />
DRAWTEXT(ZCMZL&gt;REF(ZCMZL,1) AND SH8&lt;REF(SH8,1) AND BARSTATUS=2,ZCMZL,'&larr;增量资金');<br />
{//------【解盘分析】}<br />
TJTS:=BARSTATUS=2;<br />
DRAWTEXT(TJTS and C&gt;0,130,'资金流向分析                               '),LINETHICK6,Coloryellow,ALIGN2;<br />
DRAWTEXT(TJTS and C&gt;0,130,'   '+STKLABEL+' '+STKNAME+'                   '),LINETHICK6,ColorFFFF80,ALIGN2;<br />
DRAWTEXT(TJTS and C&gt;0,128,'         '+ '走牛天数判断:'+' '+NUMTOSTRN( ZZNTS,0 )+'       '),LINETHICK3,ColorFFFF80,ALIGN2;<br />
{主力动向监控}<br />
DRAWTEXT(TJTS and ZCMZL&gt;REF(ZCMZL,1) AND DKB=1,110,'主力动向监控:主力增仓                                                                   '),COLORRED,ALIGN2;<br />
DRAWTEXT(TJTS and ZCMZL&gt;REF(ZCMZL,1) AND DKB=0,110,'主力动向监控:主力减仓                                                                   '),COLORMAGENTA,ALIGN2;<br />
DRAWTEXT(TJTS and ZCMZL=REF(ZCMZL,1),110,'主力动向监控:多空平衡                                                                   '),COLORGRAY,ALIGN2;<br />
DRAWTEXT(TJTS and ZCMZL&lt;REF(ZCMZL,1) AND DKB=1,110,'主力动向监控:主力回补                                                                   '),COLORFF9933,ALIGN2;<br />
DRAWTEXT(TJTS and ZCMZL&lt;REF(ZCMZL,1) AND DKB=0,110,'主力动向监控:主力出逃                                                                   '),COLORGREEN,ALIGN2;<br />
{特别信号提示}<br />
DRAWTEXT(TJTS and ZSHTL&gt;90,100,'特别信号提示:筑底散兵坑                                                                   '),COLOR66FFCC,ALIGN2;<br />
DRAWTEXT(TJTS and ZZLKP&gt;75,100,'特别信号提示:铸顶风险区                                                               '),COLORCYAN,ALIGN2;<br />
DRAWTEXT(TJTS and CROSS(ZCMZL,ZZLJJ) AND ZZLKP&gt;ZZLJJ AND ZZLKP&gt;10 AND ZZLJJ&gt;REF(ZZLJJ,1) AND ZCMZL&gt;REF(ZCMZL,1),100,'特别信号提示:穿越主力                                                                   '),COLORRED,ALIGN2;<br />
DRAWTEXT(TJTS and CROSS(ZCMZL,ZZLKP) AND ZZLKP&gt;ZZLJJ AND ZZLKP&lt;ZSHTL AND ZZLKP&gt;10 AND ZZLJJ&gt;REF(ZZLJJ,1) AND ZCMZL&gt;REF(ZCMZL,1),100,'特别信号提示:穿越主力                                                                   '),COLORYELLOW,ALIGN2;<br />
DRAWTEXT(TJTS and CROSS(ZCMZL,ZSHTL) AND ZSHTL&gt;ZZLKP AND ZCMZL&gt;REF(ZCMZL,1),100,'特别信号提示:穿越散户                                                                   '),COLORGREEN,ALIGN2;<br />
DRAWTEXT(TJTS and CROSS(ZCMZL,100) AND ZCMZL&gt;REF(ZCMZL,1),100,'特别信号提示:全盘穿越                                                                   '),COLOR3399FF,ALIGN2;<br />
DRAWTEXT(TJTS and REF(ZSHTL,1)&gt;90 AND ZSHTL&lt;90,100,'特别信号提示:神秘黑洞                                                                   '),COLOR9966FF,ALIGN2;</p>
<p>&nbsp;</p>
<p>{☆背景设置}<br />
{DRAWGBK(C=C,COLORRGB(130,130,130),COLORRGB(30,30,30),1);}<br />
DRAWGBKLAST(v&gt;1,STRIP(RGB(130,130,130),RGB(30,30,30),0));<br />
{☆精确风险}<br />
{//------【参数定义】}<br />
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;<br />
K1:=SMA(RSV,10,1);<br />
D1:=SMA(K1,5,1);<br />
KK:=INTPART(K1);<br />
DD:=INTPART(D1);<br />
TFXXS:=KK+DD;{//变异KD风险系数}<br />
TGLD:=MOD(TFXXS,10);{//踏浪涨停概率点}<br />
TGLXS:=(TFXXS-REF(TFXXS,1))*10;{//变异KD乖离系数}<br />
TYCFX:=TFXXS+TGLXS;{//变异KD预测风险}</p>
<p>{//------【数值显示】}<br />
风险系数:TFXXS,LINETHICK0,COLORYELLOW;<br />
乖离系数:TGLXS,LINETHICK0,COLORGREEN;<br />
预测风险:TYCFX,LINETHICK0,COLORCYAN;</p>
<p>{//------【图解模板】}<br />
{级别拐点}<br />
VERTLINE(TGLXS&gt;0 AND 100+TGLXS&lt;TYCFX AND 100+REF(TGLXS,1)&gt;=REF(TYCFX,1),1),COLORYELLOW;<br />
VERTLINE(TGLXS&lt;0 AND 100+TGLXS&gt;=TYCFX AND 100+REF(TGLXS,1)&lt;REF(TYCFX,1),1),COLORYELLOW;<br />
{乖离系数}<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,8,0),COLOR000088;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,7,0),COLOR000099;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,6,0),COLOR0000AA;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,5,0),COLOR0000BB;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,4,0),COLOR0000CC;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,3,0),COLOR0000DD;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,2,0),COLOR0000EE;<br />
STICKLINE(TGLXS&gt;0,100,100+TGLXS,1,0),COLOR0000FF;{//红柱}<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,8,0),COLOR008800;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,7,0),COLOR009900;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,6,0),COLOR00AA00;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,5,0),COLOR00BB00;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,4,0),COLOR00CC00;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,3,0),COLOR00DD00;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,2,0),COLOR00EE00;<br />
STICKLINE(TGLXS&lt;0,100,100+TGLXS,1,0),COLOR00FF00;{//绿柱}<br />
STICKLINE(TGLXS=0 AND REF(TGLXS,1)&gt;=0,100,100+TGLXS,8,0),COLORRED;<br />
STICKLINE(TGLXS=0 AND REF(TGLXS,1)&lt;0,100,100+TGLXS,8,0),COLORGREEN;<br />
{风险系数}<br />
PARTLINE(TFXXS,TFXXS&lt;160 AND TFXXS&gt;50),LINETHICK2,COLORFF66FF;<br />
PARTLINE(TFXXS,TFXXS&gt;50 AND TFXXS&lt;160 AND TFXXS&lt;REF(TFXXS,1)),LINETHICK2,COLORWHITE;<br />
PARTLINE(TFXXS,TFXXS&lt;=50),LINETHICK2,COLORYELLOW;<br />
PARTLINE(TFXXS,TFXXS&gt;=160),LINETHICK2,COLORBLUE;<br />
{预测风险}<br />
PARTLINE(TYCFX,C&gt;0),COLORCYAN;</p>
<p>{//------【解盘分析】}<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&lt;=50,50,'操作风险提示:买入风险'),COLORYELLOW,ALIGN2;<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&gt;=160,50,'操作风险提示:卖出风险'),COLORCYAN,ALIGN2;<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&gt;50 AND TFXXS&lt;160 AND TFXXS&gt;=REF(TFXXS,1) AND TFXXS&lt;=100,50,'操作风险提示:追涨博弈'),COLORRED,ALIGN2;<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&gt;50 AND TFXXS&lt;160 AND TFXXS&gt;=REF(TFXXS,1) AND TFXXS&gt;100,50,'操作风险提示:稳健持股'),COLORMAGENTA,ALIGN2;<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&gt;50 AND TFXXS&lt;160 AND TFXXS&lt;REF(TFXXS,1) AND TFXXS&gt;100,50,'操作风险提示:盘跌减仓'),COLORWHITE,ALIGN2;<br />
DRAWTEXT(BARSTATUS=2 and TFXXS&gt;50 AND TFXXS&lt;160 AND TFXXS&lt;REF(TFXXS,1) AND TFXXS&lt;=100,50,'操作风险提示:杀跌空仓'),COLORGREEN,ALIGN2;</p>
<p></p>
<p>&nbsp;</p>
页: [1]
查看完整版本: 大智慧L2资金流向指标公式