DRAWBAND(130,RGB(50,100,120),0,RGB(0,0,0));
TJTS:=ISLASTBAR;
主力筹码估算:=EMA(WINNER(CLOSE)*70,3);
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100;
市场总量:=MA(主力筹码估算+散户筹码估算,13);
散户警戒:EMA(散户套牢比率,89);
主力警戒:EMA(主力控盘比率,89);
SH8:=EMA(散户套牢比率,8);
DKB:=IF(主力控盘比率-REF(主力控盘比率,1)>散户套牢比率-REF(散户套牢比率,1),1,0);
价量:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
,COLOR00CCFF,NODRAW;
主线:=(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25)
,COLORCYAN,NODRAW;
快线:=(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25)
,COLOR55AAFF,NODRAW;
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
KK:=INTPART(K1);
DD:=INTPART(D1);
TFXXS:=KK+DD;{变异KD风险系数}
TGLXS:=(TFXXS-REF(TFXXS,1));{变异KD乖离系数:资金流向}
散兵坑:=IF(主力控盘比率75,主力控盘比率,0,1,0),COLOR00FFFF;
{红}
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR0000AA;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR0055FF;
{粉}
STICKLINE(TGLXSREF(TGLXS,1),100,TGLXS+100,2.5,0),COLORAA00BB;
STICKLINE(TGLXSREF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFF55BB;
{黄}
STICKLINE(TGLXS>0 AND TGLXS0 AND TGLXSREF(主力控盘比率,1) AND 主力控盘比率>20,主力控盘比率,20,0.5,0 ),COLOREE44BB;
{蓝}
STICKLINE(主力控盘比率20,主力控盘比率,20,2.5,0 ),COLORFF7700;
STICKLINE(主力控盘比率20,主力控盘比率,20,0.5 ,0 ),COLORFFFF55;
{亮红}
STICKLINE(主力控盘比率>REF(主力控盘比率,1) AND 主力控盘比率REF(主力控盘比率,1) AND 主力控盘比率主力警戒 AND 主力警戒>50,主力控盘比率,主力警戒,0.5 ,0 ),COLOR0055FF;
{红}
STICKLINE(主力控盘比率>主力警戒 AND 主力警戒50
AND 主力警戒>REF(主力警戒,1),主力控盘比率,50,2.5,0 ),COLOR0000AA;
STICKLINE(主力控盘比率>主力警戒 AND 主力警戒50
AND 主力警戒>REF(主力警戒,1),主力控盘比率,50,0.5 ,0 ),COLOR0055FF;
{铸顶风险区}
{蓝}
STICKLINE(主力控盘比率>80,主力控盘比率,主力控盘比率-(主力控盘比率-80)
/2,2.5,0),COLORAA0000;
{散兵坑}
STICKLINE(主力控盘比率90 AND 散户套牢比率REF(散户警戒,1),散户套牢比率,散户警戒,1,0),COLORAAAAAA;
{筑底散兵坑}
STICKLINE(散户套牢比率>=90,主力控盘比率,0,1,0),COLOR66FFCC;
{KD快线}
L1:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*120-10;
凤K:SMA(L1,3,1),COLOR0099CC,LINETHICK2;
凤D:SMA(凤K,3,1),COLOR7700AA,LINETHICK2;
快线,LINESTICK,COLORFF99FF;
{筹码总量}
ZCMZL2:市场总量,COLORGREEN,LINETHICK2;
{筹码总量上升}
IF(市场总量>REF(市场总量,1),市场总量,DRAWNULL),COLOR0066FF,LINETHICK2;
{增量资金}
DRAWTEXT(市场总量>REF(市场总量,1) AND SH8REF(市场总量,1) AND DKB=1,30
,’ 主力增仓 ‘),COLORRED;
DRAWTEXT(TJTS AND 市场总量>REF(市场总量,1) AND DKB=0,30,’ 主力减仓 ‘),COLORMAGENTA;
DRAWTEXT(TJTS AND 市场总量=REF(市场总量,1),110,’ 多空平衡 ‘),COLORGRAY;
DRAWTEXT(TJTS AND 市场总量75,50,’ 铸顶风险区 ‘),COLORCYAN;
DRAWTEXT(TJTS AND CROSS(市场总量,主力警戒) AND 主力控盘比率>主力警戒
AND 主力控盘比率>10 AND 主力警戒>REF(主力警戒,1)
AND 市场总量>REF(市场总量,1),50,’ 穿越主力 ‘),COLORRED;
DRAWTEXT(TJTS AND CROSS(市场总量,主力控盘比率)
AND 主力控盘比率>主力警戒 AND 主力控盘比率10 AND 主力警戒>REF(主力警戒,1)
AND 市场总量>REF(市场总量,1),50,’ 穿越主力 ‘),COLORYELLOW;
DRAWTEXT(TJTS AND CROSS(市场总量,散户套牢比率)
AND 散户套牢比率>主力控盘比率
AND 市场总量>REF(市场总量,1),50,’ 穿越散户 ‘),COLORGREEN;
DRAWTEXT(TJTS AND CROSS(市场总量,100)
AND 市场总量>REF(市场总量,1),50,’ 全盘穿越 ‘),COLOR3399FF;
{
选股公式:
TJTS:=ISLASTBAR;
主力筹码估算:=EMA(WINNER(CLOSE)*70,3);
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100;
DKB:=IF(主力控盘比率-REF(主力控盘比率,1)>散户套牢比率-REF(散户套牢比率,1),1,0);
市场总量:=MA(主力筹码估算+散户筹码估算,13);
主力增仓:TJTS AND 市场总量>REF(市场总量,1) AND DKB=1;
}