求高手把通达信公式改为东方财富可用,谢谢
怎样把通达信的公式改为东方财富的?谢谢!
这段公式代码在东方财富上是可以用的.
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
买进:(LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)REF(DOWN,1);
通达信公式改成东方财富公式,请高手帮忙!谢谢!
HIGHN:=10;
AA:=REF(C,HIGHN)=HHV(C,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND C=HHV(C,HIGHN+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(C,DDD),C);
DINGBU1:=REF(DINGBU,DDD+1);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+10);
LOWN:=10;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DD1:=BARSLAST(CC1);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10),COLORYELLOW;
MA20:MA(CLOSE,20),COLORMAGENTA;
{短T}
ZZ:=5;
AC:=REF(C,ZZ)=HHV(C,2*ZZ+1);
AD:=BACKSET(AC,ZZ+1);
AE:=FILTER(AD,ZZ) AND C=HHV(C,ZZ+1);
AF:=BARSLAST(AE);AG:=IF(AE,CURRBARSCOUNT,0);
AH:=IF(AF,REF(C,AF),C);
AI:=IF(AF,REF(AG,AF),AG);
AL:=CONST(AI);
短T:DRAWLINE(CURRBARSCOUNT=AL,C,ISLASTBAR,REF(C,AL-1),1),DOTLINE,COLORCYAN;
T线:DRAWLINE(CURRBARSCOUNT=GDCS1,C,ISLASTBAR,REF(C,GDCS1-1),1),DOTLINE,COLORWHITE;
过T:IF(CROSS(C,T线),T线,DRAWNULL),CIRCLEDOT,COLORYELLOW;
DRAWICON(CROSS(C,T线),L*0.98,7);
DRAWICON(CROSS(T线,C),H*1.01,8);
DRAWICON(CROSS(C,短T),L*0.98,7);
DRAWICON(CROSS(短T,C),H*1.01,8);
-------------------------------------------------
注意:公式测试成功,但在财富通软件上显示的射线会与通达信不一样(向右下倾斜)。
求助,把这个通达信公式改成东方财富软件能用的,谢谢
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA30:MA(C,30);
MA60:MA(C,60);
MA120:MA(C,120);
MA250:MA(C,250);
DRAWICON(CURRBARSCOUNT=5,low,3);
DRAWICON(CURRBARSCOUNT=10,low,3);
DRAWICON(CURRBARSCOUNT=20,low,3);
DRAWICON(CURRBARSCOUNT=30,low,3);
DRAWICON(CURRBARSCOUNT=60,low,3);
DRAWICON(CURRBARSCOUNT=120,low,3);
DRAWICON(CURRBARSCOUNT=250,low,3);
均线型 主图
求高手帮忙把这个通达信指标,改为东方财富通能用的,谢谢了!
虽然东方财富通过,但是希望不要用它,这种指标秀一秀还可以,没有使用价值,因为里面引用了未来函数。不过您既然需要还是给您修改了,如下:
布林中线:MA(CLOSE,21);
布林上线:布林中线+2*STD(CLOSE,21),COLORGREEN;
布林下线:布林中线-2*STD(CLOSE,21),COLORRED;
局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
局部极点A:=局部低点预选C+局部高点预选C;
AAAA:IF(局部低点预选C=-1,L,IF(局部高点预选C=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW;
缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
距前高天:=BARSLAST(局部高点预选C=1);
距前低天:=BARSLAST(局部低点预选C=-1);
小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);
低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);
预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);
AAAD:=IF(高保留=1 AND 低保留=-1 AND H>REF(H,REF(距前高天,1)+2),1,IF(高保留=1 AND 低保留=-1 AND L<REF(L,REF(距前低天,1)+2),-1,0));
极点保留:=IF(AAAD=0,高保留+低保留,AAAD);
局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW;
DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORBLUE;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORBLUE;