股民大家庭

标题: [飞狐]飞狐主力筹码源码公式 [打印本页]

作者: 我是一个兵    时间: 2009-11-22 13:18
标题: [飞狐]飞狐主力筹码源码公式
飞狐主力筹码源码公式:
DRAWGBK(v>1,COLORRGB(0,0,0),COLORRGB(40,80,100),1);
//---------------------------------------------------------
RSV2:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*50;
K13:=SMA(RSV2,3,1)+100-20;
D13:=SMA(K13,3,1);
J13:=3*K13-2*D13;
FILLRGN(K13>D13,K13,D13),COLORaa99cc;
FILLRGN(K13<=D13,K13,D13),Color008080;
FILLRGN(J13>K13,K13,J13),COLORBROWN;
FILLRGN(J13<=K13,K13,J13),COLORCYAN;
//---------------------------------------------------------
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))*5;//变异KD乖离系数:资金流向
TYCFX:=TFXXS+TGLXS;//变异KD预测风险
{红}
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,4,0 ),COLOR0000AA;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,3.5 ,0 ),COLOR0011BB;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,2.5,0 ),COLOr0022CC;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,1.5 ,0 ),COLOR0033DD;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,1 ,0 ),COLOR0044EE;
STICKLINE(TGLXS>0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,0.5 ,0 ),COLOR0055FF;
{粉}
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,4,0 ),COLORAA00BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,3.5 ,0 ),COLORBB11BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,2.5,0 ),COLORCC22BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,1.5,0 ),COLORDD33BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,1 ,0 ),COLOREE44BB;
STICKLINE(TGLXS<0 AND TGLXS>REF(TGLXS,1),100,100+TGLXS/5,0.5,0 ),COLORFF55BB;
{黄}
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,4,0 ),COLOR00AAFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,3.5,0 ),COLOR00BBFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,2.5,0 ),COLOR00CCFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,1.5,0 ),COLOR00DDFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,1,0 ),COLOR00EEFF;
STICKLINE(TGLXS>0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,0.5,0 ),COLOR00FFFF;
{蓝}
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,4,0 ),COLORFF7700;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,3.5 ,0 ),COLORFF8811;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,2.5,0 ),COLORFFAA22;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,1.5 ,0 ),COLORFFBB33;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,1 ,0 ),COLORFFDD44;
STICKLINE(TGLXS<0 AND TGLXS<=REF(TGLXS,1),100,100+TGLXS/5,0.5 ,0 ),COLORFFFF55;
STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,100+TGLXS,8,0),COLORBROWN;
STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,100+TGLXS,8,0),COLORWHITE;
动力:sma(ma((c-ref(c,1))/ref(c,1),5)*100,2,1)*8+100,LINETHICK,PRECISION2,ColorFF;
PARTLINE(动力>REF(动力,1),动力),ColorFF,LINETHICK2;
PARTLINE(动力<=REF(动力,1),动力),COLORGREEN,LINETHICK2;
STICKLINE(c>0,100,100,8,0),COLORGREEN,LINEDOT;
STICKLINE(c>0,80,80,8,0),COLORGREEN,LINEDOT;
//--------------------------------------------------
ZLCM:=EMA(WINNER(CLOSE)*70,3),PRECISION2;//主力筹码估算
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3),PRECISION2;//散户筹码估算
ZSHTL:=SHCM/(ZLCM+SHCM)*100,PRECISION2;//散户套牢筹码系数
ZZLKP:=ZLCM/(ZLCM+SHCM)*100,PRECISION2;//主力控盘筹码系数
ZCMZL:=MA(ZLCM+SHCM,13),PRECISION2;//市场趋势
ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90),PRECISION2;//走牛天数
ZSHJJ:=EMA(ZSHTL,55),PRECISION2;//散户警戒
ZZLJJ:=EMA(ZZLKP,55),PRECISION2;//主力警戒
ZJLRQD:=INTPART(ZZLKP-ZZLJJ),PRECISION2;//资金流入强度
SH8:=EMA(ZSHTL,8),PRECISION2;
DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);
//{观望区}
{{深蓝}
STICKLINE(C>0,20,0,4,0),Coloraa0000;
STICKLINE(C>0,20,0,3.5,0),Colorbb0000;
STICKLINE(C>0,20,0,2.5,0),Colorcc0000;
STICKLINE(C>0,20,0,1.5,0),Colordd0000;
STICKLINE(C>0,20,0,1,0),Coloree0000;
STICKLINE(C>0,20,0,0.5,0),Colorff0000;}
//散户套牢筹码
STICKLINE(C>0,ZSHTL,ZZLKP,0.1,0),Color808080;
//散户筹码警戒
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,3,0),Colorc0c0C0;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2.5,0),Colorc0c0aa;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),Colorc0c0bb;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),Colorc0c0cb;
STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,0.5,0),Colorc0c0dd;
//主力控盘筹码
{粉}
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,4,0 ),COLORAA00BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,3.5 ,0 ),COLORBB11BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,2.5,0 ),COLORCC22BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1.5,0 ),COLORDD33BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,1 ,0 ),COLOREE44BB;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP>20,ZZLKP,20,0.5,0 ),COLORFF55BB;
{蓝}
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,4,0 ),COLORFF7700;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,3.5 ,0 ),COLORFF8811;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,2.5,0 ),COLORFFAA22;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,1.5 ,0 ),COLORFFBB33;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,1 ,0 ),COLORFFDD44;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP>20 ,ZZLKP,20,0.5 ,0 ),COLORFFFF55;
{亮红}
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,4,0 ),color131ffd;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,3.5 ,0 ),color661ffd;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLOR5050FF;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5,0 ),COLOR5F5FFF;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1 ,0 ),COLOR6C6CFF;
STICKLINE(ZZLKP>REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5,0 ),COLOR7E7EFF;
{深蓝}
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,4,0 ),COLORaa0000;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,3.5 ,0 ),COLORbb0000;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,2.5,0 ),COLORcc0000;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1.5 ,0 ),COLORdd0000;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,1 ,0 ),COLORee0000;
STICKLINE(ZZLKP<=REF(ZZLKP,1) AND ZZLKP<20,ZZLKP,0,0.5 ,0 ),COLORFF0000;
//主力筹码警戒
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LKP,50,2.5,0 ),COLOr0022CC;
STICKLINE(ZZLKP>ZZLJJ and ZZLJJ<50 and ZZLKP>50 and ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,1.5 ,0 ),COLOR0033DD;
STICKLINE(ZZLKP>ZZLJJ and ZZLJJ<50 and ZZLKP>50 and ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,1 ,0 ),COLOR0044EE;
STICKLINE(ZZLKP>ZZLJJ and ZZLJJ<50 and ZZLKP>50 and ZZLJJ>REF(ZZLJJ,1),ZZLKP,50,0.5 ,0 ),COLOR0055FF;
//散兵坑
STICKLINE(ZZLKP<=10,ZZLKP,0,8,0),COLORMAGENTA;
//铸顶风险区
{绿}
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,4,0),coloraa00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,3.5,0),colorbb00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,2.5,0),colorcc00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1.5,0),colordd00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1,0),coloree00;
STICKLINE(ZZLKP>80,ZZLKP,ZZLKP-(ZZLKP-80)/2,0.5,0),colorff00;
DRAWTEXT(ZCMZL>REF(ZCMZL,1) AND SH8<REF(SH8,1) AND BARSTATUS=2,ZCMZL,'←\n资\n金\n增'),ALIGN0,Color00FFFF,SHIFT1;
DRAWTEXT(ZCMZL<=REF(ZCMZL,1) AND SH8>REF(SH8,1) AND BARSTATUS=2,ZCMZL,'←\n资\n金\n减'),ALIGN0,COLORGREEN,SHIFT1;

PARTLINE(c>0,20),COLORBLUE,LINETHICK2;
//--------------------------------------------------
散筹:(ZSHTL),PRECISION2,LINETHICK,COLORWHITE;
主筹:(ZZLKP),PRECISION2,LINETHICK0,COLORAA00BB;
长趋势:(ZCMZL),PRECISION2,LINETHICK0,ColorFF;
PARTLINE(C>0,ZZLJJ),LINEDOT,ColorC08080;
PARTLINE(ZCMZL<=REF(ZCMZL,1),ZCMZL),Color008080,LINETHICK2;
PARTLINE(ZCMZL>REF(ZCMZL,1),ZCMZL),colorff,LINETHICK2;
价量: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),ColorFF0080,PRECISION2,LINETHICK2;
主线:(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25),COLORCYAN,PRECISION2;
//短线:(((价量-LLV(价量,18))/(HHV(价量,18)-LLV(价量,18)))*(4))*(25),COLORWHITE,PRECISION2;
快线:(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25),Color0080FF,PRECISION2;
DRAWTEXT(ZZLKP<=10,15,'散\n兵\n坑'), COLORWHITE,ALIGN;

1346964_123.jpg (142.02 KB, 下载次数: 3)

1346964_123.jpg

作者: 君一笑    时间: 2015-2-1 18:19
谢谢分享




欢迎光临 股民大家庭 (https://gupiao168.com/) Powered by Discuz! X3.2