在线检测未来函数

飞狐主力分析指标公式

来源:Internet,编辑:股旁网,2010-12-21

X:=2008;
DRAWGBK(CLOSE,COLORRGB(200,200,50),COLORRGB(100,50,50),1);
流通:IF(CAPITAL=0,ESTDATA(12)/10000,FINANCE(7)/10000),LINETHICK0,PRECISION2,Color00BFFF;
jj:=(HIGH+LOW+CLOSE)/3;
qj0:=vol/IF(HIGH=LOW,4,HIGH-LOW);
qj1:=IF(CAPITAL=0,qj0*(jj-MIN(CLOSE,OPEN)),qj0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
qj2:=IF(CAPITAL=0,qj0*(MIN(OPEN,CLOSE)-LOW),qj0*IF(HIGH=LOW,1,(jj-MIN(CLOSE,OPEN))));
qj3:=IF(CAPITAL=0,qj0*(HIGH-MAX(OPEN,CLOSE)),qj0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
qj4:=IF(CAPITAL=0,qj0*(MAX(CLOSE,OPEN)-jj),qj0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-jj)));
总1:=(qj1+qj2)-(qj3+qj4);总:=qj1+qj2+qj3+qj4;
w1:=(qj1+qj2);CM:=SUM(总1,24);ZJ:=REF(总1,1);
w2:=(abs(qj1)+abs(qj2)+abs(qj3)+abs(qj4));
ZSA:=cm/IF(CAPITAL=0,ESTDATA(12),FINANCE(7));
ZSB:=(总1-ref(总1,1))/总*100;
DIFF:=EMA(w1,12)-EMA(w1,26);DEA:=EMA(DIFF,9);
jg:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*100;
yh:=cross(diff,dea) and jg<10;
bh:=cross(dea,diff) and jg>95;
SW:=yh=1;SS:=bh=1;
VERTLINE(sw),COLOR0000FF,LINEDOT;
VERTLINE(ss),COLOR00FF00,LINEDOT;
A:=BARSLAST(SW);B:=BARSLAST(SS);
起点:=IF(A and A<B,A,0);
终点:=IF(B and B<A,B,0);
cc:=AMOUNT/VOL/100;主力成本:=(cc*w1*100)/w1/100;
换手率:IF(CAPITAL=0,INDEXV/ESTDATA(12),VOL/FINANCE(7)),PRECISION2,LINETHICK0;
{控制画线高度}
ww:=SYSPARAM(2);n1:=SYSPARAM(3);nn:=n1-ww+1;hh:=HHV(w2,nn);
ll:=LLV(w2,nn);最高:=hh[n1];最低:=ll[n1];中:=最低+(最高-最低)*0.5;
{显示时间}
variable:wday[7]='星期六';
wday[1]:='星期日';
wday[2]:='星期一';
wday[3]:='星期二';
wday[4]:='星期三';
wday[5]:='星期四';
wday[6]:='星期五';
fy:=YEAR;
fm:=MONTH;
fd:=DAY;
wd:=WEEKDAY;
p:=SYSPARAM(1);
str1:=''+NUMTOSTR(fy[p],0)+'年'+NUMTOSTR(fm[p],0)+'月'+NUMTOSTR(fd[p],0)+'日 '+wday[wd[p]+1],Colorred;
STICKLINE(总1<0,0,-总1+总/2,8,0),ColorFF4400;
STICKLINE(总1<0,0,-总1+总/2,6,0),ColorFF8800;
STICKLINE(总1<0,0,-总1+总/2,3,0),ColorFFaa00;
STICKLINE(总1<0,0,-总1+总/2,1,0),ColorFFcc00;
STICKLINE(总1>0,0,+总1+总/2,8,0),Color000044;
STICKLINE(总1>0,0,+总1+总/2,6,0),Color000088;
STICKLINE(总1>0,0,+总1+总/2,3,0),Color0000aa;
STICKLINE(总1>0,0,+总1+总/2,1,0),Color0000cc;
m1:ma(sum(总1,5),5);m2:wma(m1,5);
STICKLINE(BARPOS=ww+10,中*-1,中*2.1,200,0),Color2E8B57;
VERTLINE(BARPOS=ww+20),COLOREE00EE,LINETHICK2;
VERTLINE(BARPOS=ww),COLOREE00EE,LINETHICK2;
STICKLINE(BARPOS=ww+10,中*1.7,中*1.7,200,0),COLOREE00EE;
STICKLINE(BARPOS=ww+10,中*0.3,中*0.3,200,0),COLOR666666;
STICKLINE(BARPOS=ww+10,中*-0.9,中*-0.9,200,0),COLOREE00EE;
STICKLINE(BARPOS=ww+2 and qj1[p]>0,中*0.3,中*0.3+(qj1[p]),30,0),COLOR00FFFF;
STICKLINE(BARPOS=ww+2 and qj1[p]<0,中*0.3,中*0.3-(qj1[p]),30,0),COLOR00FF00;
STICKLINE(BARPOS=ww+7 and qj2[p]>0,中*0.3,中*0.3+(qj2[p]),30,0),COLOR0000FF;
STICKLINE(BARPOS=ww+7 and qj2[p]<0,中*0.3,中*0.3-(qj2[p]),30,0),COLOR00FF00;
STICKLINE(BARPOS=ww+12 and qj3[p]>0,中*0.3,中*0.3+(qj3[p]),30,0),COLORFF00FF;
STICKLINE(BARPOS=ww+12 and qj3[p]<0,中*0.3,中*0.3-(qj3[p]),30,0),COLOR00FF00;
STICKLINE(BARPOS=ww+17 and qj4[p]>0,中*0.3,中*0.3+(qj4[p]),30,0),COLORFF6600;
STICKLINE(BARPOS=ww+17 and qj4[p]<0,中*0.3,中*0.3-(qj4[p]),30,0),COLOR00FF00;
DRAWTEXT(BARPOS=ww+1,中*0.2,'特\n'+NUMTOSTR(qj1[p]/总[p]*100,0)),PXDN5,COLORWHITE;
DRAWTEXT(BARPOS=ww+6,中*0.2,'大\n'+NUMTOSTR(qj2[p]/总[p]*100,0)),PXDN5,COLORWHITE;
DRAWTEXT(BARPOS=ww+11,中*0.2,'中\n'+NUMTOSTR(qj3[p]/总[p]*100,0)),PXDN5,COLORWHITE;
DRAWTEXT(BARPOS=ww+16,中*0.2,'小\n'+NUMTOSTR(qj4[p]/总[p]*100,0)),PXDN5,COLORWHITE;
DRAWTEXTEX(CLOSE,1,230,0,str1),ColorffFF00;
{股旁网-股票公式网站 www.gupAng.com}
DRAWTEXTEX(CLOSE,1,230,130,'主力成本:'+NUMTOSTR(主力成本[p],2)+'元'),,Colorred;
DRAWTEXTEX(CLOSE,1,520,130,'主力筹码占流通:'+NUMTOSTR(ZSA[P],2)+' %'),,Colorred;
DRAWTEXTEX(CLOSE,1,770,130,'本日较昨日增减:'+NUMTOSTR(ZSB[P],2)+' %'),,Colorred;
DRAWTEXTEX(CLOSE,1,520,0,'估算主力进入:'+NUMTOSTR(起点[P],0)+'(天) '),,Colorred;
DRAWTEXTEX(CLOSE,1,770,0,'判断主力回吐:'+NUMTOSTR(终点[P],0)+'(天) '),,Colorred;
DRAWTEXT(BARPOS=ww+1 and 总1[P]<0,中*-0.6,' 散户主买'),Colorred;
DRAWTEXT(BARPOS=ww+1 and 总1[P]>0,中*-0.6,' 主力主买'),Colorred;
DRAWTEXT(BARPOS=ww+11 and 总1[P]>0,中*-0.6,' 散户主卖'),Colorred;
DRAWTEXT(BARPOS=ww+11 and 总1[P]<0,中*-0.6,' 主力主卖'),Colorred;
{增减仓}
周仓:=SUM(总1,5);月仓:=SUM(总1,25);
年仓:=SUM(总1,240);上周:=REF(周仓,1);
上月:=REF(月仓,1);上年:=REF(年仓,BARSLAST(YEAR=x));
周增:=周仓-上周;月增:=月仓-上月;年增:=年仓-上年;
{解盘}
EXPLAIN(1,'==================================='),colorwhite;
EXPLAIN(1,'今日增减:'+NUMTOSTR((总1[p]*100)/10000,2)+' 万股'),COLOrffff00;
EXPLAIN(1,'昨日增减:'+NUMTOSTR(zj[p]*100/10000,2)+' 万股'),ColorFF8B00;
EXPLAIN(1,'==================================='),colorwhite;
EXPLAIN(1,'周仓:'+NUMTOSTR(周仓[p]*100/10000,2)+' 万股'),COLORred;
EXPLAIN(1,'上周:'+NUMTOSTR(上周[p]*100/10000,2)+' 万股'),COLORred;
EXPLAIN(1,'增减:'+NUMTOSTR(周增[p]*100/10000,2)+' 万股'),COLORred;
EXPLAIN(1,'==================================='),colorwhite;
EXPLAIN(1,'月仓:'+NUMTOSTR(月仓[p]*100/10000,2)+' 万股'),COLORFF00FF;
EXPLAIN(1,'上月:'+NUMTOSTR(上月[p]*100/10000,2)+' 万股'),COLORFF00FF;
EXPLAIN(1,'增减:'+NUMTOSTR(月增[p]*100/10000,2)+' 万股'),COLORFF00FF;
EXPLAIN(1,'==================================='),colorwhite;
EXPLAIN(1,'年仓:'+NUMTOSTR(年仓[p]*100/10000,2)+' 万股'),COLOR00EE00;
EXPLAIN(1,'上年:'+NUMTOSTR(上年[p]*100/10000,2)+' 万股'),COLOR00EE00;
EXPLAIN(1,'增减:'+NUMTOSTR(年增[p]*100/10000,2)+' 万股'),COLOR00EE00;
EXPLAIN(1,'==================================='),colorwhite;

飞狐主力分析指标公式

 

相关文章