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

辛苦老师将文华指标改成博易用,谢谢! [博易POBO]

咨询内容:

辛苦老师将文华指标改成博易用,谢谢!


显示仪表盘1:=1;
//DRAWGBK1(1,RGB(0,0,0),RGB(0,0,0),0,'BJ1',0);
TYP:=(CLOSE+HIGH+LOW)/3;//求最新价,最高价和最低价三者的简单平均
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
{======================================================}
范围高A:=REFX1(HHV(H,120),9999)*1.05;
范围低A:=REFX1(LLV(L,120),9999)*0.95;
MA5:=MA(C,5),COLORCYAN,LINETHICK2;
MA24:=MA(C,24),COLORGREEN,LINETHICK2;
MA72:=MA(C,72),COLORRED,LINETHICK2;
MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),NULL),COLORBLUE,LINETHICK2;
{=======================仪表盘=========================}
主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=NULL,0,MA200);
主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=NULL,0,MA200);
主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=NULL,0,MA200);
初升浪:=ISLASTBAR AND IF(MA200=NULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;
底部反弹:=ISLASTBAR AND IF(MA200=NULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;
探底阶段:=ISLASTBAR AND IF(MA200=NULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;
观望:=ISLASTBAR AND IF(MA200=NULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);
有牛:=ISLASTBAR AND IF(MA200=NULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);
放弃:=ISLASTBAR AND IF(MA200=NULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);
/*
DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0),COLOR00BF00;
DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0),COLORFF00FF;
DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0),COLORFF8080;
DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0),COLOR009500;
DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0),COLOR00FFFF;
DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0),COLORFFFF00;
DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);
DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0),COLORFFFF00;
DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0),COLOR00FFFF;
DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0),COLOR00BF00;
*/
引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;
引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;
三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;
N:=120;
CURRBARSCOUNT:=REFX1(BARPOS,9999)-BARPOS+1;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=REFX1(IF(ISLASTBAR=1,HHV(H,K),0),9999),NODRAW;
{高点}
DD:=REFX1(IF(ISLASTBAR=1,LLV(L,K),0),9999),NODRAW;
{低点}
KJ:=GD-DD;
{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/2,GD,NULL);
高区:IF(CURRBARSCOUNT<=N,GD,NULL),COLORRED,LINETHICK2,NODRAW;
低区:IF(CURRBARSCOUNT<=N,DD,NULL),COLOR00FF00,LINETHICK2,NODRAW;
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,NULL),COLOR00FFFF,NODRAW;
低:IF(CURRBARSCOUNT<=N/2,DD,NULL),COLORFFFF00;
高:IF(CURRBARSCOUNT<=N/2,GD,NULL),COLOR00FFFF;
支撑:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,NULL),COLOR00FFFF;
强势: IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,NULL),COLORFF00FF;
突破:IF(CURRBARSCOUNT<=N/2,DD+KJ/2,NULL),COLOR0000FF;
警示:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,NULL),COLOR00FFFF;
压力:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.809,NULL),COLOR00FF00;
低涨:IF(CURRBARSCOUNT<=N/2,(C/LLV(LOW,K)-1)*100,NULL),COLOR0000FF,NODRAW;
天数:BARSLAST(L=DD),COLORCYAN,NODRAW;
顶点:IF(CURRBARSCOUNT<=N/2, REFX1(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1),9999),NULL),COLORRED,CROSSDOT,NODRAW;
低点:IF(CURRBARSCOUNT<=N/2, REFX1(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1),9999),NULL),COLORMAGENTA,CROSSDOT,NODRAW;
STICKLINE(CCI>=200 AND H>=顶点,O,C,2,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低点,O,C,2,0),COLORYELLOW;

STICKLINE(CURRBARSCOUNT=N/2,GD,DD,0,0),COLOR408080,NODRAW;
STICKLINE(CURRBARSCOUNT<=N/2,支撑,支撑,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,强势,强势,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,突破,突破,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,警示,警示,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,压力,压力,2,0),COLOR1E1E1E;
DRAWTEXT(CURRBARSCOUNT=10,压力,'压力-0.809'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,警示,'警示-0.618'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,突破,'突破-0.500'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,强势,'强势-0.382'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,支撑,'支撑-0.191'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.09,'【风险区】--高抛避险'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.3,'【警示区】--逢高减仓'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.45,'【突破区】--主力拉升'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.55,'【拉升区】--强势畜锐'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/3,'【关注区】--逢低买入'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/10,'【低吸区】--大胆买入'),COLORFFFFFF;
第一防线:REFX1(低,9999),DOT,COLORYELLOW,NODRAW;
第二防线:REFX1(支撑,9999),DOT,COLORWHITE,NODRAW;

DRAWKLINE1(H,O,L,C);
AHC1:=CLOSE*VOL;
AHC22:=EMA((EMA(AHC1,27)/EMA(VOL,27)+EMA(AHC1,54)/EMA(VOL,54)+EMA(AHC1,108)/EMA(VOL,108)+EMA(AHC1,316)/EMA(VOL,316))/4,34);
上轨:=1.06*AHC22,COLOR40FF00,LINETHICK1;
下轨:=AHC22*0.94;

 

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

博易技术人员: 显示仪表盘1:=1;
//DRAWGBK1(1,RGB(0,0,0),RGB(0,0,0),0,'BJ1',0);
TYP:=(CLOSE+HIGH+LOW)/3;//求最新价,最高价和最低价三者的简单平均
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
{======================================================}
A1:=DATACOUNT-BARPOS-1;
范围高A:=REFX(HHV(H,120),A1)*1.05;
范围低A:=REFX(LLV(L,120),A1)*0.95;
MA5:=MA(C,5),COLORCYAN,LINETHICK2;
MA24:=MA(C,24),COLORGREEN,LINETHICK2;
MA72:=MA(C,72),COLORRED,LINETHICK2;
MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;
{=======================仪表盘=========================}
主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);
初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;
底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;
探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;
观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);
有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);
放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);


引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;
引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;
三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;
N:=120;
CURRBARSCOUNT:=REFX(BARPOS,A1)-BARPOS+1;
K:=BARSLAST(A1=N);
GD:=REFX(IF(ISLASTBAR=1,HHV(H,K),0),A1),NODRAW;
{高点}
DD:=REFX(IF(ISLASTBAR=1,LLV(L,K),0),A1),NODRAW;
{低点}
KJ:=GD-DD;
{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL);
高区:IF(CURRBARSCOUNT<=N,GD,DRAWNULL),COLORRED,LINETHICK2,NODRAW;
低区:IF(CURRBARSCOUNT<=N,DD,DRAWNULL),COLOR00FF00,LINETHICK2,NODRAW;
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;
低:IF(CURRBARSCOUNT<=N/2,DD,DRAWNULL),COLORFFFF00;
高:IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL),COLOR00FFFF;
支撑:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL),COLOR00FFFF;
强势: IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL),COLORFF00FF;
突破:IF(CURRBARSCOUNT<=N/2,DD+KJ/2,DRAWNULL),COLOR0000FF;
警示:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,DRAWNULL),COLOR00FFFF;
压力:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.809,DRAWNULL),COLOR00FF00;
低涨:IF(CURRBARSCOUNT<=N/2,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;
天数:BARSLAST(L=DD),COLORCYAN,NODRAW;
顶点:IF(CURRBARSCOUNT<=N/2, REFX(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1),A1),DRAWNULL),COLORRED,CROSSDOT,NODRAW;
低点:IF(CURRBARSCOUNT<=N/2, REFX(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1),A1),DRAWNULL),COLORMAGENTA,CROSSDOT,NODRAW;
STICKLINE(CCI>=200 AND H>=顶点,O,C,2,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低点,O,C,2,0),COLORYELLOW;

STICKLINE(CURRBARSCOUNT=N/2,GD,DD,0,0),COLOR408080,NODRAW;
STICKLINE(CURRBARSCOUNT<=N/2,支撑,支撑,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,强势,强势,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,突破,突破,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,警示,警示,2,0),COLOR1E1E1E;
STICKLINE(CURRBARSCOUNT<=N/2,压力,压力,2,0),COLOR1E1E1E;
DRAWTEXT(CURRBARSCOUNT=10,压力,'压力-0.809'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,警示,'警示-0.618'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,突破,'突破-0.500'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,强势,'强势-0.382'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=10,支撑,'支撑-0.191'),COLOR00FFFF,NODRAW;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.09,'【风险区】--高抛避险'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.3,'【警示区】--逢高减仓'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.45,'【突破区】--主力拉升'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.55,'【拉升区】--强势畜锐'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/3,'【关注区】--逢低买入'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/10,'【低吸区】--大胆买入'),COLORFFFFFF;
第一防线:REFX(低,A1),POINTDOT,COLORYELLOW,NODRAW;
第二防线:REFX(支撑,A1),POINTDOT,COLORWHITE,NODRAW;

DRAWKLINE(H,O,L,C);
AHC1:=CLOSE*VOL;
AHC22:=EMA((EMA(AHC1,27)/EMA(VOL,27)+EMA(AHC1,54)/EMA(VOL,54)+EMA(AHC1,108)/EMA(VOL,108)+EMA(AHC1,316)/EMA(VOL,316))/4,34);
上轨:=1.06*AHC22,COLOR40FF00,LINETHICK1;
下轨:=AHC22*0.94; 这是主图指标吗? 来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容