公式用法说明:
源码上的小标题就是一种说明,这是一个很优秀的指标,100线上下的柱线显示资金进出情况,20线上灰白柱线提示散户筹码,彩色柱线提示主力筹码运行,从吸货拉升到出货(由蓝-黄-红-绿),散兵坑予示底部,20线下深蓝柱提示关注,亮红柱提示建仓。
三根线与柱线综合观察分析,可以获得极隹的买卖点
价量: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 Z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.5 ,0 ),COLOR0055FF;
{红}
STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50
AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,2.5,0 ),COLOR0000AA;
STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50
AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,1.5,0 ),COLOR0022CC;
STICKLINE(ZZLKP>ZZLJJ AND ZZLJJ<50 AND ZZLKP>50
AND ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,0.5 ,0 ),COLOR0055FF;
{铸顶风险区}
{绿}
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;
LCC:=FILTER(LQY,NB) AND H=HHV(H,NB+1);
LDDD:=BARSLAST(LCC);
LGDTS:=IF(LCC,CURR,0);
LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}
LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);
LDINGBU1:=REF(LDINGBU,LDDD+1);
LGDCS1:=CONST(LDINGBUTS);
LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);
LGDCS2:=CONST(LDINGBUTS1);
LAA1:=REF(L,NB)=LLV(L,2*NB+1);
LQY1:=BACKSET(LAA1,NB+1);
LCC1:=FILTER(LQY1,NB) AND L=LLV(L,NB+1);
LDD1:=BARSLAST(LCC1);
LDDTS:=IF(LCC1,CURR,0);
LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);
LDDCS1:=CONST(LDDTS1);
LDDTS2:=REF(LDDTS1,LDD1+1);
LDDCS2:=CONST(LDDTS2);
LLAA:=REF(H,NC)=HHV(H,2*NC+1);
LLQY:=BACKSET(LLAA,NC+1);
LLCC:=FILTER(LLQY,NC) AND H=HHV(H,NC+1);
LLDDD:=BARSLAST(LLCC);
LLGDTS:=IF(LLCC,CURR,0);
LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}
LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);
LLDINGBU1:=REF(LLDINGBU,LLDDD+1);
LLGDCS1:=CONST(LLDINGBUTS);
LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);
LLGDCS2:=CONST(LLDINGBUTS1);
LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);
LLAA1:=REF(L,NC)=LLV(L,2*NC+1);
LLQY1:=BACKSET(LLAA1,NC+1);
LLCC1:=FILTER(LLQY1,NC) AND L=LLV(L,NC+1);
LLDD1:=BARSLAST(LCC1);
LLDDTS:=IF(LLCC1,CURR,0);
LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);
LLDDCS1:=CONST(LLDDTS1);
LLDDTS2:=REF(LLDDTS1,LLDD1+1);
LLDDCS2:=CONST(LLDDTS2);
长G1:=CONST(DRAWLINE(CURR=GDCS1,H,REF(CURR,1)=GDCS1,REF(H,1),1));
长G2:=CONST(DRAWLINE(CURR=GDCS2,H,REF(CURR,1)=GDCS2,REF(H,1),1));
长D1:=CONST(DRAWLINE(CURR=DDCS1,L,REF(CURR,1)=DDCS1,REF(L,1),1));
长D2:=CONST(DRAWLINE(CURR=DDCS2,L,REF(CURR,1)=DDCS2,REF(L,1),1));
中G1:=CONST(DRAWLINE(CURR=LGDCS1,H,REF(CURR,1)=LGDCS1,REF(H,1),1));
中G2:=CONST(DRAWLINE(CURR=LGDCS2,H,REF(CURR,1)=LGDCS2,REF(H,1),1));
中D1:=CONST(DRAWLINE(CURR=LDDCS1,L,REF(CURR,1)=LDDCS1,REF(L,1),1));
中D2:=CONST(DRAWLINE(CURR=LDDCS2,L,REF(CURR,1)=LDDCS2,REF(L,1),1));
短G1:=CONST(DRAWLINE(CURR=LLGDCS1,H,REF(CURR,1)=LLGDCS1,REF(H,1),1));
短G2:=CONST(DRAWLINE(CURR=LLGDCS2,H,REF(CURR,1)=LLGDCS2,REF(H,1),1));
短D1:=CONST(DRAWLINE(CURR=LLDDCS1,L,REF(CURR,1)=LLDDCS1,REF(L,1),1));
短D2:=CONST(DRAWLINE(CURR=LLDDCS2,L,REF(CURR,1)=LLDDCS2,REF(L,1),1));
短G:=CONST(FINDHIGH(H,0,3,1));
短D:=CONST(FINDLOW(L,0,3,1));
XAM:=CONST(MAX(MAX(MAX(MAX(MAX(长G1,H),MAX(长G2,H)),MAX(MAX(中G1,H),MAX(中G2,H))),
MAX(MAX(短G1,H),MAX(短G2,H))),MAX(短G,H)));
XIM:=CONST(MIN(MIN(MIN(MIN(MIN(长D1,L),MIN(长D2,L)),MIN(MIN(中D1,L),MIN(中D2,L))),
MIN(MIN(短D1,L),MIN(短D2,L))),MIN(短D,L)));
低天:=IF(长D1=XIM,DDCS1,IF(长D2=XIM,DDCS2,IF(中D1=XIM,LDDCS1,
IF(中D2=XIM,LDDCS2,IF(短D1=XIM,LLDDCS1,IF(短D=XIM,BARSLAST(短D=XIM)+1,LLDDCS2))))));
高天:=IF(长G1=XAM,GDCS1,IF(长G2=XAM,GDCS2,IF(中G1=XAM,LGDCS1,
IF(中G2=XAM,LGDCS2,IF(短G1=XAM,LLGDCS1,IF(短G=XAM,BARSLAST(短G=XAM)+1,LLGDCS2))))));
高低距:=CONST(XAM)-CONST(XIM);
天距:=(IF(高天>低天,高天,低天)-IF(高天>低天,低天,高天));
PR:=IF(高天>低天,高天,低天);
RN:=IF(高天>低天,CONST(XAM),CONST(XIM));
BX:=230/天距; BY:=100/高低距;
XW:=IF(CURR
YWA:=IF(XW
简睿:DRAWBAND(圆弧A,RGB(255,196,9),圆弧A,RGB(255,196,9)),DOTLINE;
YWC:=IF(XW<5.6*Y弧,SQRT(5.6*Y弧*5.6*Y弧-XW*XW)/10,0)/BY;
圆弧C:=IF(高天<低天,RN+YWC,RN-YWC),COLORYELLOW,DOTLINE;
简睿下:DRAWBAND(圆弧C,RGB(255,196,9),圆弧C,RGB(255,196,9)),DOTLINE;
YWK:=IF(XW<10*Y弧,SQRT(10*Y弧*10*Y弧-XW*XW)/10,0)/BY;
圆弧K:=IF(高天<低天,RN+YWK,RN-YWK),COLORYELLOW;
简睿中:DRAWBAND(圆弧K,RGB(255,196,9),圆弧K,RGB(255,196,9)),DOTLINE;
YWO:=IF(XW<15*Y弧,SQRT(15*Y弧*15*Y弧-XW*XW)/10,0)/BY;
圆弧O:=IF(高天<低天,RN+YWO,RN-YWO),COLORYELLOW,DOTLINE;
简睿高:DRAWBAND(圆弧O,RGB(255,196,9),圆弧O,RGB(255,196,9)),COLOR00FFFF,DOTLINE;
YWP:=IF(XW<16*Y弧,SQRT(16*Y弧*16*Y弧-XW*XW)/10,0)/BY,DOTLINE;
SY:=IF(XW<0.55*Y弧,SQRT(0.55*Y弧*0.55*Y弧-XW*XW),0)/BY;
震谱:IF(高天<低天,RN+SY,RN-SY),COLORFFFF00,DOTLINE;
SYF:=IF(XW<1.49*Y弧,SQRT(1.49*Y弧*1.49*Y弧-XW*XW),0)/BY,DOTLINE;
震谱高:IF(高天<低天,RN+SYF,RN-SYF),COLORFFFF00,DOTLINE;
量上线:DRAWLINE(XCX量<=LLV(XCX量,12),XCX量,XCX量>=HHV(XCX量,12),HHV(XCX量,12),0)
,COLOR00FFFF,LINETHICK1;
量下线:DRAWLINE(XCX量>=HHV(XCX量,12),XCX量,XCX量<=LLV(XCX量,12),LLV(XCX量,12),0)
,COLORFFCCCC,LINETHICK1;
{地量通达信源码}
地量A:=V<=REF(LLV(V,80),1),NODRAW,COLORGREEN;
STICKLINE(地量A,XCX量,REFDATE(LLV(L,250),DATE),2,0),COLOR00FFFF;