飞狐竹林老师的原创指标主图源码
-
相关简介:飞狐竹林老师的原创指标主图源码 INPUT:t(21,13,250),tt(21,1,100); {DRAWGBK(EMA((C+L+H)/3,6)EMA(EMA((C+L+H)/3,6),5), COLORRGB(100,50,0), COLORRGB(100,100,0),0); {涨变红} DRAWGBK(EMA((C+L+H)/3,6)EMA(EMA((C+L+H)/3,6),5), COLORRGB(0,110,0 ), COLORRGB(0,0,0),0); {跌变绿} {量价重心-
-
文章来源:股海网作者:股海网发布时间:2012-03-24浏览次数:
飞狐竹林老师的原创指标主图源码
INPUT:t(21,13,250),tt(21,1,100);
{DRAWGBK(EMA((C+L+H)/3,6)>EMA(EMA((C+L+H)/3,6),5), COLORRGB(100,50,0), COLORRGB(100,100,0),0); {涨变红}
DRAWGBK(EMA((C+L+H)/3,6)<EMA(EMA((C+L+H)/3,6),5), COLORRGB(0,110,0 ), COLORRGB(0,0,0),0); {跌变绿}
{量价重心-筹码分布}
W00:=COST(1);W10:=COST(10);W20:=COST(20);
W30:=COST(30);W40:=COST(40);W50:=COST(50);
W60:=COST(60);W70:=COST(70);W80:=COST(80);
W90:=COST(90);W100:=COST(99);
W5:=COST(5);W15:=COST(15);W25:=COST(25);
W35:=COST(35);W45:=COST(45);W55:=COST(55);
W65:=COST(65);W75:=COST(75);W85:=COST(85);W95:=COST(95);
C5:=W5-W00; C10:=W10-W5;C15:=W15-W10;C20:=W20-W15;C25:=W25-W20;
C30:=W30-W25;C35:=W35-W30;C40:=W40-W35;C45:=W45-W40;C50:=W50-W45;
C55:=W55-W50;C60:=W60-W55;C65:=W65-W60;C70:=W70-W65;C75:=W75-W70;
C80:=W80-W75;C85:=W85-W80;C90:=W90-W85;C95:=W95-W90;C100:=W100-W95;
ZX:=MIN(C5,MIN(C10,MIN(C15,MIN(C20,MIN(C25,MIN(C30,MIN(C35,MIN(C40,MIN(C45,MIN(C50,MIN(C55,MIN(C60,MIN(C65,MIN(C70,MIN(C75,MIN(C80,MIN(C85,MIN(C90,MIN(C95,C100))))))))))))))))))) LINETHICK0;
FILLRGN(ZX=C5,W00,W5) COLORGRAY;
FILLRGN(ZX=C10,W10,W5) COLORGRAY;FILLRGN(ZX=C15,W15,W10) COLORGRAY;FILLRGN(ZX=C20,W20,W15) COLORGRAY;
FILLRGN(ZX=C25,W25,W20) COLORGRAY;FILLRGN(ZX=C30,W30,W25) COLORGRAY;FILLRGN(ZX=C35,W35,W30) COLORGRAY;FILLRGN(ZX=C40,W40,W35) COLORGRAY;
FILLRGN(ZX=C45,W45,W40) COLORGRAY;FILLRGN(ZX=C50,W50,W45) COLORGRAY;FILLRGN(ZX=C55,W55,W50) COLORGRAY;FILLRGN(ZX=C60,W60,W55) COLORGRAY;
FILLRGN(ZX=C65,W65,W60) COLORGRAY;FILLRGN(ZX=C70,W70,W65) COLORGRAY;FILLRGN(ZX=C75,W75,W70) COLORGRAY;FILLRGN(ZX=C80,W80,W75) COLORGRAY;
FILLRGN(ZX=C85,W85,W70) COLORGRAY;FILLRGN(ZX=C90,W90,W85) COLORGRAY;FILLRGN(ZX=C95,W95,W90) COLORGRAY;FILLRGN(ZX=C100,W100,W95) COLORGRAY;
{三日转向}
Ay:=HHV(H,3);
By:=LLV(L,3);
kc:=c;
kh:=h;
kl:=l;
for i=1 to datacount do
IF kh[i]>ay[i-1] and kc[i]>kc[i-1] Then E[i]:=By[i];
ELSE IF kl[i]<by[i-1] and kc[i]<kc[i-1] Then E[i]:=Ay[i];
ELSE E[i]:=E[i-1];
PARTLINE(C,E),LINETHICK3,ColorC3C7C8;}//转向
{均线}
zq:=DATATYPE;
j:=(c*2+h+l)/4;
m:ema(ma(j,3),3),colorffffff;
mm:ema(m,t),color00ffff;
PARTLINE(m>ref(m,1),m),ColorE9D3F8,LINETHICK2;
PARTLINE(mm>ref(mm,1),mm),Color0089FF,LINETHICK2;
{{黄金分割}
n1:=sysparam(3);
n:=n1-sysparam(2)+1;
hh:=hhv(H,n);
ll:=llv(L,n);
最高:=hh[n1];
最低:=ll[n1];
低:最低+(最高-最低)*0.191,POINTDOT,PRECISION2,LINETHICK3,ColorFF8900;
中:最低+(最高-最低)*0.5,LINEDOT,PRECISION2,COLORMAGENTA;
高:最低+(最高-最低)*0.809,LINEDOT,PRECISION2,COLORRED;
{南山K线}
qp1:=wma(c,2);//短加权均线
bb1:=ema(qp1,2);//平滑
qp0:=ma(bb1,3);//平均
qp2:=wma((h+c+o)/3,18);//长加权均线
dd3:=qp0>=qp2 and c>qp2;//短>长,且收>长
dd4:=qp0<qp2 ;//短<长
dd5:=qp0>qp2 ;//短>长
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o<=c ,c,o,7,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;//跌势阴线
STICKLINE((dd4 or dd5) and o>=c ,c,o,7,0),Color3F8C3A;//跌势阴线
STICKLINE((dd3 or c>qp2) and o<=c,c,o,7,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>qp2) and o<=c,h,l,0.5,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>qp2) and o>=c,c,o,7,0),Colorff33ff;//涨势阴线
STICKLINE((dd3 or c>qp2) and o>=c,h,l,0.5,0),Colorff33ff;//涨势阴线
STICKLINE(MA(C,13)>O and C>MA(C,13) and O<c,O,C,8,0),coloryellow;//生命线
STICKLINE(MA(C,13)>O and C>MA(C,13),H,L,0.8,1),coloryellow;}//生命线
{个股大盘开关}
上证:=STRCMP(STKLABEL,'1A0001');
深证:=STRCMP(STKLABEL,'399001');
sb:=(上证=1 and 深证=1) or (上证=-1 and 深证=-1);//市场识别
{箱体}
a:=BARPOS;
a1:=SYSPARAM(1);
a2:=SYSPARAM(2);
a3:=SYSPARAM(3);
a4:=SYSPARAM(4);
a5:=SYSPARAM(5);
b:=DATACOUNT;
gd:=(a4-a5)/5;
g1:=hhv(h,tt);
gh:=g1[a1];
gg:=h=gh;
d2:=llv(l,tt*2);
dl2:=d2[a1];
dd2:=l=dl2;
d3:=llv(l,tt*4);
dl3:=d3[a1];
dd3:=l=dl3;
DRAWLINE(dd3,gh*0.98,gg,gh*0.98,0),color00babd,LINEDOT;
zx:=(dl2+gh)/2;
DRAWLINE(dd3,zx,gg,zx,0),color00babd,LINEDOT;
DRAWLINE(dd3,zx,gg,gh*0.98,0),color00babd,LINEDOT;
STICKLINE(dd3,zx*0.98,dl2,0,0),color00babd,LINEDOT;
DRAWLINE(dd3,dl2,gg,dl2,0),color00babd,LINEDOT;
{移动式120日均线}
上证:=STRCMP(STKLABEL,'1A0001');
深证:=STRCMP(STKLABEL,'399001');
sb:=(上证=1 and 深证=1) or (上证=-1 and 深证=-1);//市场识别
ssb:=IF(CAPITAL=0,sb=0,(sb=1 or sb=-1));
gxa4:=SYSPARAM(4);
gxa5:=SYSPARAM(5);
gd45:=(gxa4-gxa5)/5;
总量:=sum(if(BETWEEN(c,gxa4-0*gd45,gxa4-5*gd45),v,0),120);
总额:=sum(if(BETWEEN(c,gxa4-0*gd45,gxa4-5*gd45),AMOUNT,0),120);
dp:=sum(c,120)/120;//个股
df:=总额/总量/0.3;//大盘
PARTLINE(a1<=a,if(ssb,dp[DATACOUNT],df[DATACOUNT])),colorffbbff,SHIFT3;//120日均线
{实时}
DRAWBKBMP(zq=1or zq=0,'lsxz');
实时线:PARTLINE(zq=1or zq=0,c),colorffffff;
r:=OPENMINUTES(TIME);
fh:=IF(VOL=0,1,VOL);
分均:PARTLINE(zq=1or zq=0,sum(fh*c,r)/sum(fh,R)),color00ffff;
VERTLINE(IF(zq=1,r=120,0)),colorffff00,POINTDOT;
VERTLINE(IF(zq=1,r=240,0)),colorred;
go:=FORCAST(FORCAST(l,80),80);
PARTLINE(zq=1,"zb.zb#day"),color00ff00;
PARTLINE(zq=1or zq=0,go),colorred;
{解盘}
tj:=if(a>280,280,b);
hh:=hhv(H,tj);
ll:=llv(L,tj);
zh:=hh[a1];{新改动的}
zl:=ll[a1];{新改动的}
gq:=(zh-zl)/5;
ba1:=sum(if(between(c,zh-0*gq,zh-1*gq),v,0),tj);
ba2:=sum(if(between(c,zh-1*gq,zh-2*gq),v,0),tj);
ba3:=sum(if(between(c,zh-2*gq,zh-3*gq),v,0),tj);
ba4:=sum(if(between(c,zh-3*gq,zh-4*gq),v,0),tj);
ba5:=sum(if(between(c,zh-4*gq,zh-5*gq),v,0),tj);
gd1:=C<zh-0*gq AND C>=zh-1*gq;//高
gd2:=C<zh-1*gq AND C>=zh-2*gq;
gd3:=C<zh-2*gq AND C>=zh-3*gq;//中
gd4:=C<zh-3*gq AND C>=zh-4*gq;
gd5:=C<zh-4*gq AND C>=zh-5*gq;//低
{}
STICKLINE(BACKSET(a=a3,gd1),zh-0*gq,zh-1*gq,1,0),COLOR0000ff,LINETHICK3,SHIFT1;
STICKLINE(BACKSET(a=a3,gd2),zh-1*gq,zh-2*gq,1,0),COLORff00ff,LINETHICK3,SHIFT1;
STICKLINE(BACKSET(a=a3,gd3),zh-2*gq,zh-3*gq,1,0),COLOR00ffff,LINETHICK3,SHIFT1;
STICKLINE(BACKSET(a=a3,gd4),zh-3*gq,zh-4*gq,1,0),COLORffbb00,LINETHICK3,SHIFT1;
STICKLINE(BACKSET(a=a3,gd5),zh-4*gq,zh-5*gq,1,0),COLOR00ff00,LINETHICK3,SHIFT1;
DRAWTEXT(BACKSET(a=a3,gd1),zh-0*gq,'价\n高\n'),color0000ff,SHIFT2;
DRAWTEXT(BACKSET(a=a3,gd2),zh-1*gq,'价\n近\n高'),colorff00ff,SHIFT2;
DRAWTEXT(BACKSET(a=a3,gd3),zh-2*gq,'价\n中\n'),color00ffff,SHIFT2;
DRAWTEXT(BACKSET(a=a3,gd4),zh-3*gq,'价\n近\n低'),colorffbb00,SHIFT2;
DRAWTEXT(BACKSET(a=a3,gd5),zh-4*gq,'价\n低\n'),color00ff00,SHIFT2;
{}
zu:=MAX(ba1,MAX(ba2,MAX(ba3,MAX(ba4,ba5))));
STICKLINE(zu=ba1 and a=a3 ,zh-0*gq,zh-1*gq,1,0),COLOR0000ff,SHIFT1;
STICKLINE(zu=ba2 and a=a3 ,zh-1*gq,zh-2*gq,1,0),COLORff00ff,SHIFT1;
STICKLINE(zu=ba3 and a=a3 ,zh-2*gq,zh-3*gq,1,0),COLOR00ffff,SHIFT1;
STICKLINE(zu=ba4 and a=a3 ,zh-3*gq,zh-4*gq,1,0),COLORffbb00,SHIFT1;
STICKLINE(zu=ba5 and a=a3 ,zh-4*gq,zh-5*gq,1,0),COLOR00ff00,SHIFT1;
DRAWTEXT(zu=ba1 and a=a3,zh-0.6*gq,'密\n集\n高'),color0000ff,SHIFT2;
DRAWTEXT(zu=ba2 and a=a3,zh-1.6*gq,'密\n集\n近\n高'),colorff00ff,SHIFT2;
DRAWTEXT(zu=ba3 and a=a3,zh-2.6*gq,'密\n集\n中'),color00ffff,SHIFT2;
DRAWTEXT(zu=ba4 and a=a3,zh-3.6*gq,'密\n集\n近\n低'),colorffbb00,SHIFT2;
DRAWTEXT(zu=ba5 and a=a3,zh-4.6*gq,'密\n集\n低'),color00ff00,SHIFT2 ;
EXPLAIN(1 ,'-----280天内堆积筹码-----'),COLORMAGENTA;{---------------------------------------------------------------}
EXPLAINEX(zu=ba1,'▲高位密集筹码: ',ba1/FINANCE( 7),2,0),color0000ff;
EXPLAINEX(zu=ba2,'▲近高位密集筹码: ',ba2/FINANCE( 7),2,0),colorff00ff;
EXPLAINEX(zu=ba3,'▲中位密集筹码: ',ba3/FINANCE( 7),2,0),color00ffff;
EXPLAINEX(zu=ba4,'▲近低位密集筹码: ',ba4/FINANCE( 7),2,0),colorffbb00;
EXPLAINEX(zu=ba5,'▲低位密集筹码: ',ba5/FINANCE( 7),2,0),color00ff00;
sc1:=IF(zu=ba1,1,0);
sc2:=IF(zu=ba2,1,0);
sc3:=IF(zu=ba3,1,0);
sc4:=IF(zu=ba4,1,0);
sc5:=IF(zu=ba5,1,0);
EXPLAINEX(sc1=0,'高位区堆积筹码%: ',ba1/FINANCE( 7),2,0);
EXPLAINEX(sc2=0,'近高位堆积筹码%: ',ba2/FINANCE( 7),2,0);
EXPLAINEX(sc3=0,'中位区堆积筹码%: ',ba3/FINANCE( 7),2,0);
EXPLAINEX(sc4=0,'近低位堆积筹码%: ',ba4/FINANCE( 7),2,0);
EXPLAINEX(sc5=0,'低位区堆积筹码%: ',ba5/FINANCE( 7),2,0);
{}
时段:=a3-a1;
zb:=sum(v,时段)/FINANCE( 7);
yb:=refx(sum(v,b-a1)/FINANCE(7),b-a1+1);
EXPLAIN(1 ,' --------左右量统计--------'),color00ffff;
EXPLAINEX(1,'统计K棒天数: ',时段*2,0,0),colorffffff;
EXPLAINEX(1,'左边量: ',zb,2,0),color00ff00;
EXPLAINEX(1,'右边量: ',yb,2,0),color00ffff;
EXPLAINEX(1,'左右量比: ',zb/yb,2,0),colorffff00;
{股海网提供:www.guhai.com.cn}