[推荐]老师帮我改下,谢谢 [文华财经]
-
咨询内容:
SJ:=1;
严重超买:100*SJ,COLORRED,DOTLINE;
超买:80,COLORRED,DOTLINE;
超卖:20,COLOR00FF00,DOTLINE;
严重超卖:0*SJ,COLOR00FF00,DOTLINE;
MACD顶背:0,COLOR00FF00;
MACD底背:0,COLORRED;
KDJ顶背:0,COLORFFCC66;
KDJ底背:0,COLORFF00FF;
RSI顶背:0,COLORFFFFFF;
RSI底背:0,COLORYELLOW;
DMI顶背:0,COLORBLUE;
DMI底背:0,COLOR0099FF;
TRR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:= PDM*100/TRR;
MDI:= MDM*100/TRR;
A1:=BARSLAST(REF(CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9)),1))*SJ;
B1:=REF(C,A1+1)>C AND REF("MACD.DIF"(12,26,9),A1+1)<"MACD.DIF"(12,26,9) AND CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9))*SJ;
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3))*SJ;
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24))*SJ;
C1:=BARSLAST(REF(CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF"(12,26,9),C1+1)>"MACD.DIF"(12,26,9) AND CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9))*SJ;
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3))*SJ;
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24))*SJ;
C4:=BARSLAST(REF(CROSS(MDI,PDI),1));
D4:=REF(C,C+1)<C AND REF(MDI,C4+1)>MDI AND CROSS(MDI,PDI);
A4:=BARSLAST(REF(CROSS(PDI,MDI),1));
B4:=REF(C,A4+1)>C AND REF(PDI,A4+1)<PDI AND CROSS(PDI,MDI);
DRAWTEXT(B4>0,5,'MI底背',COLOR0099FF;
DRAWTEXT(D4>0,95,'MI顶背',COLORBLUE;
DRAWTEXT(B1>0,15,'ACD底背',COLORRED;
DRAWTEXT(B2>0,10,'DJ底背'*SJ,COLORFF00FF;
DRAWTEXT(B3>0,18,'SI底背'*SJ,COLORYELLOW;
DRAWTEXT(D1>0,85,'ACD顶背'*SJ,COLOR00FF00;
DRAWTEXT(D2>0,90,'DJ顶背'*SJ,COLORFFCC66;
DRAWTEXT(D3>0,96,'SI顶背'*SJ,COLORFFFFFF;
STICKLINE(B1>0,20,0,0,0),COLORRED;
STICKLINE(B2>0,20,0,0,0),COLORFF00FF;
STICKLINE(B3>0,20,0,0,0),COLORYELLOW;
STICKLINE(D1>0,80,100,0,0),COLOR00FF00;
STICKLINE(D2>0,100,80,0,0),COLORFFCC66;
STICKLINE(D3>0,100,80,0,0),COLORWHITE;
STICKLINE(B4>0,20,0,0,0),COLOR0099FF;
STICKLINE(D4>0,100,80,0,0),COLORBLUE;
VAR188:=((CLOSE - LLV(LOW,34))/(HHV(HIGH,34) - LLV(LOW,34)))*(100);
VAR288:=REVERSE(VAR188);
VAR388:=SMA(VAR188,9,1);
K88:=SMA(VAR388,3,1)*SJ;
D88:=SMA(K88,3,1)*SJ;
STICKLINE((K88 >= D88),K88,D88,1,0),COLOR0000FF;
STICKLINE((K88 <= D88),K88,D88,1,0),COLOR00FF00;来源:程序化99
-
文华技术人员:
参考:
SJ:=1; DIF := EMA(CLOSE,12) - EMA(CLOSE,26); DEA := EMA(DIF,9); LC := REF(CLOSE,1); RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 严重超买:100*SJ,COLORRED,DOT;
超买:80,COLORRED,DOT;
超卖:20,COLOR00FF00,DOT;
严重超卖:0*SJ,COLOR00FF00,DOT;
MACD顶背:0,COLOR00FF00;
MACD底背:0,COLORRED;
KDJ顶背:0,COLORFFCC66;
KDJ底背:0,COLORFF00FF;
RSI顶背:0,COLORFFFFFF;
RSI底背:0,COLORYELLOW;
DMI顶背:0,COLORBLUE;
DMI底背:0,COLOR0099FF;
TRR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:= PDM*100/TRR;
MDI:= MDM*100/TRR;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1))*SJ;
B1:=REF(C,A1+1)>C AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA)*SJ;
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D)*SJ;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2)*SJ;
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)<C AND REF(DIF,C1+1)>DIF AND CROSS(DEA,DIF)*SJ;
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K)*SJ;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1)*SJ;
C4:=BARSLAST(REF(CROSS(MDI,PDI),1));
D4:=REF(C,C+1)<C AND REF(MDI,C4+1)>MDI AND CROSS(MDI,PDI);
A4:=BARSLAST(REF(CROSS(PDI,MDI),1));
B4:=REF(C,A4+1)>C AND REF(PDI,A4+1)<PDI AND CROSS(PDI,MDI);
DRAWTEXT(B4>0,5,'MI底背',COLOR0099FF;
DRAWTEXT(D4>0,95,'MI顶背',COLORBLUE;
DRAWTEXT(B1>0,15,'ACD底背',COLORRED;
DRAWTEXT(B2>0,10,'DJ底背',COLORFF00FF;
DRAWTEXT(B3>0,18,'SI底背',COLORYELLOW;
DRAWTEXT(D1>0,85,'ACD顶背',COLOR00FF00;
DRAWTEXT(D2>0,90,'DJ顶背',COLORFFCC66;
DRAWTEXT(D3>0,96,'SI顶背',COLORFFFFFF;
STICKLINE(B1>0,20,0,0,0),COLORRED;
STICKLINE(B2>0,20,0,0,0),COLORFF00FF;
STICKLINE(B3>0,20,0,0,0),COLORYELLOW;
STICKLINE(D1>0,80,100,0,0),COLOR00FF00;
STICKLINE(D2>0,100,80,0,0),COLORFFCC66;
STICKLINE(D3>0,100,80,0,0),COLORWHITE;
STICKLINE(B4>0,20,0,0,0),COLOR0099FF;
STICKLINE(D4>0,100,80,0,0),COLORBLUE;
VAR188:=((CLOSE - LLV(LOW,34))/(HHV(HIGH,34) - LLV(LOW,34)))*(100);
VAR288:=REVERSE(VAR188);
VAR388:=SMA(VAR188,9,1);
K88:=SMA(VAR388,3,1)*SJ;
D88:=SMA(K88,3,1)*SJ;
STICKLINE((K88 >= D88),K88,D88,1,0),COLOR0000FF;
STICKLINE((K88 <= D88),K88,D88,1,0),COLOR00FF00;
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容