您的位置:查股网 > 查股公式 > 通达信股海乾坤主图+主力筹码副图源码[查股公式]
股票行情消息查询:

通达信股海乾坤主图+主力筹码副图源码[查股公式]

2022/9/15 6:33:58

通达信股海乾坤主图+主力筹码副图源码

主图是一个优化过的BOll,这个不用讲大家也明白,副图是通达信高级版里面的指标,经过优化加入本人的一些理念用法如下:
首先说明这是一个很优秀的指标。
100线上下的柱线显示资金进出情况,20线上灰白柱线提示散户筹码,彩色柱线提示主力筹码运行,从吸货拉升到出货(由蓝-黄-红-绿),散兵坑予示底部,20线下深蓝柱提示关注,亮红柱提示建仓。
三根线与柱线综合观察分析,可以获得极隹的买卖点。

源码上的小标题已经很好的说明了,大家就慢慢琢磨吧!

{K线上下轨}
上轨:EMA(EMA(EMA(HHV(H,5),4),3),2)*1.03,COLORFFCC00,LINETHICK2;
下轨:EMA(EMA(EMA(LLV(L,5),4),3),2)*0.97,COLORLIMAGENTA,LINETHICK2;

{乾坤参数}
趋势线:EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
工作线:=EMA(CLOSE,3);
乾坤参数:=趋势线-工作线;
STICKLINE(乾坤参数>=0,工作线,趋势线,0,0),COLORCYAN;
STICKLINE(乾坤参数<0,工作线,趋势线,0,0),COLORMAGENTA;

{立体K线}
STICKLINE(C>O,H,L,0,0),COLORFFBBFF;
STICKLINE(C>O,O,C,3,0),COLOR0000AA;
STICKLINE(C>O,O,C,2,0),COLOR0000DD;
STICKLINE(C>O,O,C,1,0),COLOR0055FF;
STICKLINE(C>O,O,C,0.1,0),COLOR0088FF;
STICKLINE(C<O,H,L,0,0),COLOR00FF00;
STICKLINE(C<O,O,C,3,0),COLOR888800;
STICKLINE(C<O,O,C,2,0),COLORFFAA00;
STICKLINE(C<O,O,C,1,0),COLORFFCC00;
STICKLINE(C<O,O,C,0.1,0),COLORFFFF00;
STICKLINE(C<O,O,C,0,0),COLORFFFF58;
STICKLINE(C=REF(C,1),H,L,0,0),COLORFFFFFF;
STICKLINE(C=REF(C,1),O,C,3,0),COLOR888888;
STICKLINE(C=REF(C,1),O,C,2,0),COLORAAAAAA;
STICKLINE(C=REF(C,1),O,C,1,0),COLORCCCCCC;
STICKLINE(C=REF(C,1),O,C,0,0),COLORFFFFFF;

{k线类别}
VAR9Q:=C=HHV(C,4)AND (REF(C,1)>=REF(C,2)OR REF(C,1)>=REF(C,3))
OR REF(C,1)=HHV(C,4)AND CLOSE>=REF(C,2)OR REF(C,2)=HHV(C,4)
AND REF(C,3)=LLV(C,4)AND C>=REF(C,1)OR REF(C,3)=HHV(C,4)AND C>=REF(C,1)
AND C>=REF(C,2);
红持:=VAR9Q;
STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR000088;
STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR0000AA;
STICKLINE(VAR9Q,C,(O+C)/2,1,0),COLOR0000BB;
STICKLINE(VAR9Q,C,(O+C)/2,0.1,0),COLOR0000FF;
VARAQ:=C=HHV(C,4)AND REF(C,1)=LLV(C,4);
粉变:=VARAQ;
STICKLINE(VARAQ,C,(O+C)/2,3,0),COLOR981198;
STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORCC55CC;
STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFF99FF;
STICKLINE(VARAQ,C,(O+C)/2,0.1,0),COLORFFDDFF;
VARBQ:=C=LLV(C,4)AND(REF(C,1)<REF(C,2)OR REF(C,1)<REF(C,3))
OR REF(C,1)=LLV(C,4)AND C<REF(C,2)OR REF(C,2)=LLV(C,4)

AND REF(C,1)!=HHV(C,4)AND C<REF(C,1)OR REF(C,3)=LLV(C,4)AND C<REF(C,1)
AND C<REF(C,2);
灰跌:=VARBQ;
STICKLINE(VARBQ AND C>O,O,C-(C-O)/2,3,0),COLOR888888;
STICKLINE(VARBQ AND C>O,O,C-(C-O)/2,2,0),COLORAAAAAA;
STICKLINE(VARBQ AND C>O,O,C-(C-O)/2,1,0),COLORCCCCCC;
STICKLINE(VARBQ AND C>O,O,C-(C-O)/2,0.1,0),COLORFFFFFF;
STICKLINE(VARBQ AND C<O,C,O-(O-C)/2,3,0),COLOR888888;
STICKLINE(VARBQ AND C<O,C,O-(O-C)/2,2,0),COLORAAAAAA;
STICKLINE(VARBQ AND C<O,C,O-(O-C)/2,1,0),COLORCCCCCC;
STICKLINE(VARBQ AND C<O,C,O-(O-C)/2,0.1,0),COLORFFFFFF;
VARCQ:=REF(C,1)=LLV(C,4)AND C>=REF(C,2)OR REF(C,2)=LLV(C,4)
AND REF(C,1)<=REF(C,3)AND REF(C,2)<REF(C,4)AND C>=REF(C,1); 绿买:=VARCQ;

STICKLINE(VARCQ,O,(O+C)/2,3,0),COLOR008800;
STICKLINE(VARCQ,O,(O+C)/2,2,0),COLOR00AA00;
STICKLINE(VARCQ,O,(O+C)/2,1,0),COLOR00CC00;
STICKLINE(VARCQ,O,(O+C)/2,0.1,0),COLOR00FF00;
VARDQ:=REF(C,1)=HHV(C,4)AND C<REF(C,2)OR(REF(C,2)=HHV(C,4)
AND REF(C,1)>REF(C,3)OR REF(C,3)=HHV(C,4)AND REF(C,1)>REF(C,2))
AND REF(C,2)>=REF(C,4)AND C<REF(C,1);
蓝抛:=VARDQ;
STICKLINE(VARDQ,O,(O+C)/2,3,0),COLORFF5500;
STICKLINE(VARDQ,O,(O+C)/2,2,0),COLORFF8800;
STICKLINE(VARDQ,O,(O+C)/2,1,0),COLORFFAA00;
STICKLINE(VARDQ,O,(O+C)/2,0.1,0),COLORFFCC00;

{操盘线}
TF:IF(C<0,0,MA(IF(C<0,0,MA(CLOSE,3)),1)),LINETHICK2,COLORRED;
TC:IF(C<0,0,MA(IF(C<0,0,MA(CLOSE,3)),3)),LINETHICK2,COLORGREEN;

{主力筹码副图源码}
{价量线主线快线}
价量: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乖离系数:资金流向}

{红}
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,1.5,0),COLOR0022CC;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR0055FF;
{粉}
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORAA00BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORCC22BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFF55BB;
{黄}
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR00AAFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR00CCFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR00FFFF;
{蓝}
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORFF7700;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORFFAA22;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFFFF55;
STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,TGLXS+100,8,0),COLORBROWN;
STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,TGLXS+100,8,0),COLORWHITE;

ZLCM:=EMA(WINNER(CLOSE)*70,3);{主力筹码估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{散户筹码估算}
ZSHTL:=SHCM/(ZLCM+SHCM)*100;{散户套牢筹码系数}
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{主力控盘筹码系数}
ZSHJJ:=EMA(ZSHTL,55);{散户警戒}
ZZLJJ:=EMA(ZZLKP,55);{主力警戒}
散兵坑:IF(ZZLKP<=10,ZZLKP,ZZLKP),COLORMAGENTA,NODRAW;

{散户套牢筹码}
STICKLINE(C>0,ZSHTL,ZZLKP,2,0),COLOR808080;
{散户筹码警戒}
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),COLORC0C0C0;

{主力控盘筹码}
{粉}
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORAA00BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORCC22BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5,0 ),COLOREE44BB;
{蓝}
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORFF7700;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORFFAA22;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5 ,0 ),COLORFFFF55;
{亮红}
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLOR131FFD;
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

{铸顶风险区}
{绿}
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,2.5,0),COLOR00AA00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1.5,0),COLOR00CC00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,0.5,0),COLOR00FF00;

{散兵坑}
STICKLINE(ZZLKP<=10,ZZLKP,0,5,0),COLORDD00DD;

100,COLORGREEN;
80,COLORGREEN;
{0,COLORGREEN;}

{主线快线}
价量,COLOR0CC0FF,LINETHICK2;
主线,COLOR00FFAA,LINETHICK2;
快线,LINESTICK,COLORFF68DD;

相关文章列表
天天查股公式列表

股票公式分类

天天查股:股票行情消息 实时DDX在线 资金流向 千股千评 业绩报告 十大股东 最新消息 超赢数据 大小非解禁 停牌复牌 股票分红查询 股票评级报告
广告客服:315126368   843010021
天天查股网免费查股,本站内容与数据仅供参考,不构成投资建议,据此操作,风险自担,股市有风险,投资需谨慎。 沪ICP备15043930号-29