手机版 理想小程序
理想小程序
RSS 论坛APP
返回列表

请大家帮忙修改以下公式将24节气变月令

[飞 狐] 5506 1
设置
2727076 Lv.2

专栏

复制 显示全部楼层 倒序浏览 |
跳转到指定楼层

换手率指标编写_技术互助答疑论坛股票软件指标公式技术理想股票技术论坛

我是搞易经研究的,一直有个心愿,希望将传统易学预测应用到股市,造福社会,现在遇到难题(但对于懂得的人却是易事),在飞狐里面有个24节气公式,每个节气用一条蜡烛柱表 ...指标编写_技术互助答疑论坛股票软件指标公式技术

我是搞易经研究的,一直有个心愿,希望将传统易学预测应用到股市,造福社会,现在遇到难题(但对于懂得的人却是易事),在飞狐里面有个24节气公式,每个节气用一条蜡烛柱表示,每年则有24条蜡烛柱,本人想请高手将其改为每年12条蜡烛柱,即是将每个月的节和气合并成一条柱,例如一年里:立春和雨水为寅月,惊蛰和春分为卯月,清明和谷雨为辰月,立夏和小满为巳月,芒种和夏至为午月,小暑和大暑为未月,立秋和处暑为申月,白露和秋分为酉月,寒露和霜降为戍月,立冬和小雪为亥月,大雪和冬至为子月。则是将立春和雨水两条K线合为一条蜡烛柱,用寅月表示,其余类推,现提供飞狐里面的24节气公式:(先行谢谢!!!解决后有奖!但不知怎么弄?)

24节气K线(飞狐公式)
a:=LSOLARTERMDAY(date);
dd:=INTPART(DATEDIFF(ref(date,1),date)/15)LINETHICK;
aa:=FLATZIGA(a,1)=0 or a=ref(a,1);
wq:=barslast(aa or barpos=1);
j:=sum(aa+dd,barslast(YEAR<>ref(YEAR,1) or barpos=1));
gd:=wq<>0;
wh:=0*c;
for i=datacount downto LBOUND(wq) do begin
  if wq then wh[i-1]:=wh+gd;end;
开:ref(o,wq)LINETHICK,COLORWHITE;
高:refx(hhv(h,wq+1),wh)LINETHICK,COLORRED;
低:refx(LLv(L,wq+1),wh)LINETHICK,COLORCYAN;
收:refx(c,wh)LINETHICK,COLORYELLOW;
量:refx(sum(v,wq+1),wh)/100LINETHICK,COLORGREEN;万股:PARTLINE(0,0),COLORGREEN;
 换手率:量/capital*10000LINETHICK,COLORMAGENTA;%:PARTLINE(0,0),COLORMAGENTA;
i:=cross(wq,wh)or ISLASTBAR*(wh>wq);
f:=收>开 or 收=开 and 收>ref(收,4);
STICKLINE(f and i,高,低,1,0)COLORMAGENTA;
STICKLINE(f,收,开,10,0)COLORMAGENTA;
STICKLINE(not(f) and i,高,低,1,0)COLORGREEN;
STICKLINE(not(f),收,开,10,0)COLORGREEN;
DRAWTEXT(aa and j=1,低,'小\n寒'),ColorC1AC80;
DRAWTEXT(aa and j=2,低,'大\n寒'),ColorC1AC80;
DRAWTEXT(aa and j=3,低,'立\n春'),ColorC1AC80;
DRAWTEXT(aa and j=4,低,'雨\n水'),ColorC1AC80;
DRAWTEXT(aa and j=5,低,'惊\n蛰'),ColorC1AC80;
DRAWTEXT(aa and j=6,低,'春\n分'),ColorC1AC80;
DRAWTEXT(aa and j=7,低,'清\n明'),ColorC1AC80;
DRAWTEXT(aa and j=8,低,'谷\n雨'),ColorC1AC80;
DRAWTEXT(aa and j=9,低,'立\n夏'),ColorC1AC80;
DRAWTEXT(aa and j=10,低,'小\n满'),ColorC1AC80;
DRAWTEXT(aa and j=11,低,'芒\n种'),ColorC1AC80;
DRAWTEXT(aa and j=12,低,'夏\n至'),ColorC1AC80;
DRAWTEXT(aa and j=13,低,'小\n暑'),ColorC1AC80;
DRAWTEXT(aa and j=14,低,'大\n暑'),ColorC1AC80;
DRAWTEXT(aa and j=15,低,'立\n秋'),ColorC1AC80;
DRAWTEXT(aa and j=16,低,'处\n暑'),ColorC1AC80;
DRAWTEXT(aa and j=17,低,'白\n露'),ColorC1AC80;
DRAWTEXT(aa and j=18,低,'秋\n分'),ColorC1AC80;
DRAWTEXT(aa and j=19,低,'寒\n露'),ColorC1AC80;
DRAWTEXT(aa and j=20,低,'霜\n降'),ColorC1AC80;
DRAWTEXT(aa and j=21,低,'立\n冬'),ColorC1AC80;
DRAWTEXT(aa and j=22,低,'小\n雪'),ColorC1AC80;
DRAWTEXT(aa and j=23,低,'大\n雪'),ColorC1AC80;
DRAWTEXT(aa and j=24,低,'冬\n至'),ColorC1AC80;

p1:=SYSPARAM(1);
p2:=SYSPARAM(2);
p3:=SYSPARAM(3);
p4:=SYSPARAM(4);
i:=j[p1];
jq:=if(i=1,'小寒',if(i=2,'大寒',if(i=3,'立春',if(i=4,'雨水',if(i=5,'惊蛰',
if(i=6,'春分',if(i=7,'清明',if(i=8,'谷雨',if(i=9,'立夏',if(i=10,'小满',
if(i=11,'芒种',if(i=12,'夏至',if(i=13,'小暑',if(i=14,'大暑',if(i=15,'立秋',
if(i=16,'处暑',if(i=17,'白露',if(i=18,'秋分',if(i=19,'寒露',if(i=20,'霜降',
if(i=21,'立冬',if(i=22,'小雪',if(i=23,'大雪','冬至')))))))))))))))))))))));
y:=YEAR;
m:=MONTH;
r:=DAY;
Ly:=LYEAR;
Lm:=LMONTH;
Lr:=LDAY;
gzy:=GANZHI(DATE,TIME,0);
gzm:=GANZHI(DATE,TIME,1);
gzr:=GANZHI(DATE,TIME,2);
q:=p3-p2;
ii:=k/q;//调节 显示位置 参数
DRAWYITEXT(barpos=p2+INTPART(46/ii),p4,gzy[p1],0),ColorD7D7D7;
DRAWYITEXT(barpos=p2+INTPART(86/ii),p4,gzm[p1],0),ColorD7D7D7;
DRAWYITEXT(barpos=p2+INTPART(124/ii),p4,gzr[p1],0),ColorD7D7D7;
DRAWTEXT(barpos=p2+INTPART(10/ii),p4,'干支历:'),ColorD7D7D7;
DRAWTEXT(barpos=p2+INTPART(46/ii),p4,'  年'),ColorD7D7D7;
DRAWTEXT(barpos=p2+INTPART(86/ii),p4,'  月'),ColorD7D7D7;
DRAWTEXT(barpos=p2+INTPART(124/ii),p4,'  日'),ColorD7D7D7;
pp:=' \n农  历:'+NUMTOSTR(Ly[p1],0)+'年'
+NUMTOSTR(Lm[p1],0)+'月'
+NUMTOSTR(Lr[p1],0)+'日;'+' 节气:'+jq+'后第'+NUMTOSTR(a[p1],0)+'天'
+'\n日  期:'
+NUMTOSTR(y[p1],0)+'年'
+NUMTOSTR(m[p1],0)+'月'
+NUMTOSTR(r[p1],0)+'日';
DRAWTEXT(barpos=p2+INTPART(10/ii),c,pp),ColorD7D7D7,ALIGN4;

[ 本帖最后由 休闲人2010 于 2013-7-4 14:37 编辑 ]
076.middle
2727076
Lv.2

专栏

发表于 2013-7-12 22:12 复制 查看全部楼层 屏蔽
游客,您是(游客)级别,无法查看回复内容,请到新手区学习升级之后才能查看,或直接购买升级后查看。
您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

楼主
2楼
131943xjzjpcd6s1hvja2p
160828rrwbe8b2ijeeae8w
站长推荐 /1

最新主题

回顶部 到页底