软件名称:[B]周易指标[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/
软件语言:简体中文
授权方式:免费版
软件大小:23.0 KB
官方主页:Home Page
更新时间:2012-10-18 04:59:27
软件简介:
周易指标
周易指标!送给喜欢周易的人!这几天研究写的有点不想写了!后面还有点喜好周易的人在完善!原本网上有人写出来!但加密码的不利于改良研究!所以特发出来供喜好的人研究!
DRAWTEXTABS(2,2,'金水制做'),LINETHICK1,COLORRED;
{input:p1(1,0,1),p2(1,0,1);{//P1=0,按常规K线开收定阴阳爻,P1=1,按张东生-常秉义方法定阴阳爻;P2=0,按K线顺序排卦,左为初爻,右为上爻,P2=1,按K线逆序排卦}
p1:=1;p2:=1;
{按不同方法定阴阳爻}
aa:=AMOUNT/VOL/100;{//均价}
ai:=if(c=o,aa-ref(aa,1),c-o);{//P1=0,按常规K线开收定阴阳爻}
aj:=if(c=ref(c,1),aa-ref(aa,1),c-ref(c,1));{//P1=1,按张东生-常秉义方法定阴阳爻}
a:=if(p1=0,ai,aj);
{//选定6爻,P2=0,按K线顺序排卦,P2=1,按K线逆序排卦}
a1:=if(p2=0,ref(a,5),a);
a2:=if(p2=0,ref(a,4),ref(a,1));
a3:=if(p2=0,ref(a,3),ref(a,2));
a4:=if(p2=0,ref(a,2),ref(a,3));
a5:=if(p2=0,ref(a,1),ref(a,4));
a6:=if(p2=0,a,ref(a,5));
{//上卦}
s1:=a4>0 and a5>0 and a6>0;{上卦乾-阳阳阳}
s11:=if(a4>0 and a5>0 and a6>0,1,0);
s2:=a4>0 and a5>0 and a6<0;{上卦兑-阳阳阴}
s22:=if(a4>0 and a5>0 and a6<0,2,0);
s3:=a4>0 and a5<0 and a6>0;{//上卦离-阳阴阳}
s33:=if(a4>0 and a5<0 and a6>0,3,0);
s4:=a4>0 and a5<0 and a6<0;{//上卦震-阳阴阴}
s44:=if(a4>0 and a5<0 and a6<0,4,0);
s5:=a4<0 and a5>0 and a6>0;{//上卦巽-阴阳阳}
s55:=if(a4<0 and a5>0 and a6>0,5,0);
s6:=a4<0 and a5>0 and a6<0;{//上卦坎-阴阳阴}
s66:=if(a4<0 and a5>0 and a6<0,6,0);
s7:=a4<0 and a5<0 and a6>0;{//上卦艮-阴阴阳}
s77:=if(a4<0 and a5<0 and a6>0,7,0);
s8:=a4<0 and a5<0 and a6<0;{//上卦坤-阴阴阴}
s88:=if(a4<0 and a5<0 and a6<0,8,0);
上卦:(s11+s22+s33+s44+s55+s66+s77+s88),LINETHICK0;
{//下卦}
x1:=a1>0 and a2>0 and a3>0;{//下卦乾-阳阳阳}
x11:=if(a1>0 and a2>0 and a3>0,1,0);
x2:=a1>0 and a2>0 and a3<0;{//下卦兑-阳阳阴}
x22:=if(a1>0 and a2>0 and a3<0,2,0);
x3:=a1>0 and a2<0 and a3>0;{//下卦离-阳阴阳}
x33:=if(a1>0 and a2<0 and a3>0,3,0);
x4:=a1>0 and a2<0 and a3<0;{//下卦震-阳阴阴}
x44:=if(a1>0 and a2<0 and a3<0,4,0);
x5:=a1<0 and a2>0 and a3>0;{//下卦巽-阴阳阳}
x55:=if(a1<0 and a2>0 and a3>0,5,0);
x6:=a1<0 and a2>0 and a3<0;{//下卦坎-阴阳阴}
x66:=if(a1<0 and a2>0 and a3<0,6,0);
x7:=a1<0 and a2<0 and a3>0;{//下卦艮-阴阴阳}
x77:=if(a1<0 and a2<0 and a3>0,7,0);
x8:=a1<0 and a2<0 and a3<0;{下卦坤-阴阴阴}
x88:=if(a1<0 and a2<0 and a3<0,8,0);
下卦:(x11+x22+x33+x44+x55+x66+x77+x88),LINETHICK0;
{动爻}
cc1:=(c-REF(C,1))/REF(C,1)*100;
cc2:=(REF(C,1)-REF(C,2))/REF(C,2)*100;
cc3:=(REF(C,2)-REF(C,3))/REF(C,3)*100;
cc4:=(REF(C,3)-REF(C,4))/REF(C,4)*100;
cc5:=(REF(C,4)-REF(C,5))/REF(C,5)*100;
cc6:=(REF(C,5)-REF(C,6))/REF(C,6)*100;
dd1:=max(abs(cc1),abs(cc2),abs(cc3),abs(cc4),abs(cc5),abs(cc6));{涨跌幅最大日作动爻}
d1:=if(abs(cc1)=dd1,1,0);
d2:=if(abs(cc2)=dd1,2,0);
d3:=if(abs(cc3)=dd1,3,0);
d4:=if(abs(cc4)=dd1,4,0);
d5:=if(abs(cc5)=dd1,5,0);
d6:=if(abs(cc6)=dd1,6,0);
动爻:d1+d2+d3+d4+d5+d6,LINETHICK0;
{//乾宫八卦,红色系}
乾:=s1;兑:=s2;离:=s3;震:=s4;巽:=s5;坎:=s6;艮:=s7;坤:=s8;
乾1:=x1;兑1:=x2;离1:=x3;震1:=x4;巽1:=x5;坎1:=x6;艮1:=x7;坤1:=x8;
DRAWTEXTABS(320,0,IFS(乾 or 离 or 巽 or 艮,' ━━━ ','')),LINETHICK0,Color00FF00;
DRAWTEXTABS(320,13,IFS(乾 or 兑 or 巽 or 坎,' ━━━ ','')),Color00FF00;
DRAWTEXTABS(320,26,IFS(乾 or 兑 or 离 or 震,' ━━━','')),Color00FF00;
DRAWTEXTABS(320,39,IFS(乾1 or 离1 or 巽1 or 艮1,' ━━━ ','')),Color00FF00;
DRAWTEXTABS(320,52,IFS(乾1 or 兑1 or 巽1 or 坎1,' ━━━ ','')),Color00FF00;
DRAWTEXTABS(320,65,IFS(乾1 or 兑1 or 离1 or 震1,' ━━━','')),Color00FF00;
DRAWTEXTABS(320,0,IFS(坤 or 兑 or 震 or 坎,' ━ ━ ','')),LINETHICK0,Color00FF00;
DRAWTEXTABS(320,13,IFS(坤 or 离 or 震 or 艮,' ━ ━ ','')),Color00FF00;
DRAWTEXTABS(320,26,IFS(坤 or 巽 or 坎 or 艮,' ━ ━','')),Color00FF00;
DRAWTEXTABS(320,39,IFS(坤1 or 兑1 or 震1 or 坎1,' ━ ━ ','')),Color00FF00;
DRAWTEXTABS(320,52,IFS(坤1 or 离1 or 震1 or 艮1,' ━ ━ ','')),Color00FF00;
DRAWTEXTABS(320,65,IFS(坤1 or 巽1 or 坎1 or 艮1,' ━ ━','')),Color00FF00;
DRAWTEXTABS(320,0,IFS(乾,'戌 ',
IFS(震,'戌 ',
IFS(兑,'未 ',
IFS(离,'巳 ',
IFS(巽,'卯 ',
IFS(坎,'子',
IFS(艮,'寅',
IFS(坤,'酉',''))))))))),Color0080FF;
DRAWTEXTABS(320,13,IFS(乾,'申',
IFS(震,'申',
IFS(兑,'酉',
IFS(离,'未',
IFS(巽,'巳',
IFS(坎,'戌 ',
IFS(艮,'子',
IFS(坤,'亥',''))))))))),ColorFFFFFF;
DRAWTEXTABS(320,26,IFS(乾,'午',
IFS(震,'午',
IFS(兑,'亥',
IFS(离,'酉',
IFS(巽,'未',
IFS(坎,'申',
IFS(艮,'戌 ',
IFS(坤,'丑',''))))))))),Color0000FF;
DRAWTEXTABS(320,39,IFS(乾1,'辰',
IFS(震1,'辰',
IFS(兑1,'丑',
IFS(离1,'亥',
IFS(巽1,'酉',
IFS(坎1,'午',
IFS(艮1,'申',
IFS(坤1,'卯 ',''))))))))),Color0080FF;
DRAWTEXTABS(320,52,IFS(乾1,'寅',
IFS(震1,'寅',
IFS(兑1,'卯',
IFS(离1,'丑',
IFS(巽1,'亥',
IFS(坎1,'辰',
IFS(艮1,'午',
IFS(坤1,'巳',''))))))))),Color00FF00;
DRAWTEXTABS(320,65,IFS(乾1,'子',
IFS(震1,'子',
IFS(兑1,'巳',
IFS(离1,'卯',
IFS(巽1,'丑',
IFS(坎1,'寅',
IFS(艮1,'辰',
IFS(坤1,'未',''))))))))),ColorFFFF00;
金:=(x1 and s1) or (x5 and s1) or (x7 and s1) or (x8 and s1) or (x1 and s3) or (x8 and s3) or (x8 and s7) or (x2 and s2) or (x6 and s2) or (x8 and s2) or (x7 and s2) or (x2 and s4) or (x8 and s5) or (x7 and s4) or (x7 and s8);
火:=(x3 and s3) or (x7 and s3) or (x5 and s3) or (x6 and s3) or (x3 and s1) or (x7 and s6) or (x6 and s1) or (x6 and s5);
木:=(x4 and s4) or (x5 and s5) or (x8 and s4) or (x1 and s5) or (x6 and s4) or (x3 and s5) or (x5 and s4) or (x4 and s5) or (x6 and s7) or (x5 and s8) or (x5 and s2) or (x4 and s7) or (x5 and s6) or (x4 and s3);
水:=(x6 and s6) or (x2 and s6) or (x4 and s6) or (x3 and s6) or (x4 and s2) or (x4 and s1) or (x3 and s4);
土:=(x7 and s7) or (x8 and s8) or (x3 and s7) or (x4 and s8) or (x1 and s7) or (x2 and s8) or (x2 and s7) or (x1 and s8) or (x5 and s7) or (x6 and s8) or (x7 and s5) or (x8 and s6) or (x3 and s2) or (x2 and s3) or (x1 and s4) or (x3 and s8) or (x2 and s5) or (x1 and s6) or (x2 and s1) or (x1 and s2);
DRAWTEXTABS(335,0,IFS(金 ,'父',
IFS(金,'兄',
IFS(金,'官',
IFS(金,'财',
IFS(金,'子','')))))),Color00FFFF;
一世:=(x1 and s1) or (x2 and s2) or (x3 and s3) or (x4 and s4) or (x5 and s5) or (x6 and s6) or (x7 and s7) or (x8 and s8);
二世:=(x5 and s1) or (x6 and s2) or (x7 and s3) or (x8 and s4) or (x1 and s5) or (x2 and s6) or (x3 and s7) or (x4 and s8);
三世:=(x7 and s1) or (x8 and s2) or (x5 and s3) or (x6 and s4) or (x3 and s5) or (x4 and s6) or (x1 and s7) or (x2 and s8);
四世:=(x8 and s1) or (x
[url=http://www.70822.com/soft/sort013/sort03/down-53979.html]周易指标[/url]