九毛八公式指标
求请老师帮忙把飞狐的飞升马改成通达信的指标! 并当指标出现“周金叉”和“紫柱”分别做成选股指标,万分感谢! variable:wday[7]='星期六'; wday[1]:='星期日'; wday[2]:='星期一'; wday[3]:='星期二'; wday[4]:='星期三'; wday[5]:='星期四'; wday[6]:='星期五'; fy:=year; fm:=month; fd:=day; wd:=weekday; p:=sysparam(1); str1:='今天是:'+numtostr(fy[p],0)+'年'+numtostr(fm[p],0)+'月' +numtostr(fd[p],0)+'日, '+wday[wd[p]+1]; explain(barpos=p,str1),coloryellow; wr:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),coloryellow,linethick2; 80,coloryellow; 20,colorred; 强弱分水岭:50,POINTDOT,colorgreen; 0,colorred,linethick0; 100,colorgreen,linethick1; {PARTLINE(wr<=20,wr),colorgreen,LINETHICK2; PARTLINE(wr>=55 and wr<=80,wr),colorblue,linethick2; PARTLINE(wr<=55 and wr>=20,wr),coloryellow,linethick2; PARTLINE(wr>=80 and wr<100,wr),colorred,linethick2;} RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100; K:SMA(RSV,M1,1)colorred,linethick1; D:SMA(K,M2,1)coloryellow,linethick1; J:3*K-2*D colorgreen,linethick1; FILLRGN(K>=D,K,D),colorred; FILLRGN(KMA(V,10); W2:=MA(C,5)>MA(C,10); {DRAWICON(K>D AND BETWEEN(K,25,50) AND BETWEEN(D,25,50)AND W2 AND W1,L,1);} EXPLAIN(K>D AND BETWEEN(K,25,50) AND BETWEEN(D,25,50)AND W2 AND W1,'三金叉见底,买入,股价脱离底部向上,买入'),coloryellow; Var0004:="KDJ.K#WEEK"(9,3,3); Var0005:="KDJ.D#WEEK"(9,3,3); Var0006:="KDJ.K#MONTH"(9,3,3); Var0007:="KDJ.D#MONTH"(9,3,3); 周金叉: IF(CROSS(Var0004,Var0005),15,0)linestick, color00ff00; 月金叉: IF(CROSS(Var0006,Var0007),20,0)linestick, COLORee99FF; DRAWTEXT(周金叉,16,'周金叉');DRAWTEXT(月金叉,20,'月金叉'); EXPLAIN(EXIST(CROSS(50,WR )AND WR[D AND W2 AND W1 AND K<=25,'三金叉见底,买入,股价尚处于底部安全区域,重仓介入'),coloryellow; EXPLAIN( K>=D AND BETWEEN(K,50,80)AND W2 AND W1,'三金叉出现,买入,股价进入主升浪,买入'),colorred; EXPLAIN(K>=D AND D>=75 AND W2 AND W1,'三金叉出现,买入,股价进入风险区轻仓进出,快进快出'),coloryellow; EXPLAIN(K<=D AND K>70 ,'高位死叉,不是洗盘就是下跌,若是洗盘则高抛低吸'),coloryellow; Y1:=C>MA(C,5)AND C>MA(C,10)AND OD AND K<=20 AND Var0005<25; DRAWTEXT(海底火山,HIGH,'海底火山'),colorgreen; EXPLAIN(海底火山,'海底火山=股价见底,快速买入'),colorred; B:=VAR0004>VAR0005; EXPLAINEX(B,'周K值大于周D值',var0004,2,0),colorff33cc; EXPLAINEX(B,'周D值是',var0005,2,0),colorff33cc; E:=VAR0006>VAR0007; EXPLAINEX(E,'月K值大于D值',var0006,2,0),colorffff00; EXPLAINEX(E,'月D值是',var0007,2,0),colorffff00; M:=K>D AND K>=REF(K,1) ; G:=K=-50,'日K:',K,2,0),colorred; EXPLAINEX(D>=-50,'日D:',D,2,0),colorred; EXPLAINEX(J>=-50,'日J:',J,2,0),colorred; EXPLAIN(M,'日K值金叉日D值,趋势向上'),colorgreen; EXPLAIN(G,'日K值死叉日D值,趋势向下'),coloryellow; j30:"kdj.k#min30"(9,3,3)linethick0; j31:"kdj.d#min30"(9,3,3)linethick0; j60:"kdj.k#min60"(9,3,3)linethick0; j61:"kdj.d#min60"(9,3,3)linethick0; EXPLAINEX(0=0,'30分钟K=',J30,2,0),colorffff00; EXPLAINEX(1=1,'30分钟D=',J31,2,0),colorffff00; EXPLAIN(j30>j31,'30分钟K值金叉日D值,趋势向上'),coloryellow; EXPLAIN(j3075 AND j61>75,'60分钟K值死叉日D值,趋势向下'),coloryellow; SX:=J30<30 and j31<30 j60<30 j61<30 k<20 d<20; explain(j60>j61 ,'60分钟K值金叉日D值,趋势向上'),coloryellow; EXPLAIN(j6075 AND j61>75 AND j3075 AND j31>75 ,'30分钟,60分钟K值全在高位死叉日D值,趋势向下,有一波深幅下跌'),colorff00ff; EXPLAIN(sx,'快进快出,超短线操作')coloryellow; DRAWTEXT(sx,50,'短'),colorgreen; STICKLINE(sx,50,0,0.8,1); ]
公式模块:
{周金叉}
Var0004:="kdj.K#WEEK"(9,3,3); Var0005:="kdJ.D#WEEK"(9,3,3); 周金叉:crOSS(Var0004,Var0005);