切换到宽版
  • 1285阅读
  • 0回复

k线64卦源码大智慧版 [复制链接]

上一主题 下一主题
离线御龙在天
 

发帖
2749
金币
21683
威望
215
贡献值
72
开心币
896
只看楼主 倒序阅读 使用道具 楼主  发表于: 2011-05-10
input:p1(1,0,1),p2(1,0,1);{//P1=0,按常规K线开收定阴阳爻,P1=1,按张东生-常秉义方法定阴阳爻;P2=0,按K线顺序排卦,左为初爻,右为上爻,P2=1,按K线逆序排卦
//在副图上显示证卷代码与证卷名称}
{DRAWTEXT(sysparam(2)=BARSCOUNT(CLOSE),h*1.10,'证卷代码:'+STKLABEL+';'+'证卷名称:'+STKNAME),COLORGREEN,ALIGN4;
//副图指标,绘K线}
STICKLINE(C>O,H,L,0.4,0),COLORRED;
STICKLINE(C>O,O,C,8,1),COLORRED;
STICKLINE(C<=O,H,L,0.4,0),COLORCYAN;
STICKLINE(C<=O,O,C,8,0),COLORCYAN;
{按不同方法定阴阳爻}
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);
{//对特殊阴阳爻作出标记}
DRAWICON((p1=0 and C=O and ai>0) or (p1=1 and C=ref(c,1) and aj>0),L,1),ALIGN0;
DRAWICON((p1=0 and C=O and ai<0) or (p1=1 and C=ref(c,1) and aj<0),L,2),ALIGN0;
{//选定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));
{//下卦}
x1:=a1>0 and a2>0 and a3>0;{//下卦乾-阳阳阳}
x2:=a1>0 and a2>0 and a3<0;{//下卦兑-阳阳阴}
x3:=a1>0 and a2<0 and a3>0;{//下卦离-阳阴阳}
x4:=a1>0 and a2<0 and a3<0;{//下卦震-阳阴阴}
x5:=a1<0 and a2>0 and a3>0;{//下卦巽-阴阳阳}
x6:=a1<0 and a2>0 and a3<0;{//下卦坎-阴阳阴}
x7:=a1<0 and a2<0 and a3>0;{//下卦艮-阴阴阳}
x8:=a1<0 and a2<0 and a3<0;{下卦坤-阴阴阴}
{//上卦}
s1:=a4>0 and a5>0 and a6>0;{上卦乾-阳阳阳}
s2:=a4>0 and a5>0 and a6<0;{上卦兑-阳阳阴}
s3:=a4>0 and a5<0 and a6>0;{//上卦离-阳阴阳}
s4:=a4>0 and a5<0 and a6<0;{//上卦震-阳阴阴}
s5:=a4<0 and a5>0 and a6>0;{//上卦巽-阴阳阳}
s6:=a4<0 and a5>0 and a6<0;{//上卦坎-阴阳阴}
s7:=a4<0 and a5<0 and a6>0;{//上卦艮-阴阴阳}
s8:=a4<0 and a5<0 and a6<0;{//上卦坤-阴阴阴}
{//乾宫八卦,红色系}
DRAWTEXT(x1 and s1,HIGH*1.04,'乾'),ALIGN1,COLOR0000BE;{11乾为天-阳阳阳阳阳阳}
DRAWTEXT(x1 and s2,HIGH*1.04,'夬'),ALIGN1,COLOR0000E4;{21泽天夬-阳阳阳阳阳阴}
DRAWTEXT(x1 and s3,HIGH*1.08,'大\n有'),ALIGN1,COLOR0000EA;{31火天大有-阳阳阳阳阴阳}
DRAWTEXT(x1 and s4,HIGH*1.08,'大\n壮'),ALIGN1,COLOR0000FF;{41雷天大壮-阳阳阳阳阴阴}
DRAWTEXT(x1 and s5,HIGH*1.08,'小\n畜'),ALIGN1,COLOR4441FF;{51风天小畜-阳阳阳阴阳阳}
DRAWTEXT(x1 and s6,HIGH*1.04,'需'),ALIGN1,COLOR436FFF;{61水天需-阳阳阳阴阳阴}
DRAWTEXT(x1 and s7,HIGH*1.08,'大\n畜'),ALIGN1,COLOR7A7DFF;{71山天大畜-阳阳阳阴阴阳}
DRAWTEXT(x1 and s8,HIGH*1.04,'泰'),ALIGN1,COLOR7A91FF;{81地天泰-阳阳阳阴阴阴}
{//兑宫八卦,绿色系}
DRAWTEXT(x2 and s1,HIGH*1.04,'履'),ALIGN1,COLOR00A300;{12天泽履-阳阳阴阳阳阳}
DRAWTEXT(x2 and s2,HIGH*1.04,'兑'),ALIGN1,COLOR00FF00;{22兑为泽-阳阳阴阳阳阴}
DRAWTEXT(x2 and s3,HIGH*1.04,'睽'),ALIGN1,COLOR00FF00;{32火泽睽-阳阳阴阳阴阳}
DRAWTEXT(x2 and s4,HIGH*1.08,'归\n妹'),ALIGN1,COLOR00FF00;{42雷泽归妹-阳阳阴阳阴阴}
DRAWTEXT(x2 and s5,HIGH*1.08,'中\n孚'),ALIGN1,COLOR00FF00;{52风泽中孚-阳阳阴阴阳阳}
DRAWTEXT(x2 and s6,HIGH*1.04,'节'),ALIGN1,COLOR00FF00;{62水泽节-阳阳阴阴阳阴}
DRAWTEXT(x2 and s7,HIGH*1.04,'损'),ALIGN1,COLOR00FF00;{72山泽损-阳阳阴阴阴阳}
DRAWTEXT(x2 and s8,HIGH*1.04,'临'),ALIGN1,COLOR00FF00;{82地泽临-阳阳阴阴阴阴}
{//离宫八卦,黄色系}
DRAWTEXT(x3 and s1,HIGH*1.08,'同\n人'),ALIGN1,COLOR00FFFF;{13天火同人-阳阴阳阳阳阳}
DRAWTEXT(x3 and s2,HIGH*1.04,'革'),ALIGN1,COLOR00FFFF;{23泽火革-阳阴阳阳阳阴}
DRAWTEXT(x3 and s3,HIGH*1.04,'离'),ALIGN1,COLOR00FFFF;{33离为火-阳阴阳阳阴阳}
DRAWTEXT(x3 and s4,HIGH*1.04,'丰'),ALIGN1,COLOR00FFFF;{43雷火丰-阳阴阳阳阴阴}
DRAWTEXT(x3 and s5,HIGH*1.08,'家\n人'),ALIGN1,COLOR00FFFF;{53风火家人-阳阴阳阴阳阳}
DRAWTEXT(x3 and s6,HIGH*1.08,'既\n济'),ALIGN1,COLOR00FFFF;{63水火既济-阳阴阳阴阳阴}
DRAWTEXT(x3 and s7,HIGH*1.04,'贲'),ALIGN1,COLOR00FFFF;{73火山贲-阳阴阳阴阴阳}
DRAWTEXT(x3 and s8,HIGH*1.08,'明\n夷'),ALIGN1,COLOR00FFFF;{83地火明夷-阳阴阳阴阴阴}
{//震宫八卦,肉粉色系}
DRAWTEXT(x4 and s1,HIGH*1.08,'无\n妄'),ALIGN1,COLORCCCCFF;{14天雷无妄-阳阴阴阳阳阳}
DRAWTEXT(x4 and s2,HIGH*1.04,'随'),ALIGN1,COLORCCCCFF;{24泽雷随-阳阴阴阳阳阴}
DRAWTEXT(x4 and s3,HIGH*1.08,'噬\n嗑'),ALIGN1,COLORCCCCFF;{34火雷噬嗑-阳阴阴阳阴阳}
DRAWTEXT(x4 and s4,HIGH*1.04,'震'),ALIGN1,COLORCCCCFF;{44震为雷-阳阴阴阳阴阴}
DRAWTEXT(x4 and s5,HIGH*1.04,'益'),ALIGN1,COLORCCCCFF;{54风雷益-阳阴阴阴阳阳}
DRAWTEXT(x4 and s6,HIGH*1.04,'屯'),ALIGN1,COLORCCCCFF;{64水雷屯-阳阴阴阴阳阴}
DRAWTEXT(x4 and s7,HIGH*1.04,'颐'),ALIGN1,COLORCCCCFF;{74山雷颐-阳阴阴阴阴阳}
DRAWTEXT(x4 and s8,HIGH*1.04,'复'),ALIGN1,COLORCCCCFF;{84地雷复-阳阴阴阴阴阴}
{//巽宫八卦,紫色系}
DRAWTEXT(x5 and s1,HIGH*1.04,'姤'),ALIGN1,COLORFF00FF;{15天风姤-阴阳阳阳阳阳}
DRAWTEXT(x5 and s2,HIGH*1.08,'大\n过'),ALIGN1,COLORFF00FF;{25泽风大过-阴阳阳阳阳阴}
DRAWTEXT(x5 and s3,HIGH*1.04,'鼎'),ALIGN1,COLORFF00FF;{35火风鼎-阴阳阳阳阴阳}
DRAWTEXT(x5 and s4,HIGH*1.04,'恒'),ALIGN1,COLORFF00FF;{45雷风恒-阴阳阳阳阴阴}
DRAWTEXT(x5 and s5,HIGH*1.04,'巽'),ALIGN1,COLORFF00FF;{55巽为风-阴阳阳阴阳阳}
DRAWTEXT(x5 and s6,HIGH*1.04,'井'),ALIGN1,COLORFF00FF;{65水风井-阴阳阳阴阳阴}
DRAWTEXT(x5 and s7,HIGH*1.04,'蛊'),ALIGN1,COLORFF00FF;{75山风蛊-阴阳阳阴阴阳}
DRAWTEXT(x5 and s8,HIGH*1.04,'升'),ALIGN1,COLORFF00FF;{85地风升-阴阳阳阴阴阴}
{//坎宫八卦,浅灰色系}
DRAWTEXT(x6 and s1,HIGH*1.04,'讼'),ALIGN1,COLORFFEADD;{16天水讼-阴阳阴阳阳阳}
DRAWTEXT(x6 and s2,HIGH*1.04,'困'),ALIGN1,COLORFFEADD;{26泽水困-阴阳阴阳阳阴}
DRAWTEXT(x6 and s3,HIGH*1.08,'末\n济'),ALIGN1,COLORFFEADD;{36火水末济-阴阳阴阳阴阳}
DRAWTEXT(x6 and s4,HIGH*1.04,'解'),ALIGN1,COLORFFEADD;{46雷水解-阴阳阴阳阴阴}
DRAWTEXT(x6 and s5,HIGH*1.04,'涣'),ALIGN1,COLORFFEADD;{56风水涣-阴阳阴阴阳阳}
DRAWTEXT(x6 and s6,HIGH*1.04,'坎'),ALIGN1,COLORFFEADD;{66坎为水-阴阳阴阴阳阴}
DRAWTEXT(x6 and s7,HIGH*1.04,'蒙'),ALIGN1,COLORFFEADD;{76山水蒙-阴阳阴阴阴阳}
DRAWTEXT(x6 and s8,HIGH*1.04,'师'),ALIGN1,COLORFFEADD;{86地水师-阴阳阴阴阴阴}
{//艮宫八卦,浅兰色系}
DRAWTEXT(x7 and s1,HIGH*1.04,'遯'),ALIGN1,COLORFFFF00;{17天山遯-阴阴阳阳阳阳}
DRAWTEXT(x7 and s2,HIGH*1.04,'咸'),ALIGN1,COLORFFF300;{27泽山咸-阴阴阳阳阳阴}
DRAWTEXT(x7 and s3,HIGH*1.04,'旅'),ALIGN1,COLORFFE500;{37火山旅-阴阴阳阳阴阳}
DRAWTEXT(x7 and s4,HIGH*1.08,'小\n过'),ALIGN1,COLORFFDB00;{47雷山小过-阴阴阳阳阴阴}
DRAWTEXT(x7 and s5,HIGH*1.04,'渐'),ALIGN1,COLORFFAB00;{57风山渐-阴阴阳阴阳阳}
DRAWTEXT(x7 and s6,HIGH*1.04,'蹇'),ALIGN1,COLORFF9800;{67水山蹇-阴阴阳阴阳阴}
DRAWTEXT(x7 and s7,HIGH*1.04,'艮'),ALIGN1,COLOREE9800;{77艮为山-阴阴阳阴阴阳}
DRAWTEXT(x7 and s8,HIGH*1.04,'谦'),ALIGN1,COLORCC9800;{87地山谦-阴阴阳阴阴阴}
{//坤宫八卦,浅咖啡色系}
DRAWTEXT(x8 and s1,HIGH*1.04,'否'),ALIGN1,COLOR90A9C1;{18天地否-阴阴阴阳阳阳}
DRAWTEXT(x8 and s2,HIGH*1.04,'萃'),ALIGN1,COLOR90A9C1;{28泽地萃-阴阴阴阳阳阴}
DRAWTEXT(x8 and s3,HIGH*1.04,'晋'),ALIGN1,COLOR90A9C1;{38火地晋-阴阴阴阳阴阳}
DRAWTEXT(x8 and s4,HIGH*1.04,'豫'),ALIGN1,COLOR90A9C1;{48雷地豫-阴阴阴阳阴阴}
DRAWTEXT(x8 and s5,HIGH*1.04,'观'),ALIGN1,COLOR90A9C1;{58风地观-阴阴阴阴阳阳}
DRAWTEXT(x8 and s6,HIGH*1.04,'比'),ALIGN1,COLOR90A9C1;{68水地比-阴阴阴阴阳阴}
DRAWTEXT(x8 and s7,HIGH*1.04,'剥'),ALIGN1,COLOR90A9C1;{78山地剥-阴阴阴阴阴阴阳}
DRAWTEXT(x8 and s8,HIGH*1.04,'坤'),ALIGN0,COLOR90A9C1;{88坤为地-阴阴阴阴阴阴};

==============================
哪位同仁可以把它转成通达信及同花顺的格式?

把周易预测应用到行情中。
明知山有虎,偏向虎山行。
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个