您现在的位置:程序化交易>> 期货公式>> 博易大师>> 博易大师知识>>正文内容

请老师改成博弈 [博易POBO]

咨询内容:

请老师改成博弈

DIFF :=EMA(C,12) - EMA(C,26);//短周期与长周期的收盘价的指数平滑移动平均值做差。
DEA :=EMA(DIFF,9);//DIFF的M个周期指数平滑移动平均
MACD:=2*(DIFF-DEA),COLORSTICK;//DIFF减DEA的2倍画柱状线

QQQ:=CROSS(BACKSET(ISLASTBAR&&MACD>0,HHVBARS(H,BARSLAST(CROSS(DIFF,DEA))+1)+1),0.5);
PPP:=CROSS(BACKSET(ISLASTBAR&&MACD<0,LLVBARS(L,BARSLAST(CROSSDOWN(DIFF,DEA))+1)+1),0.5);
QQQ1:=CROSS(BACKSET(REFX(QQQ,1),LLVBARS(L,BARSLAST(CROSSDOWN(DIFF,DEA))+1)+1),0.5);
PPP1:=CROSS(BACKSET(REFX(PPP,1),HHVBARS(H,BARSLAST(CROSS(DIFF,DEA))+1)+1),0.5);

N:=BARSLAST(CROSS(DIFF,DEA));
M:=BARSLAST(CROSSDOWN(DIFF,DEA));
XXX:CROSS(BACKSET(ISLASTBAR&&MACD<0,REF(LLVBARS(L,BARSLAST(CROSSDOWN(DIFF,DEA))+1),N)+N+1),0.5);
YYY:CROSS(BACKSET(ISLASTBAR&&MACD>0,REF(HHVBARS(H,BARSLAST(CROSS(DIFF,DEA))+1),M)+M+1),0.5);


DRAWLINE1(QQQ1,L,QQQ,H,0),COLORWHITE,LINETHICK2;
DRAWLINE1(PPP1,H,PPP,L,0),COLORWHITE,LINETHICK2;
DRAWLINE1(XXX,L,PPP1,H,0),COLORGREEN,LINETHICK2;

DRAWLINE1(YYY,H,QQQ1,L,0),COLORRED,LINETHICK2;


Y:=IF(MACD>0,BARSLAST(YYY),BARSLAST(XXX));

DRAWSL(ISLASTBAR&&MACD>0,VALUEWHEN(YYY,H),0,-Y,0,COLORRED),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD>0,VALUEWHEN(QQQ1,L),0,-Y,0,COLORGREEN),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD>0,(VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.382+VALUEWHEN(QQQ1,L),0,-Y,0,COLORRED),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD>0,(VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.612+VALUEWHEN(QQQ1,L),0,-Y,0,COLORYELLOW),LINETHICK5;

DRAWTEXT(YYY,REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.382+VALUEWHEN(QQQ1,L),10000),'0.382');
DRAWTEXT(YYY,REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.612+VALUEWHEN(QQQ1,L),10000),'0.612');
DRAWTEXT(YYY,REFX1(VALUEWHEN(YYY,H),10000),'1.000');
DRAWTEXT(YYY,REFX1(VALUEWHEN(QQQ1,L),10000),'0.000');

DRAWNUMBER(YYY,REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.382+VALUEWHEN(QQQ1,L),10000),
REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.382+VALUEWHEN(QQQ1,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;

DRAWNUMBER(YYY,REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.612+VALUEWHEN(QQQ1,L),10000),
REFX1((VALUEWHEN(YYY,H)-VALUEWHEN(QQQ1,L))*0.612+VALUEWHEN(QQQ1,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;

DRAWNUMBER(YYY,REFX1(VALUEWHEN(QQQ1,L),10000),REFX1(VALUEWHEN(QQQ1,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;
DRAWNUMBER(YYY,REFX1(VALUEWHEN(YYY,H),10000),REFX1(VALUEWHEN(YYY,H),10000),0,COLORWHITE),VALIGN0,LINETHICK2;




DRAWSL(ISLASTBAR&&MACD<0,VALUEWHEN(PPP1,H),0,-Y,0,COLORRED),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD<0,VALUEWHEN(XXX,L),0,-Y,0,COLORGREEN),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD<0,(VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.382+VALUEWHEN(XXX,L),0,-Y,0,COLORRED),LINETHICK5;
DRAWSL(ISLASTBAR&&MACD<0,(VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.612+VALUEWHEN(XXX,L),0,-Y,0,COLORYELLOW),LINETHICK5;

DRAWTEXT(XXX,REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.382+VALUEWHEN(XXX,L),10000),'0.382');
DRAWTEXT(XXX,REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.612+VALUEWHEN(XXX,L),10000),'0.612');
DRAWTEXT(XXX,REFX1(VALUEWHEN(PPP1,H),10000),'1.000');
DRAWTEXT(XXX,REFX1(VALUEWHEN(XXX,L),10000),'0.000');

DRAWNUMBER(XXX,REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.382+VALUEWHEN(XXX,L),10000),
REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.382+VALUEWHEN(XXX,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;

DRAWNUMBER(XXX,REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.612+VALUEWHEN(XXX,L),10000),
REFX1((VALUEWHEN(PPP1,H)-VALUEWHEN(XXX,L))*0.612+VALUEWHEN(XXX,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;

DRAWNUMBER(XXX,REFX1(VALUEWHEN(XXX,L),10000),REFX1(VALUEWHEN(XXX,L),10000),0,COLORWHITE),VALIGN0,LINETHICK2;
DRAWNUMBER(XXX,REFX1(VALUEWHEN(PPP1,H),10000),REFX1(VALUEWHEN(PPP1,H),10000),0,COLORWHITE),VALIGN0,LINETHICK2;

 

 来源:程序化99网( WWW.CXH99.COM )

博易技术人员: 无法修改,请勿再频繁发此类指标,这里不是指标论坛,是软件使用的问答平台,请到指标论坛去求助,以后再发,均删帖处理。 论坛里好多都是修改指标吧 来源 程序化久久网

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容