请教问题老师 [文华财经]
-
咨询内容:
老师帮忙吧一下改成文华财经的代码,谢谢
M:=60;
N:=30; RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:=SMA(RSV,5,1); D:=SMA(K,3,1); J:=3*K-2*D; 多方线:EMA(J,6),colorred,LINETHICK2; 空方线: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),colorgreen,LINETHICK2; VAR2:=REF(LOW,1); VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100; VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3); VAR5:=LLV(LOW,30); VAR6:=HHV(VAR4,30); VAR7:=IF(MA(CLOSE,58),1,0); VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7; VAR9:=IF(VAR8>100,100,VAR8); 吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),colormagenta; AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10; AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100; AA5:=SMA(AA4,13,8); 趋势:CEILING(SMA(AA5,13,8)),coloryellow; 黄金分割线:60,colorliblue,DOTLINE; 顶线:90,colorliblue,DOTLINE; 底线:10,colorliblue,DOTLINE; AA6:=SMA(AA3,21,8); 买关注: STICKLINE(趋势-AA6<-65,0,7,15,1); DRAWICON(FILTER(J>REF(J,1)AND 趋势>=REF(趋势,1)AND 趋势<25 ,5),趋势,3); 卖关注: STICKLINE(趋势-AA6>85,98,90,15,1),COLORFFFF00; DRAWICON(FILTER(J85 ,5),J,6); 金叉: CROSS(多方线,空方线); DRAWTEXT(金叉,多方线,'',colorred; 死叉: CROSS(空方线,多方线); DRAWTEXT(死叉,空方线,'',COLOR00F300; V6:=CLOSE/REF(CLOSE,3)>=1.1; V7:=BACKSET(V6,3); 买:IF((V7 AND COUNT(V7,3)=1),50,0),colormagenta; DRAWTEXT(买,50,' ',colormagenta; V10:=PEAKBARS(3,15,1)<10; V12:=IF(V10=1,50,0); 头部:= IF(V12=50,100,0); 卖:IF(头部>REF(头部,1),50,0),colorwhite;DRAWTEXT(卖,50,' ',colorwhite; V9:=TROUGHBARS(3,15,1)<10; V11:=IF(V9=1,50,0); 底部:= IF(V11=50,50,0); 买:IF( 底部>REF(底部,1),70,0),colorblue; DRAWTEXT(买,70,' ',colorred; V7:=TROUGHBARS(3,15,1)<10; V9:=IF(V7=1,50,0); B:=ZIG(3,50/5)*1; G:=MA(B,2); L:=CROSS(B,G)*10; W:=CROSS(G,B)*10; DRAWTEXT(W=10,70,'跌'),colorgreen,; DRAWTEXT(L=10,70,'涨',colorred; //DRAWTEXT_FIX(1,0.01,0.1,0,'兔主散线指标+顶底资金趋势指标组成。',colorwhite; //N(3,100,30); //M(3,100,60); //M1(1,100,70); //N1(1,80,25);来源:程序化99
-
文华技术人员:
M:=60;
N:=30;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
多方线:EMA(J,6),COLORRED,LINETHICK2;
空方线: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORGREEN,LINETHICK2;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;
AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8);
趋势:CEILING(SMA(AA5,13,8),1),COLORYELLOW;
黄金分割线:60,COLORBLUE,DOT;
顶线:90,COLORBLUE,DOT;
底线:10,COLORBLUE,DOT;
AA6:=SMA(AA3,21,8);
STICKLINE(趋势-AA6<-65,0,7,15,1);
DRAWICON(FILTER(J>REF(J,1)&& 趋势>=REF(趋势,1)&& 趋势<25 ,5),趋势,3);
STICKLINE(趋势-AA6>85,98,90,15,1),COLORFFFF00;
金叉: CROSS(多方线,空方线);
DRAWTEXT(金叉,多方线,'',COLORRED;
死叉: CROSS(空方线,多方线);
DRAWTEXT(死叉,空方线,'',COLOR00F300;
V6:=CLOSE/REF(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
买:IF((V7 && COUNT(V7,3)=1),50,0),COLORMAGENTA;
DRAWTEXT(买,50,' ',COLORMAGENTA;
V10:=PEAKBARS(3,15,1,0)<10;
V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
卖:IF(头部>REF(头部,1),50,0),COLORWHITE;
DRAWTEXT(卖,50,' ',COLORWHITE;
V9:=TROUGHBARS(3,15,1,0)<10;
V11:=IF(V9=1,50,0);
底部:= IF(V11=50,50,0);
买1:IF( 底部>REF(底部,1),70,0),COLORBLUE;
DRAWTEXT(买1,70,' ',COLORRED;
V71:=TROUGHBARS(3,15,1,0)<10;
V91:=IF(V71=1,50,0);
B:=ZIGZAG(3,50/5,0)*1;
G:=MA(B,2);
L1:=CROSS(B,G)*10;
W1:=CROSS(G,B)*10;
DRAWTEXT(W1=10,70,'跌'),COLORGREEN;
DRAWTEXT(L1=10,70,'涨',COLORRED;
来源: WWW.CXH99.COM
-
文华客服:
老师将这个也修改下,谢谢
Z1:=STRCAT(HYBLOCK,''; Z2:=STRCAT(Z1,DYBLOCK); Z3:=STRCAT(Z2,''; DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00C0C0; A1:=REF(H,N)=HHV(H,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N); A2:=REF(L,N)=LLV(L,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N); E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2; E2:=(H+L)/2; H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1)); G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1); L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1); R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); S1:=R1>REF(R1,1); T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); U1:=T1>REF(T1,1); R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2); S2:=R2>REF(R2,1); T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2); U2:=T2>REF(T2,1); NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED; NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;
-
网友回复:
参考:
/*Z1:=STRCAT(HYBLOCK,''; Z2:=STRCAT(Z1,DYBLOCK); Z3:=STRCAT(Z2,''; DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00C0C0; */ N:=10; A1:=REF(H,N)=HHV(H,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N); A2:=REF(L,N)=LLV(L,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N); E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2; E2:=(H+L)/2; H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1)); G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1); L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1); R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); S1:=R1>REF(R1,1); T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); U1:=T1>REF(T1,1); R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2); S2:=R2>REF(R2,1); T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2); U2:=T2>REF(T2,1); DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED; DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 或微信:cxhjy888 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容