您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

千钧赢富【升级版】[其他软件公式]

相关标签:止赢止损线指标公式 、 文华财经顺赢指标公式 、 赢在龙头指标公式大全 、 启富主图指标公式 、 大智慧超赢指标公式 、 赢富数据 、 赢富网 、 富赢天下 、 操盘软件富赢版 、 操盘软件富赢版v8 、 操盘手富赢版v7 、 操盘手富赢版v8 、

 

千钧赢富【升级版】---公式需要扩展数据和引用公式,否则不会显示首先向千钧老师致谢!!!长期来本人一直关注你的原创,并一直用上.自你的赢富升级版推出,就觉得什么地方可以改进,于是马上改了一傍晚,相对满意.但应时间已有一个多月,大致修改思路:1\能显示到最新交易周期;
2\增加当天分笔图形;
3\修改显示值百分比,以看直观.
4\不改变千钧老师的原码.
下面是原码和帖图以飨千钧徒,请千钧老师斧正:
{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }
原码:

{千钧赢富【升级版】---本人优化版}
流通:FINANCE(7)/10000,LINETHICK0,PRECISION2,Color00BFFF;
换手:v/FINANCE(7),PRECISION2,LINETHICK0;
qj1:=EXTDATA(9);qj2:=EXTDATA(10);qj3:=EXTDATA(11);
qj4:=EXTDATA(12);qj5:=EXTDATA(13);
ZL:=qj1+qj2+qj3;SH:=qj4+qj5;昨日:=REF(qj1+qj2+qj3,1);
总:=(ABS(qj1)+ABS(qj2)+ABS(qj3)+ABS(qj4)+ABS(qj5))*1.6;
日增:=ZL;
周仓:=SUM(日增,5);月仓:=SUM(日增,22);年仓:=SUM(日增,240);
上周:=REF(周仓,1);上月:=REF(月仓,1);上年:=REF(年仓,1);
周增:=周仓-上周;月增:=月仓-上月;年增:=年仓-上年;
CM:=sum(zl,5);ZJ:=sum(昨日,5);
ZSA:=cm/IF(CAPITAL=0,ESTDATA(12),FINANCE(7));
ZSB:=(cm-ZJ)/IF(CAPITAL=0,ESTDATA(12),FINANCE(7));
{取点}
DIFF:=MA(CLOSE,5)-EMA(CLOSE,55);
DEA:=MA(DIFF,14);
jg:=((close-llv(L,34))/(HHV(h,34)-llV(L,34)))*100;
yh:=CROSS(diff,dea) and jg<20;
bh:=CROSS(dea,diff) and jg>60;
SW:=yh=1;SS:=bh=1;
VERTLINE(sw),COLOR0000FF,LINEDOT;
VERTLINE(ss),COLOR00FF00,LINEDOT;A:=barslast(SW);B:=barslast(SS);
起点:=if(A>1 and A<=B,A,0);终点:=if(B>1 and B<=A,B,0);
主力成本:=SUM(C*zl*100,5)/SUM(zl,5)/100;
{控制画线高度}
n1:=sysparam(3);nn:=n1-sysparam(2)+1;
hh:=hhv(总,nn);
ll:=llv(总,nn);
最高:=hh[n1];最低:=ll[n1];中:=最低+(最高-最低)*0.5;
{方框竖线}
{框内黑底}
STICKLINE(BARPOS=SYSPARAM(1)-20,0,中,200,0),SHIFT10,COLOR000000;
STICKLINE(BARPOS=SYSPARAM(1)-20,0,中*2.1,200,0),SHIFT10,COLOR000000;
{加右框}
STICKLINE(ISLASTBAR AND CLOSE>0,中/9,中*17/9,80,1),SHIFT5,COLORred;
STICKLINE(ISLASTBAR AND CLOSE>0,中/9,中*17/9,28,1),SHIFT8,COLORred;

{竖线}
VERTLINE(BARPOS=SYSPARAM(1)),COLOREE00EE,LINETHICK2;
VERTLINE(BARPOS=SYSPARAM(1)-20),{SHIFT20,}COLOREE00EE,LINETHICK2;
{显示时间}
variable:wday[7]='星期六';wday[1]:='星期日';wday[2]:='星期一';
wday[3]:='星期二';wday[4]:='星期三';wday[5]:='星期四';wday[6]:='星期五';
fy:=年份;fm:=月份;fd:=日期;wd:=星期;p:=系统参数(1);
str1:=''+numtostr(fy[p],0)+'年'+numtostr(fm[p],0)+'月'+数字转化为字符串(fd[p],0)+'日 '+wday[wd[p]+1];
DRAWTEXTEX(c,1,180,0,str1),ColorffFF00;

{赢富柱}
{STICKLINE(BARPOS=SYSPARAM(1),中*2.1,中*2.1,200,0),COLOREE00EE,SHIFT10;
STICKLINE(BARPOS=SYSPARAM(1),中,中,200,0),COLOR660066,SHIFT10;
STICKLINE(BARPOS=SYSPARAM(1),中*0.0001,中*0.0001,200,0),COLOREE00EE,SHIFT10;
STICKLINE(BARPOS=SYSPARAM(1)+2 and qj1>0,中,(中+qj1),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)+2 and qj1<0,中,中+(qj1*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)+6 and qj2>0,中,(中+qj2),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)+6 and qj2<0,中,中+(qj2*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)+10 and qj3>0,中,(中+qj3),30,0),COLOR0000ff;
STICKLINE(BARPOS=SYSPARAM(1)+10 and qj3<0,中,中+(qj3*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)+14 and qj4>0,中,中+(qj4),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)+14 and qj4<0,中,中+(qj4*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)+18 and qj5>0,中,中+(qj5),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)+18 and qj5<0,中,中+(qj5*-1),30,0),COLORFF0000;}
{赢富柱修改}
{横线}
STICKLINE(BARPOS=SYSPARAM(1)-10,中*2.1,中*2.1,200,0),COLOREE00EE{,SHIFT10};
STICKLINE(BARPOS=SYSPARAM(1)-10,中,中,200,0),COLOR660066{,SHIFT10};
STICKLINE(BARPOS=SYSPARAM(1)-10,中*0.0001,中*0.0001,200,0),COLOREE00EE{,SHIFT10};

STICKLINE(BARPOS=SYSPARAM(1)-18 and qj1>0,中,(中+qj1),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)-18 and qj1<0,中,中+(qj1*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)-14 and qj2>0,中,(中+qj2),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)-14 and qj2<0,中,中+(qj2*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)-10 and qj3>0,中,(中+qj3),30,0),COLOR0000ff;
STICKLINE(BARPOS=SYSPARAM(1)-10 and qj3<0,中,中+(qj3*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)-6 and qj4>0,中,中+(qj4),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)-6 and qj4<0,中,中+(qj4*-1),30,0),COLORFF6600;
STICKLINE(BARPOS=SYSPARAM(1)-2 and qj5>0,中,中+(qj5),30,0),COLOR0000FF;
STICKLINE(BARPOS=SYSPARAM(1)-2 and qj5<0,中,中+(qj5*-1),30,0),COLORFF0000;

{DRAWTEXT(BARPOS=SYSPARAM(1)+1,中,'机\n构\n'+NUMTOSTR(qj1[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)+5,中,'券\n商\n'+NUMTOSTR(qj2[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)+9,中,'大\n户\n'+NUMTOSTR(qj3[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)+13,中,'中\n户\n'+NUMTOSTR(qj4[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)+17,中,'散\n户\n'+NUMTOSTR(qj5[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;}

DRAWTEXT(BARPOS=SYSPARAM(1)-19,中,'机\n构\n'+NUMTOSTR(qj1[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)-15,中,'券\n商\n'+NUMTOSTR(qj2[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)-11,中,'大\n户\n'+NUMTOSTR(qj3[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)-7,中,'中\n户\n'+NUMTOSTR(qj4[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1)-3,中,'散\n户\n'+NUMTOSTR(qj5[SYSPARAM(1)]/v,2)),PXDN12,COLORWHITE;
{柱上显示数值}
{DRAWTEXT(BARPOS=SYSPARAM(1)-20{ and qj1>0},(中+qj1),NUMTOSTR(qj1[SYSPARAM(1)]/100,2)),PXUP38,ALIGN1,COLORWHITE;}

STICKLINE(SH>0,0,SH,8,0),Coloraa00aa;
STICKLINE(SH>0,0,SH,6,0),Colorcc00cc;
STICKLINE(SH>0,0,SH,3,0),Coloree00ee;
散户买:STICKLINE(SH>0,0,SH,1,0),Colorff00FF;
STICKLINE(SH<0,0,-SH,8,0),ColorFF4400;
STICKLINE(SH<0,0,-SH,6,0),ColorFF8800;
STICKLINE(SH<0,0,-SH,3,0),ColorFFaa00;
散户卖:STICKLINE(SH<0,0,-SH,1,0),ColorFFcc00;
STICKLINE(ZL>0,0,ZL,8,0),Color000044;
STICKLINE(ZL>0,0,ZL,6,0),Color000088;
STICKLINE(ZL>0,0,ZL,3,0),Color0000aa;
主力买:STICKLINE(ZL>0,0,ZL,1,0),Color0000FF;
STICKLINE(ZL<0,0,-ZL,8,0),Color004400;
STICKLINE(ZL<0,0,-ZL,6,0),Color008800;
STICKLINE(ZL<0,0,-ZL,3,0),Color00aa00;
主力卖:STICKLINE(ZL<0,0,-ZL,1,0),Color00FF00;

DRAWTEXTEX(c,1,25,0,STKLABEL+' '+STKNAME+''),ColorffFF00;
DRAWTEXTEX(c,1,400,100,'估算筹码:'+NUMTOSTR(ZSA[P],2)+'%'),COLOR00FF00;
DRAWTEXTEX(c,1,180,100,'筹码增减:'+NUMTOSTR(ZSB[P],2)+'%'),COLOR00FF00;
DRAWTEXTEX(c,1,590,0,'主力开始进入:'+NUMTOSTR(起点[P],0)+'(天) '),COLORFFFF00;
DRAWTEXTEX(c,1,400,0,'主力进入回吐:'+NUMTOSTR(终点[P],0)+'(天) '),COLORFFFF00;
DRAWTEXTEX(c,1,590,100,'主力成本:'+NUMTOSTR(主力成本[SYSPARAM(1)],2)+'元'),COLOR00FF00;
DRAWTEXTEX(SH>ZL and SH>0,1,40,100,'本日散户主买'),COLOREEEEEE;
DRAWTEXTEX(ZL>SH and ZL>0,1,40,100,'本日主力主买'),COLOR00FFFF;
DRAWTEXTEX(SH<ZL and SH<0,1,40,230,'本日散户主卖'),COLORFFEE00;
DRAWTEXTEX(ZL<SH and ZL<0,1,40,230,'本日主力主卖'),COLOR00FF00;
//机构线:ma(ZL,5);散户线:ema(机构线,5);
{增减仓}
日均:=AMOUNT/vol/100;周均:=ref(日均,BARSLAST(WEEKDAY>ref(WEEKDAY,1)));
月均:=ref(日均,BARSLAST(MONTH>ref(MONTH,1)));
年均:=ref(日均,BARSLAST(YEAR>ref(YEAR,1)));
{解盘}
EXPLAIN(1,'==================================='),colorwhite;EXPLAIN(1,'本日主力净买:'+NUMTOSTR((ZL*100)/10000,2)+' 万股'),COLOrffff00;
EXPLAIN(1,'昨日主力增减:'+NUMTOSTR(昨日*100*日均/10000,2)+' 万元'),ColorFF8B00;
EXPLAIN(1,'==================================='),colorwhite;EXPLAIN(1,'上周:'+NUMTOSTR(上周*100/10000,2)+' 万股'),COLORred;
EXPLAIN(1,'增减:'+NUMTOSTR(周增*100*周均/10000,2)+' 万元'),COLORred;
EXPLAIN(1,'==================================='),colorwhite;EXPLAIN(1,'上月:'+NUMTOSTR(上月*100/10000,2)+' 万股'),COLORFF00FF;
EXPLAIN(1,'增减:'+NUMTOSTR(月增*100*月均/10000,2)+' 万元'),COLORFF00FF;
EXPLAIN(1,'==================================='),colorwhite;EXPLAIN(1,'上年:'+NUMTOSTR(上年*100/10000,2)+' 万股'),COLOR00EE00;
EXPLAIN(1,'增减:'+NUMTOSTR(年增*100*年均/10000,2)+' 万元'),COLOR00EE00;
EXPLAIN(1,'==================================='),colorwhite;qj2dt:=STKINDI('','券商.券商',0,0);
qj3dt:=STKINDI('','大户.大户',0,0);
qj4dt:=STKINDI('','中户.中户',0,0);
qj5dt:=STKINDI('','散户.散户',0,0);
zldt:=qj1dt+qj2dt+qj3dt;
shdt:=qj4dt+qj5dt;
{柱}
STICKLINE(ISLASTBAR AND CLOSE>0 and qj1dt>0 ,中,中+qj1dt,8,0),COLORRED,SHIFT2;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj2dt>0,中,中+qj2dt,8,0),COLORRED,SHIFT3;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj3dt>0,中,中+qj3dt,8,0),COLORRED,SHIFT4;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj4dt>0,中,中+qj4dt,8,0),COLORRED,SHIFT5;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj5dt>0,中,中+qj5dt,8,0),COLORRED,SHIFT6;

STICKLINE(ISLASTBAR AND CLOSE>0 and qj1dt<0 ,中,中+(0-qj1dt),8,0),COLORblue,SHIFT2;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj2dt<0,中,中+(0-qj2dt),8,0),COLORblue,SHIFT3;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj3dt<0,中,中+(0-qj3dt),8,0),COLORblue,SHIFT4;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj4dt<0,中,中+(0-qj4dt),8,0),COLORblue,SHIFT5;
STICKLINE(ISLASTBAR AND CLOSE>0 and qj5dt<0,中,中+(0-qj5dt),8,0),COLORblue,SHIFT6;

{STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,6,0),COLOR22aabb,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,6,0),COLOR22aabb,SHIFT8;}
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,5,0),COLOR33bbcc,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,5,0),COLOR33bbcc,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,4,0),COLOR44ccdd,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,4,0),COLOR44ccdd,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,3,0),COLOR55ddee,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,3,0),COLOR55ddee,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,2,0),COLOR66eeee,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,2,0),COLOR66eeee,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt>0,中/2,中/2+zldt,1,0),COLOR77ffee,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt>0,中/2,中/2+shdt,1,0),COLOR77ffee,SHIFT8;

{STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),6,0),COLORffaa11,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),6,0),COLORffaa11,SHIFT8;}
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),5,0),COLORffbb11,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),5,0),COLORffbb11,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),4,0),COLORffcc22,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),4,0),COLORffcc22,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),3,0),COLORffdd22,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),3,0),COLORffdd22,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),2,0),COLORffee33,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),2,0),COLORffee33,SHIFT8;
STICKLINE(ISLASTBAR AND CLOSE>0 and zldt<0,中/2,中/2+(0-zldt),1,0),COLORffff33,SHIFT7;
STICKLINE(ISLASTBAR AND CLOSE>0 and shdt<0,中/2,中/2+(0-shdt),1,0),COLORffff33,SHIFT8;

DRAWTEXT(ISLASTBAR AND CLOSE>0,中,'机\n构\n'+NUMTOSTR(qj1dt*100/v,1)),PXDN12,COLORWHITE,SHIFT2;
DRAWTEXT(ISLASTBAR AND CLOSE>0,中,'券\n商\n'+NUMTOSTR(qj2dt*100/v,1)),PXDN12,COLORWHITE,SHIFT3;
DRAWTEXT(ISLASTBAR AND CLOSE>0,中,'大\n户\n'+NUMTOSTR(qj3dt*100/v,1)),PXDN12,COLORWHITE,SHIFT4;
DRAWTEXT(ISLASTBAR AND CLOSE>0,中,'中\n户\n'+NUMTOSTR(qj4dt*100/v,1)),PXDN12,COLORWHITE,SHIFT5;
DRAWTEXT(ISLASTBAR AND CLOSE>0,中,'散\n户\n'+NUMTOSTR(qj5dt*100/v,1)),PXDN12,COLORWHITE,SHIFT6;

DRAWTEXT(ISLASTBAR AND CLOSE>0,中/2,'主\n力\n'+NUMTOSTR(zldt*100/v,1)),PXDN12,COLORWHITE,SHIFT7;
DRAWTEXT(ISLASTBAR AND CLOSE>0,中/2,'中\n小\n'+NUMTOSTR(shdt*100/v,1)),PXDN12,COLORWHITE,SHIFT8;

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容