[求助]帮忙转换指标,感谢! [文华财经]
-
咨询内容:
笔参数:=3;段参数:=3;DIF:EMA(CLOSE,12)-EMA(CLOSE,26)COLORRED,LINETHICK2;DEA:EMA(DIF,9);IF(DIF<DEA,DIF,DRAWNULL),COLORWHITE,LINETHICK2;MACD:(DIF-DEA)*2,COLORSTICK;笔低A:=LOW<=LLV(LOW,笔参数),NODRAW;笔高A:=HIGH>=HHV(HIGH,笔参数),NODRAW;笔低:=笔低A AND 笔高A=0,NODRAW;笔高:=笔高A AND 笔低A=0,NODRAW;上笔:=DRAWLINE(笔低,LOW,笔高,HIGH,0)COLOR0000FF;下笔:=DRAWLINE(笔高,HIGH,笔低,LOW,0),COLOR00FF00;拐下:=上笔>REF(上笔,1) AND 下笔>REFX(下笔,1),NODRAW;拐上:=下笔<REF(下笔,1) AND 上笔<REFX(上笔,1),NODRAW;段低A:=LOW<=LLV(LOW,段参数*笔参数),NODRAW;段高A:=HIGH>=HHV(HIGH,段参数*笔参数),NODRAW;段低:=段低A AND 段高A=0,NODRAW;段高:=段高A AND 段低A=0,NODRAW;上段:=DRAWLINE(段低,LOW,段高,HIGH,0),LINETHICK2,COLORMAGENTA;下段:=DRAWLINE(段高,HIGH,段低,LOW,0),LINETHICK2,COLORFF8000;特殊底:=下段=上段 AND 段低 AND MACD<0,NODRAW;TTT:=REF(BARSLAST(特殊底),1)+1;
底背离1:=特殊底 AND LOW<REF(LOW,TTT) AND DIF>REF(DIF,TTT) AND LLV(DIF,BARSLASTCOUNT(MACD<0))>REF(DIF,TTT),NODRAW;底背左点1:=BACKSET(底背离1,TTT+1) AND REF(BACKSET(底背离1,TTT+1),1)=0 AND 特殊底;DRAWLINE(底背左点1,DIF,底背离1,DIF,0),COLORFF00FF,LINETHICK2;底背离2:=特殊底 AND LOW<REF(LOW,TTT) AND MACD>REF(MACD,TTT) AND LLV(MACD,BARSLASTCOUNT(MACD<0))>REF(MACD,TTT),NODRAW;底背左点2:=BACKSET(底背离2,TTT+1) AND REF(BACKSET(底背离2,TTT+1),1)=0 AND 特殊底;DRAWLINE(底背左点2,MACD,底背离2,MACD,0),COLORFF00FF,LINETHICK1;
特殊顶:=下段=上段 AND 段高 AND MACD>0,NODRAW;TTTG:=REF(BARSLAST(特殊顶),1)+1;顶背离1:=特殊顶 AND HIGH>REF(HIGH,TTTG) AND DIF<REF(DIF,TTTG) AND HHV(DIF,BARSLASTCOUNT(MACD>0))<REF(DIF,TTTG),NODRAW;顶背左点1:=BACKSET(顶背离1,TTTG+1) AND REF(BACKSET(顶背离1,TTTG+1),1)=0 AND 特殊顶;DRAWLINE(顶背左点1,DIF,顶背离1,DIF,0),COLORGREEN,LINETHICK2;顶背离2:=特殊顶 AND HIGH>REF(HIGH,TTTG) AND MACD<REF(MACD,TTTG) AND HHV(MACD,BARSLASTCOUNT(MACD>0))<REF(MACD,TTTG),NODRAW;顶背左点2:=BACKSET(顶背离2,TTTG+1) AND REF(BACKSET(顶背离2,TTTG+1),1)=0 AND 特殊顶;DRAWLINE(顶背左点2,MACD,顶背离2,MACD,0),COLORGREEN,LINETHICK1;
DRAWTEXT(底背离2=1,MACD,'柱背离',COLORFF00FF;DRAWTEXT(底背离1=1,DIF,'线背离',COLORFF00FF;DRAWTEXT(顶背离2=1,MACD,'柱背离',COLORGREEN;DRAWTEXT(顶背离1=1,DIF,'线背离',COLORGREEN;
DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;XA_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);XA_3:=LLVBARS(MACD,XA_2+20);XA_4:=IF(XA_3>XA_2,REF(MACD,XA_3),0);XA_5:=MACD<0 AND MACD>XA_4 AND LOW=LLV(LOW,XA_2+20) AND XA_4<0;柱背离1:=(REF(XA_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,XA_3)<0 AND MACD<0),NODRAW;DRAWLINE(XA_4=XA_3,MACD,柱背离1,MACD,0),COLORRED,LINETHICK1;DRAWICON(柱背离1,0,26);柱背离A:BARSLAST(柱背离1>0)+1,COLORYELLOW,NODRAW;柱背离:BARSLAST(底背离2>0)+1,COLORMAGENTA,NODRAW;线背离:BARSLAST(底背离1>0)+1,COLORWHITE,NODRAW;
DRAWRECTREL(0,965,130,999,RGB(0,0,1)),NOFRAME;来源:程序化99
-
文华技术人员:
不同软件函数机制不同,加载起来有差异是正常的,
参考:
笔参数:=5;段参数:=1;DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;DEA:EMA(DIF,9);IF(DIF<DEA,DIF,NULL),COLORWHITE,LINETHICK2;MACD:(DIF-DEA)*2,COLORSTICK;笔低A:=LOW<=LLV(LOW,笔参数),NODRAW;笔高A:=HIGH>=HHV(HIGH,笔参数),NODRAW;笔低:=笔低A AND 笔高A=0,NODRAW;笔高:=笔高A AND 笔低A=0,NODRAW;上笔:=TRENDLINES(笔低,LOW,笔高,HIGH),COLOR0000FF;下笔:=TRENDLINES(笔高,HIGH,笔低,LOW),COLOR00FF00;拐下:=上笔>REF(上笔,1) AND 下笔>REFX(下笔,1),NODRAW;拐上:=下笔<REF(下笔,1) AND 上笔<REFX(上笔,1),NODRAW;段低A:=LOW<=LLV(LOW,段参数*笔参数),NODRAW;段高A:=HIGH>=HHV(HIGH,段参数*笔参数),NODRAW;段低:=段低A AND 段高A=0,NODRAW;段高:=段高A AND 段低A=0,NODRAW;上段:=TRENDLINES(段低,LOW,段高,HIGH),LINETHICK2,COLORMAGENTA;下段:=TRENDLINES(段高,HIGH,段低,LOW),LINETHICK2,COLORFF8000;特殊底:=下段=上段 AND 段低 AND MACD<0,NODRAW;TTT:=REF(BARSLAST(特殊底),1)+1;
底背离1:=特殊底 AND LOW<REF(LOW,TTT) AND DIF>REF(DIF,TTT) AND LLV(DIF,BARSLASTCOUNT(MACD<0))>REF(DIF,TTT),NODRAW;底背左点1:=BACKSET(底背离1,TTT+1) AND REF(BACKSET(底背离1,TTT+1),1)=0 AND 特殊底;DRAWLINE1(底背左点1,DIF,底背离1,DIF,0),COLORFF00FF,LINETHICK2;底背离2:=特殊底 AND LOW<REF(LOW,TTT) AND MACD>REF(MACD,TTT) AND LLV(MACD,BARSLASTCOUNT(MACD<0))>REF(MACD,TTT),NODRAW;底背左点2:=BACKSET(底背离2,TTT+1) AND REF(BACKSET(底背离2,TTT+1),1)=0 AND 特殊底;DRAWLINE1(底背左点2,MACD,底背离2,MACD,0),COLORFF00FF,LINETHICK1;
特殊顶:=下段=上段 AND 段高 AND MACD>0,NODRAW;TTTG:=REF(BARSLAST(特殊顶),1)+1;顶背离1:=特殊顶 AND HIGH>REF(HIGH,TTTG) AND DIF<REF(DIF,TTTG) AND HHV(DIF,BARSLASTCOUNT(MACD>0))<REF(DIF,TTTG),NODRAW;顶背左点1:=BACKSET(顶背离1,TTTG+1) AND REF(BACKSET(顶背离1,TTTG+1),1)=0 AND 特殊顶;DRAWLINE1(顶背左点1,DIF,顶背离1,DIF,0),COLORGREEN,LINETHICK2;顶背离2:=特殊顶 AND HIGH>REF(HIGH,TTTG) AND MACD<REF(MACD,TTTG) AND HHV(MACD,BARSLASTCOUNT(MACD>0))<REF(MACD,TTTG),NODRAW;顶背左点2:=BACKSET(顶背离2,TTTG+1) AND REF(BACKSET(顶背离2,TTTG+1),1)=0 AND 特殊顶;DRAWLINE1(顶背左点2,MACD,顶背离2,MACD,0),COLORGREEN,LINETHICK1;
DRAWTEXT(底背离2=1,MACD,'柱背离',COLORFF00FF;DRAWTEXT(底背离1=1,DIF,'线背离',COLORFF00FF;DRAWTEXT(顶背离2=1,MACD,'柱背离',COLORGREEN;DRAWTEXT(顶背离1=1,DIF,'线背离',COLORGREEN;
DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;XA_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);XA_3:=LLVBARS(MACD,XA_2+20);XA_4:=IF(XA_3>XA_2,REF(MACD,XA_3),0);XA_5:=MACD<0 AND MACD>XA_4 AND LOW=LLV(LOW,XA_2+20) AND XA_4<0;柱背离1:=(REF(XA_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,XA_3)<0 AND MACD<0),NODRAW;DRAWLINE1(XA_4=XA_3,MACD,柱背离1,MACD,0),COLORRED,LINETHICK1;DRAWICON(柱背离1,0,26);柱背离A:BARSLAST(柱背离1>0)+1,NODRAW;柱背离:BARSLAST(底背离2>0)+1,NODRAW;线背离:BARSLAST(底背离1>0)+1,NODRAW;
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容