大智慧周易指标!送给喜欢周易的人
-
相关简介:大智慧周易指标!送给喜欢周易的人 周易指标!送给喜欢周易的人!这几天研究写的有点不想写了!后面还有点喜好周易的人在完善!原本网上有人写出来!但加密码的不利于改良研究!所以特发出来供喜好的人研究! 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:
-
文章来源:股海网作者:股海网发布时间:2012-10-17浏览次数:
大智慧周易指标!送给喜欢周易的人
周易指标!送给喜欢周易的人!这几天研究写的有点不想写了!后面还有点喜好周易的人在完善!原本网上有人写出来!但加密码的不利于改良研究!所以特发出来供喜好的人研究!
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;
{//乾宫八卦,红色系}
乾为天:=x3 and s1;{11乾为天-阳阳阳阳阳阳}
DRAWTEXTABS(330,5,IFS(乾为天=1,' 乾为天 乾为天','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(320,20,IFS(乾为天=1,'六神 伏神 本卦 变卦','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(320,35,IFS(乾为天=1,'螣蛇 妻卯 ▅▅▅▅▅ 世 ▅▅ ▅▅ 应','')),LINETHICK0,Color00FFFF;
{//天干地支}
年:LYEAR,Linethick0;月:LMONTH,Linethick0;日:LDAY,Linethick0;
年干:MOD(FRACPART((if(年>2,年+10,年)-3)/10)*100,10),Linethick0;
年支:MOD(FRACPART(年/100)*100+5,12),Linethick0;
月干:MOD(年干*2+月,10),Linethick0;
月支:月,Linethick0;
奇月:=MOD(MONTH,2)=1;
i:=if(奇月,0,6);{奇数月i=0,偶数月i=6}
年份:=FLOOR(FRACPART(年/100)*100);{年后两位}
日干:MOD(4*20+(20/4)+5*年份+(年份/4)+(3*(MONTH+1)/5)+DAY-3,10),Linethick0;
日支:MOD(8*20+(20/4)+5*年份+(年份/4)+(3*(MONTH+1)/5)+DAY+7+i,12),Linethick0;
时支:8,Linethick0;
rr:=(年支+1+月+日);
DRAWTEXTABS(130,2,IFS(年干=1,'甲','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=2,'乙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=3,'丙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=4,'丁','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=5,'戊','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=6,'已','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=7,'庚','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=8,'辛','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=9,'壬','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(130,2,IFS(年干=10,'癸','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=1,'子','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=2,'丑','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=3,'寅','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=4,'卯','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=5,'辰','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=6,'巳','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=7,'午','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=8,'未','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=9,'申','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=10,'酉','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=11,'戌','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(145,2,IFS(年支=12,'亥','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=1,'甲','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=2,'乙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=3,'丙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=4,'丁','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=5,'戊','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=6,'已','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=7,'庚','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=8,'辛','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=9,'壬','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(180,2,IFS(月干=10,'癸','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=11,'子','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=12,'丑','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=1,'寅','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=2,'卯','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=3,'辰','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=4,'巳','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=5,'午','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=6,'未','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=7,'申','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=8,'酉','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=9,'戌','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(195,2,IFS(月支=10,'亥','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=1,'甲','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=2,'乙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=3,'丙','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=4,'丁','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=5,'戊','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=6,'已','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=7,'庚','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=8,'辛','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=9,'壬','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(230,2,IFS(日干=10,'癸','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=1,'子','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=2,'丑','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=3,'寅','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=4,'卯','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=5,'辰','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=6,'巳','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=7,'午','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=8,'未','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=9,'申','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=10,'酉','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=11,'戌','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(245,2,IFS(日支=12,'亥','')),LINETHICK2,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=0,'(戌亥)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=-10,'(申酉)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=2,'(申酉)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=-8,'(午未)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=4,'(午未)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=-6,'(辰巳)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=6,'(辰巳)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=-4,'(寅卯)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=8,'(寅卯)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(275,2,IFS(日干-日支=-2,'(子丑)','')),LINETHICK1,Color00FFFF;
DRAWTEXTABS(160,2,'年'),LINETHICK2,COLORRED;
DRAWTEXTABS(210,2,'月'),LINETHICK2,COLORRED;
DRAWTEXTABS(260,2,'日'),LINETHICK2,COLORRED;
DRAWTEXTABS(310,2,'旬空'),LINETHICK2,COLORRED;