您好,欢迎访问三七文档
当前位置:首页 > 金融/证券 > 股票报告 > 双均线和一线定乾坤通达信指标完整版
ZQ:=256;DZ:=ZQ/4;A1:=HHV(H,ZQ);A2:=LLV(L,ZQ);{双均线M1M2变色设置及交叉}M1:MA(C,DZ),COLORYELLOW;IF(M1=REF(M1,2),M1,DRAWNULL),COLORMAGENTA,LINETHICK1;M2:MA(C,ZQ),COLORWHITE,LINETHICK2;IF(M2=REF(M2,2),M2,DRAWNULL),COLORRED,LINETHICK2;DRAWICON(CROSS(M1,M2),M2,1),COLORRED;DRAWICON(CROSS(M2,M1),M1,2),COLORGREEN;{以下为动态百分比}K2:HHV(HIGH,64);K3:LLV(LOW,64);K4:=(0.382*HHV(HIGH,0)+0.618*LLV(LOW,0));{K1:=(0.809*HHV(HIGH,ZQ)+0.191*LLV(LOW,ZQ));K5:=(0.191*HHV(HIGH,ZQ)+0.809*LLV(LOW,ZQ));}K50%:(0.5*A1+0.5*A2),COLORGREEN,LINETHICK2;K61%:(0.618*A1+0.382*A2),COLORLIBLUE;K38%:(0.382*A1+0.618*A2),COLORLIBLUE;SJ:=BARSLAST(M1REF(M1,2));STICKLINE(SJ=1,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=1,(K2+K3)*0.5,'开始'),COLORA5A412;STICKLINE(SJ=12,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=12,(K2+K3)*0.5,'19.1%'),COLORRED;STICKLINE(SJ=24,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=24,(K2+K3)*0.5,'38.2%'),COLORWHITE;STICKLINE(SJ=32,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=32,(K2+K3)*0.5,'50.2%'),COLORYELLOW;STICKLINE(SJ=40,K2,K3,0.01,1),COLORBLUE;DRAWTEXT(SJ=40,(K2+K3)*0.5,'61.8%'),COLORBLUE;STICKLINE(SJ=52,K2,K3,0.01,1),COLORGREEN;DRAWTEXT(SJ=52,(K2+K3)*0.5,'80.9%'),COLORGREEN;STICKLINE(SJ=64,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=64,(K2+K3)*0.5,'100%'),COLORA5A412;STICKLINE(SJ=76,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=76,(K2+K3)*0.5,'119.1%'),COLORRED;STICKLINE(SJ=88,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=88,(K2+K3)*0.5,'138.2%'),COLORWHITE;STICKLINE(SJ=96,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=96,(K2+K3)*0.5,'150.2%'),COLORYELLOW;STICKLINE(SJ=104,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=104,(K2+K3)*0.5,'161.8%'),COLORRED;STICKLINE(SJ=128,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=128,(K2+K3)*0.5,'200%'),COLORWHITE;TJ:=DZ*1.25;TJCS:=IF(PERIOD=1,TJ*3,TJ/(PERIOD-1));CS:=IF(PERIOD=1ANDPERIOD=7,TJCS,DRAWNULL);乾坤线:=(MA(C,CS)+MA(C,CS*2)+MA(C,CS*4))/3;DRAWTEXT(CURRBARSCOUNT=13,乾坤线,'乾坤线'),COLORBROWN;积极操盘:IF(乾坤线REF(乾坤线,2),乾坤线,乾坤线),COLORRED,LINETHICK3;持币观望:IF(乾坤线REF(乾坤线,2),乾坤线,DRAWNULL),COLORYELLOW,LINETHICK3;END1100189{自动画江恩角度线}DRAWLINE(L=TROUGH(2,30,1),L,H=PEAK(1,30,1),H,1),COLORFF00FF;DRAWLINE(L=TROUGH(2,30,1),L,H=PEAK(1,30,1),H-(PEAK(1,30,1)-TROUGH(2,30,1))/3*2,1),COLORRED;DRAWLINE(L=TROUGH(2,30,1),L,H=PEAK(1,30,1),H-(PEAK(1,30,1)-TROUGH(2,30,1))/3,1),COLORYELLOW;DRAWLINE(H=PEAK(1,27,1),H,L=TROUGH(2,27,1),L,1),COLOR00FF00;DRAWLINE(H=PEAK(1,27,1),H,L=TROUGH(2,27,1),L+(PEAK(1,27,1)-TROUGH(2,30,1))/3,1),COLORFFFF00;DRAWLINE(H=PEAK(1,27,1),H,L=TROUGH(2,27,1),L+(PEAK(1,27,1)-TROUGH(2,30,1))/3*2,1),COLORBLUE;{双均线}ZQ:=256;DZ:=ZQ/4;A1:=HHV(H,ZQ);A2:=LLV(L,ZQ);K2:HHV(HIGH,256);K3:LLV(LOW,256);M1:MA(C,DZ),COLORYELLOW;IF(M1=REF(M1,2),M1,DRAWNULL),COLORMAGENTA,LINETHICK1;M2:MA(C,ZQ),COLORWHITE,LINETHICK2;IF(M2=REF(M2,2),M2,DRAWNULL),COLORRED,LINETHICK2;DRAWICON(CROSS(M1,M2),M2,1),COLORRED;DRAWICON(CROSS(M2,M1),M1,2),COLORGREEN;{时间窗口STAR为开始时间点END为重要的时间高点;关于时间最主要的是设置两个关键的低点和高点,根据其周期进行延伸;END设为变量参数初始值0最大值1000默认值189;如果你还有好的时间方面的研究心得,请联系我开天qq:84141829;关于双均线已经有了三篇力作,目前已经公布了两个,不为别的,主要是结交高手,尤其是民间高手,进行学术交流!}STAR:=BARSLAST(L=TROUGH(2,30,1));SJ:=FLOOR((STAR/END*100));STICKLINE(SJ=0,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=0,(K2+K3)*0.5,'开始'),COLORA5A412;STICKLINE(SJ=19,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=19,(K2+K3)*0.5,'19.1%'),COLORRED;STICKLINE(SJ=38,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=38,(K2+K3)*0.5,'38.2%'),COLORWHITE;STICKLINE(SJ=50,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=50,(K2+K3)*0.5,'50%'),COLORYELLOW;STICKLINE(SJ=61,K2,K3,0.01,1),COLORBLUE;DRAWTEXT(SJ=61,(K2+K3)*0.5,'61.8%'),COLORBLUE;STICKLINE(SJ=80,K2,K3,0.01,1),COLORGREEN;DRAWTEXT(SJ=80,(K2+K3)*0.5,'80.9%'),COLORGREEN;STICKLINE(SJ=100,K2,K3,0.01,1),COLORA5A412;DRAWTEXT(SJ=100,(K2+K3)*0.5,'100%'),COLORA5A412;STICKLINE(SJ=120,K2,K3,0.01,1),COLORRED;DRAWTEXT(SJ=120,(K2+K3)*0.5,'119.1%'),COLORRED;STICKLINE(SJ=139,K2,K3,0.01,1),COLORWHITE;DRAWTEXT(SJ=139,(K2+K3)*0.5,'138.2%'),COLORWHITE;STICKLINE(SJ=150,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=150,(K2+K3)*0.5,'150%'),COLORYELLOW;STICKLINE(SJ=161,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=161,(K2+K3)*0.5,'161%'),COLORYELLOW;STICKLINE(SJ=180,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=180,(K2+K3)*0.5,'180%'),COLORYELLOW;STICKLINE(SJ=200,K2,K3,0.01,1),COLORYELLOW;DRAWTEXT(SJ=200,(K2+K3)*0.5,'200%'),COLORYELLOW;得到我的源码的同学请加上以下代码,这是另一个时间窗口!{自然数序列}SJ4:=SJ;STICKLINE(SJ4=5,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=5,K61%,'5'),COLORMAGENTA;STICKLINE(SJ4=8,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=8,K61%,'8'),COLORMAGENTA;STICKLINE(SJ4=13,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=13,K61%,'13'),COLORMAGENTA;STICKLINE(SJ4=21,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=21,K61%,'21'),COLORMAGENTA;STICKLINE(SJ4=34,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=34,K61%,'34'),COLORMAGENTA;STICKLINE(SJ4=55,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=55,K61%,'55'),COLORMAGENTA;STICKLINE(SJ4=89,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=89,K61%,'89'),COLORMAGENTA;STICKLINE(SJ4=144,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=144,K61%,'144'),COLORMAGENTA;STICKLINE(SJ4=233,K61%,K38%,0.01,1),COLORMAGENTA;DRAWTEXT(SJ4=233,K61%,'233'),COLORMAG
本文标题:双均线和一线定乾坤通达信指标完整版
链接地址:https://www.777doc.com/doc-1829884 .html