请老师修改成博弈大师能用的 [博易POBO]
咨询内容:
S:=12;
M:=9;
CC:=CLOSE;
DIFF:EMA(CC,S)-EMA(CC,G);
DEA:EMA(DIFF,M);
MACD:2*(DIFF-DEA),COLORSTICK;
M1:=REF(MACD,1);
//partline(macd<ref(macd,1),macd),colorgreen;partline(macd>ref(macd,1),macd),COLORMAGENTA;
stickline(macd>ref(macd,1),macd,0,0,0),colorred;
stickline(macd<ref(macd,1),macd,0,0,0),colorcyan;
STICKLINE(macd>0 and macd<=m1,0,macd,3,0),colorwhite;
STICKLINE(macd<0 and macd>=m1,0,macd,3,0),colorred;
DIF:=EMA(CC,S)-EMA(CC,G);
ESS:=EMA(CC,S);
EGG:=EMA(CC,G);
RDIF:=REF(DIF,1);
RSS:=REF(ESS,1);
RGG:=REF(EGG,1);
RDEA:=REF(DEA,1);
RMACD:=REF(MACD,1);
RZZZ:=(RDEA+((M+1)/(2*(M-1)))*RMACD);
XDIF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDIF)/(2*G-2*S);
XDEA:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDEA)/(2*G-2*S);
XMACD:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RZZZ)/(2*G-2*S);
AA:=ISLASTBAR;
BB:=BACKSET(AA=1,1);
Y:=BARSLAST(BB=1);
X:=Y+1;
TDIF:=DIF*X;
TSS:=ESS*X;
TGG:=EGG*X;
TDEA:=DEA*X;
TMACD:=MACD*X;
TZZZ:=(TDEA+((M+1)/(2*(M-1)))*TMACD);
YDIF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDIF)/(2*G-2*S);
YDEA:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDEA)/(2*G-2*S);
YMACD:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TZZZ)/(2*G-2*S);
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,2,'今日DIF转折:'+NUMTOSTR(XDIF,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,20,'今日DEA转折:'+NUMTOSTR(XDEA,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,38,'今日MACD转折:'+NUMTOSTR(XMACD,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,74,'明日DIF转折:'+NUMTOSTR(YDIF,2)),COLORWHITE;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,92,'明日DEA转折:'+NUMTOSTR(YDEA,2)),COLORWHITE;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,110,'明日MACD转折:'+NUMTOSTR(YMACD,2)),COLORWHITE;
STICKLINE(CROSS(MACD,REF(MACD,1) ),0,MACD,3,0),COLOR0000FF;
STICKLINE(CROSS(REF(MACD,1),MACD) ,0,MACD,3,0),COLOR40FF00;
PARTLINE(DEA<=ref(DEA,1),DEA),COLORGREEN;
请老师修改成博弈大师能用的
G:=26;S:=12;
M:=9;
CC:=CLOSE;
DIFF:EMA(CC,S)-EMA(CC,G);
DEA:EMA(DIFF,M);
MACD:2*(DIFF-DEA),COLORSTICK;
M1:=REF(MACD,1);
//partline(macd<ref(macd,1),macd),colorgreen;partline(macd>ref(macd,1),macd),COLORMAGENTA;
stickline(macd>ref(macd,1),macd,0,0,0),colorred;
stickline(macd<ref(macd,1),macd,0,0,0),colorcyan;
STICKLINE(macd>0 and macd<=m1,0,macd,3,0),colorwhite;
STICKLINE(macd<0 and macd>=m1,0,macd,3,0),colorred;
DIF:=EMA(CC,S)-EMA(CC,G);
ESS:=EMA(CC,S);
EGG:=EMA(CC,G);
RDIF:=REF(DIF,1);
RSS:=REF(ESS,1);
RGG:=REF(EGG,1);
RDEA:=REF(DEA,1);
RMACD:=REF(MACD,1);
RZZZ:=(RDEA+((M+1)/(2*(M-1)))*RMACD);
XDIF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDIF)/(2*G-2*S);
XDEA:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDEA)/(2*G-2*S);
XMACD:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RZZZ)/(2*G-2*S);
AA:=ISLASTBAR;
BB:=BACKSET(AA=1,1);
Y:=BARSLAST(BB=1);
X:=Y+1;
TDIF:=DIF*X;
TSS:=ESS*X;
TGG:=EGG*X;
TDEA:=DEA*X;
TMACD:=MACD*X;
TZZZ:=(TDEA+((M+1)/(2*(M-1)))*TMACD);
YDIF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDIF)/(2*G-2*S);
YDEA:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDEA)/(2*G-2*S);
YMACD:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TZZZ)/(2*G-2*S);
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,2,'今日DIF转折:'+NUMTOSTR(XDIF,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,20,'今日DEA转折:'+NUMTOSTR(XDEA,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,38,'今日MACD转折:'+NUMTOSTR(XMACD,2)),COLORGREEN;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,74,'明日DIF转折:'+NUMTOSTR(YDIF,2)),COLORWHITE;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,92,'明日DEA转折:'+NUMTOSTR(YDEA,2)),COLORWHITE;
DRAWTEXTEX(SYSPARAM(3)=BARPOS,0,6,110,'明日MACD转折:'+NUMTOSTR(YMACD,2)),COLORWHITE;
STICKLINE(CROSS(MACD,REF(MACD,1) ),0,MACD,3,0),COLOR0000FF;
STICKLINE(CROSS(REF(MACD,1),MACD) ,0,MACD,3,0),COLOR40FF00;
PARTLINE(DEA<=ref(DEA,1),DEA),COLORGREEN;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 您好,这个公式不能修改。 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容