大智慧指标转换为通达信主图指标 [通达信]
- 咨询内容: variable:bj=0; variable:i=0; MA5:="电子股评.MA5#day"; MA10:="电子股评.MA10#day"; MA20:="电子股评.MA20#day"; MA30:="电子股评.MA30#day"; MA60:="电子股评.MA60#day"; MA120:="电子股评.MA120#day"; {计算均线在分时图中占位} MA5P:=(DYNAINFO(7)-MA5)/DYNAINFO(7)*100; MA10P:=(DYNAINFO(7)-MA10)/DYNAINFO(7)*100; MA20P:=(DYNAINFO(7)-MA20)/DYNAINFO(7)*100; MA30P:=(DYNAINFO(7)-MA30)/DYNAINFO(7)*100; MA60P:=(DYNAINFO(7)-MA60)/DYNAINFO(7)*100; MA120P:=(DYNAINFO(7)-MA120)/DYNAINFO(7)*100; a1:=L > REF(H,1); a2:=H < REF(L,1); cond:=c<=ref(CLOSE,10); ma10:=ma(c,10); if cond then aa:=ma10; else bb:=ma10; partline(ma10,c<=ref(CLOSE,10), rgb(0,255,0),c>ref(CLOSE,10), rgb(255,0,0)),linethick2; cond1:=c<=ref(CLOSE,22); ma22:=ma(c,22); if cond1 then aa1:=ma22; else bb1:=ma22; partline(ma22,c<=ref(CLOSE,22), rgb(0,255,0),c>ref(CLOSE,22),rgb(255,0,0)),linethick3; cond2:=c<=ref(CLOSE,51); ma51:=(ma(c,30)+ma(c,72))/2; if cond2 then aa2:=ma51; else bb2:=ma51; a3:=IF(C / REF(C,1) > 1.04 and H / C < 1.01 and IF(C > REF(C,1),88,0) > 0,91,0); a4:=ma51 * 0.99; a5:=LLV(H,240); a6:=100 * (C - a5) / a5; a7:=(C - LLV(L,528)) / (HHV(H,528) - LLV(L,528)) * 100; a8:=(C - LLV(C,530)) / (HHV(C,530) - LLV(C,530)) * 100; a9:=(0); a10:=SMA(MAX(C - REF(C,1),0),34,1) / SMA(ABS(C - REF(C,1)),7,1) * 100; a11:=SMA(MAX(C - REF(C,1),0),13,1) / SMA(ABS(C - REF(C,1)),13,1) * 100; a12:=IF(TROUGHBARS(3,16,1) = 0 and H > L + 0.04,4,0); a13:=ZIG(3,6) > REF(ZIG(3,6),1) and REF(ZIG(3,6),1) <= REF(ZIG(3,6),2) and REF(ZIG(3,6),2) <= REF(ZIG(3,6),3); a14:=ZIG(3,6) < REF(ZIG(3,6),1) and REF(ZIG(3,6),1) >= REF(ZIG(3,6),2) and REF(ZIG(3,6),2) >= REF(ZIG(3,6),3); a15:=ZIG(3,22) > REF(ZIG(3,22),1) and REF(ZIG(3,22),1) <= REF(ZIG(3,22),2) and REF(ZIG(3,22),2) <= REF(ZIG(3,22),3); a16:=ZIG(3,22) < REF(ZIG(3,22),1) and REF(ZIG(3,22),1) >= REF(ZIG(3,22),2) and REF(ZIG(3,22),2) >= REF(ZIG(3,22),3); a17:=ZIG(3,51) > REF(ZIG(3,51),1) and REF(ZIG(3,51),1) <= REF(ZIG(3,51),2) and REF(ZIG(3,51),2) <= REF(ZIG(3,51),3); a18:=ZIG(3,51) < REF(ZIG(3,51),1) and REF(ZIG(3,51),1) >= REF(ZIG(3,51),2) and REF(ZIG(3,51),2) >= REF(ZIG(3,51),3); a19:=ZIG(3,72) > REF(ZIG(3,72),1) and REF(ZIG(3,72),1) <= REF(ZIG(3,72),2) and REF(ZIG(3,72),2) <= REF(ZIG(3,72),3); a20:=ZIG(3,72) < REF(ZIG(3,72),1) and REF(ZIG(3,72),1) >= REF(ZIG(3,72),2) and REF(ZIG(3,72),2) >= REF(ZIG(3,72),3); a21:=EMA(C,2) - EMA(C,150); a22:=(a12); a23:=a13 + a15 + a17 + a19; a24:=a14 + a16 + a18 + a20; a25:=(HHV(V,30) = V or V / REF(V,1) >= 5); a26:=BARSLAST(a25); a27:=(ZIG(3,10) < REF(ZIG(3,10),1) and REF(ZIG(3,10),1) > REF(ZIG(3,10),2)); a28:=ZIG(3,10) > REF(ZIG(3,10),1) and REF(ZIG(3,10),1) < REF(ZIG(3,10),2); a29:=(H + L + O + 2 * C) / 5; a30:=(C - LLV(L,36)) / (HHV(H,36) - LLV(L,36)) * 100; a31:=SMA(a30,3,1); a32:=SMA(a31,3,1); a33:=SMA(a32,3,1); a34:=REF(H,5) = HHV(H,2 * 5 + 1); a35:=FILTER(a34,5); a36:=BACKSET(a35,5 + 1); a37:=FILTER(a36,5); a38:=REF(L,5) = LLV(L,2 * 4 + 1); a39:=FILTER(a38,5); a40:=BACKSET(a39,5 + 1); a41:=FILTER(a40,5); a42:=(REF(LLV(L,2 * 5),1) + REF(HHV(H,2 * 5),1)) / 2; a43:=(H + L) / 2; a44:=(a37 and NOT(a41 and a42 >= a43)) or BARSTATUS = 2 or BARSCOUNT(C) = 1; a45:=a41 and NOT(a37 and a42 < a43); a46:=REF(BARSLAST(a44),1) + 1; a47:=BACKSET(a44 and COUNT(a45,a46) > 0,LLVBARS(IF(a45,L,10000),a46)); a48:=a47 > REF(a47,1); a49:=BACKSET(a48,2); a50:=a49 > REF(a49,1); a51:=a50 or BARSTATUS = 2 or BARSCOUNT(C) = 1; a52:=REF(BARSLAST(a51),1) + 1; a53:=BACKSET(a51 and COUNT(a37 and NOT(a41 and a42 >= a43),a52) > 0,HHVBARS(IF(a37 and NOT(a41 and a42 >= a43),H,0),a52)); a54:=a53 > REF(a53,1); a55:=BACKSET(a54,2); a56:=a55 > REF(a55,1); a57:=BACKSET(BARSTATUS = 2,BARSLAST(a56) + 1); a58:=a57 > REF(a57,1); a59:=BACKSET(BARSTATUS = 2,BARSLAST(a50) + 1); a60:=a59 > REF(a59,1); a61:=BACKSET(a58,REF(BARSLAST(a56),1) + 2); a62:=a61 > REF(a61,1); a63:=BACKSET(a60,REF(BARSLAST(a50),1) + 2); a64:=a63 > REF(a63,1); a65:=BACKSET(a64,REF(BARSLAST(a50),1) + 2); a66:=a65 > REF(a65,1); a67:=BACKSET(a66,REF(BARSLAST(a50),1) + 2); a68:=a67 > REF(a67,1); a69:=BACKSET(a62,REF(BARSLAST(a56),1) + 2); a70:=a69 > REF(a69,1); a71:=BACKSET(a70,REF(BARSLAST(a56),1) + 2); a72:=a71 > REF(a71,1); a74:=(C + H + L) / 3; a75:=MA(a74,4); a76:=C = HHV(C,4) and REF(C,1) = LLV(C,4); a77:=(C = LLV(C,4) and (REF(C,1) < REF(C,2) or REF(C,1) < REF(C,3))) or (REF(C,1) = LLV(C,4) and C < REF(C,2)) or (REF(C,2) = LLV(C,4) and REF(C,1) <> HHV(C,4) and C < REF(C,1)) or (REF(C,3) = LLV(C,4) and C < REF(C,1) and C < REF(C,2)); a78:=(REF(C,1) = LLV(C,4) and C >= REF(C,2)) or (REF(C,2) = LLV(C,4) and REF(C,1) <= REF(C,3) and REF(C,2) < REF(C,4) and C >= REF(C,1)); a79:=(REF(C,1) = HHV(C,4) and C < REF(C,2)) or (((REF(C,2) = HHV(C,4) and REF(C,1) > REF(C,3)) or (REF(C,3) = HHV(C,4) and REF(C,1) > REF(C,2))) and REF(C,2) >= REF(C,4) and C < REF(C,1)); a80:=(10); a81:=REF(H,a80) = HHV(H,2 * a80 + 1); a82:=BACKSET(a81,a80 + 1); a83:=FILTER(a82,a80) and H = HHV(H,a80 + 1); DRAWTEXT(a83,H * 1.04,'顶'),colorGreen; DRAWTEXT(a22 > 0 or a23 > 0,L * 0.99,'底'),colorRed; aaa:=a22 > 0 or a23 > 0; a84:=BARSLAST(a83); a85:=IF(a83,BARSCOUNT(CURRENTDATE),0); a86:=IF(a84,REF(H,a84),H); a87:=IF(a84,REF(a85,a84),a85); a88:=REF(a86,a84 + 1); a89:=CEILING(a87); a90:=REF(a87,a84 + 1); a91:=CEILING(a90); a92:=REF(a88,a84 + 1); a93:=IF(BARSCOUNT(CURRENTDATE) > a91,0,1); a94:=3 * SMA((C - LLV(L,27)) / (HHV(H,27) - LLV(L,27)) * 100,5,1) - 2 * SMA(SMA((C - LLV(L,27)) / (HHV(H,27) - LLV(L,27)) * 100,5,1),3,1); a95:=HHV(H,200); a96:=LLV(L,200); a97:=(a95 - a96) / 40; a98:=L - a97; a99:=(5); DRAWTEXTABS(5,0,BKNAME),ColorDDDDDD; a127:=(IF(C / REF(C,1) > 1.05 and H / C < 1.01 and IF(C > REF(C,1),88,0) > 0,91,0)); a100:=100 * (C - LLV(L,5)) / (HHV(C,5) - LLV(L,5)); a101:=100 * (C - LLV(L,10)) / (HHV(C,10) - LLV(L,10)); a102:=100 * (C - LLV(L,20)) / (HHV(C,20) - LLV(L,20)); a103:=100 * (C - LLV(L,30)) / (HHV(C,30) - LLV(L,30)); a104:=BARSLAST(CROSS(30,a100)) < 2 and BARSLAST(CROSS(a100,50)) < 2; A6a:=REF(HIGH,6)=HHV(HIGH,2*6+1); B6a:=FILTER(A6a,6); C6a:=BACKSET(B6a,6+1); D6a:=FILTER(C6a,6); A7a:=REF(LOW,6)=LLV(LOW,2*6+1); B7a:=FILTER(A7a,6); C7a:=BACKSET(B7a,6+1); D7a:=FILTER(C7a,6); E6a:=(REF(LLV(LOW,2*6),1)+REF(HHV(HIGH,2*6),1))/2; E7a:=(HIGH+LOW)/2; H6a:=(D6a AND NOT(D7a AND E6a>=E7a)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; H7a:=D6a AND NOT(D7a AND E6a>=E7a); L6a:=D7a AND NOT(D6a AND E6a=E7a); X6a:=REF(BARSLAST(H6a),1)+1; F6a:=BACKSET(H6a AND COUNT(L6a,X6a)>0,LLVBARS(IF(L6a,LOW,10000),X6a)); G6a:=F6a>REF(F6a,1); I6a:=BACKSET(G6a,2); LD2a:=I6a>REF(I6a,1); L7a:=LD2a OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; X7a:=REF(BARSLAST(L7a),1)+1; F7a:=BACKSET(L7a AND COUNT(H7a,X7a)>0,HHVBARS(IF(H7a,HIGH,0),X7a)); G7a:=F7a>REF(F7a,1); I7a:=BACKSET(G7a,2); HD2a:=I7a>REF(I7a,1); UU3a:=BACKSET(BARSTATUS=2,BARSLAST(LD2a)+1); VV3a:=UU3a>REF(UU3a,1); WW3a:=BACKSET(VV3a,REF(BARSLAST(LD2a),1)+2); XX3a:=WW3a>REF(WW3a,1); {DRAWLINE(XX3a,L,VV3a,L,1),Colorred;} UU4a:=BACKSET(BARSTATUS=2,BARSLAST(HD2a)+1); VV4a:=UU4a>REF(UU4a,1); WW4a:=BACKSET(VV4a,REF(BARSLAST(HD2a),1)+2); XX4a:=WW4a>REF(WW4a,1); {DRAWLINE(XX4a,H,VV4a,H,1),Colorwhite;} {37} HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0; AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1); QY:=BACKSET(AA,HIGHN+1); CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1); {DRAWICON(CC,H*1.02,2); } DDD:=BARSLAST(CC); GDTS:=IF(CC,BARSCOUNT(CURRENTDATE),0); DINGBU:=IF(DDD,REF(H,DDD),H); DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); DINGBU1:=REF(DINGBU,DDD+1); GDCS1:=CEILING(DINGBUTS); DINGBUTS1:=REF(DINGBUTS,DDD+1); GDCS2:=CEILING(DINGBUTS1); DINGBU2:=REF(DINGBU1,DDD+1); MM:=IF(BARSCOUNT(CURRENTDATE)>GDCS2,0,1); a105:=BARSLAST(CROSS(a103,a100)) < 2 and a100 > a103; a106:=a100 > 60 and a103 > 70; DRAWTEXTABS(35,15,'流通盘:'+CAPITAL / 100+'万股,利润增长:'+FINANCE2(10)+'%。每股收益:'+FINANCE2(3)+'元。'),Color00DDDD; {中轴:=(MA(CLOSE,30)+ma(close,72))/2; 上端:中轴+中轴*0.1,DOTLINE,colorgreen; 上极端:中轴+中轴*0.2,DOTLINE,colorblue; 下端:中轴 - 中轴*0.1,DOTLINE,colorred; 下极端:中轴-中轴*0.2,DOTLINE,color000999;} mm:=ref(h,1)=hhv(h,3) or ref(h,2)=hhv(h,3) or ref(h,3)=hhv(h,3); nn:=ref(l,1)=llv(l,3) or ref(l,2)=hhv(l,3) or ref(l,3)=hhv(l,3); if mm then bj:=1; if nn then bj:=-1; nn1:=barslast(mm); nn2:=barslast(nn); if cref(h,nn2+1) and bj=-1 then i:=-1; uu3:=cross(i=1,0.5); uu4:=cross(i=-1,0.5); STICKLINE(uu3,C,O,7.5,0),COLOR00AA00; STICKLINE(uu4,C,O,7.5,0),COLOR00AAFF; {黄金分割线} lhnh:=BARSLAST(DISPSTATUS=1)+1; nnl:=DISPSTATUS=2; Al:=BACKSET(nnl,hhvBARS(h,lhnh)+1); Bl:=Al>REF(Al,1); Al2:=BACKSET(nnl,LLVBARS(L,lhnh)+1); Bl2:=Al2>REF(Al2,1); 前高:REF(H,BARSLAST(bl)),PRECIS2,COLOR00A800,LINETHICK1; DRAWTEXT(nnl,前高*0.995,'前高:'+NUMTOSTRN(前高,2)),ALIGN2,COLOR00A800,PRECIS2; 前低:REF(L,BARSLAST(Bl2)),PRECIS2,COLOR580058,LINETHICK1; {DRAWTEXT(nnl,前低*1.010,'前低: '+NUMTOSTRN(前低,2)),ALIGN2,COLOR380088,PRECIS2; Fl1:((前高-前低)*0.191)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl1,'191(809): '+NUMTOSTRN(Fl1,2)),ALIGN2,Color282828; Fl2:((前高-前低)*0.236)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl2,'236(764): '+NUMTOSTRN(Fl2,2)),ALIGN2,Color383838;} Fl3:((前高-前低)*0.382)+前低,DOTLINE,Color003838,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl3,'382(618): '+NUMTOSTRN(Fl3,2)),ALIGN2,COLOR003838; {Fl4:((前高-前低)*0.5)+前低,DOTLINE,COLOR383800,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl4,'0.50: '+NUMTOSTRN(Fl4,2)),ALIGN2,Color000058;} Fl5:((前高-前低)*0.618)+前低,DOTLINE,Color003838,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl5,'618(382): '+NUMTOSTRN(Fl5,2)),ALIGN2,COLOR003838; {Fl6:((前高-前低)*0.764)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl6,'764(236): '+NUMTOSTRN(Fl6,2)),ALIGN2,COLOR383838; Fl7:((前高-前低)*0.809)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl7,'809(191): '+NUMTOSTRN(Fl7,2)),ALIGN2,COLOR282828;}; 以上是大智慧主图叠加指标,能帮忙转换成通达信的指标吗?
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容