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

麻烦老师给改下指标,谢谢 [博易POBO]

咨询内容:

麻烦老师给改下指标,谢谢

把黄色线改到背景颜色两边,短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
B:=(短高H+短低L)/2;
D:=MA(B,10);
D14:=MA(B,14),COLORRED,LINETHICK2;
D21:=MA(B,21),COLORRED,LINETHICK2;
A1:=MA((3*C+L+O+H)/6,28);
B1:=(20*A1+19*REF(A1,1)+18*REF(A1,2)+17*REF(A1,3)+16*REF(A1,4)+15*REF(A1,5)+14*REF(A1,6)
+13*REF(A1,7)+12*REF(A1,8)+11*REF(A1,9)+10*REF(A1,10)+9*REF(A1,11)+8*REF(A1,12)
+7*REF(A1,13)+6*REF(A1,14)+5*REF(A1,15)+4*REF(A1,16)+3*REF(A1,17)+2*REF(A1,18)+
REF(A1,12))/210,COLORGREEN,LINETHICK1;
D1:=MA(B1,14),COLORGREEN,LINETHICK2;
D90H:=EMA(短高H,90),COLORRED,LINETHICK1;
D90L:=EMA(短低L,90),COLORRED,LINETHICK1;
D90差:=D90H-D90L;
D90顶:=D90H+D90差*2,COLORRED,LINETHICK1;
D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
D90HH:=D90H-D90差*0.1,COLORRED,LINETHICK1;
D90LL:=D90L+D90差*0.1,COLORRED,LINETHICK1;
高0:=(MA(MA(H,30),30)-MA(MA(L,30),30))*1+MA(MA(H,30),30);
低0:=MA(MA(L,30),30)-(MA(MA(H,30),30)-MA(MA(L,30),30))*1;
多头定位:=低0>=D90底 AND 高0>=D90顶;
空头定位:=高0<=D90顶 AND 低0<=D90底;
震荡定位:=低0>=D90底 AND 高0<=D90顶;
波段顶00:=(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6+MA(MA(H,60),60);
波段底00:=MA(MA(L,60),60)-(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6;

STICKLINE(1=1,D90HH,D90LL,5,0),COLORGRAY;
做空:(MA(MA(H,30),30)-MA(MA(L,30),30))*1+MA(MA(H,30),30),LINETHICK2,COLORWHITE;
做多:MA(MA(L,30),30)-(MA(MA(H,30),30)-MA(MA(L,30),30))*1,LINETHICK2,COLORWHITE;
波段顶:(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6+MA(MA(H,60),60),LINETHICK2,COLORYELLOW;
波段底:MA(MA(L,60),60)-(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6,LINETHICK2,COLORYELLOW;
B0:=(短高H+短低L)/2;
D0:=MA(B0,10);
多空中线:=(B0+D0)/2,COLORYELLOW,LINETHICK2;
布林线顶1:EMA(多空中线,10)+5*STD(EMA(多空中线,10),10),COLORWHITE;
布林线底1:EMA(多空中线,10)-5*STD(EMA(多空中线,10),10),COLORWHITE;
DRAWTEXT(ISLASTBAR,做空,'空'),COLORGREEN;
DRAWTEXT(ISLASTBAR,做多,'多'),COLORRED;
DRAWTEXT(ISLASTBAR,波段顶,'顶'),COLORGREEN;
DRAWTEXT(ISLASTBAR,波段底,'底'),COLORRED;
MACD价格:=EMA(CLOSE,3) - EMA(CLOSE,9);
DEA33:=EMA((EMA(MACD价格,3) - EMA(MACD价格,9)),9),COLORWHITE,LINETHICK0;
DEA333:=REF(DEA33,1),COLORWHITE,LINETHICK0;
STICKLINE(DEA333<=DEA33,LOW,HIGH,0,0),COLORRED;
STICKLINE(DEA333<=DEA33,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(DEA333>=DEA33,LOW,HIGH,0,0),COLORGREEN;
STICKLINE(DEA333>=DEA33,CLOSE,OPEN,3,1),COLORGREEN;
CCI3:=((H+L+C)/3-MA((H+L+C)/3,3))/(0.015*AVEDEV((H+L+C)/3,3));
STICKLINE(L<做多 AND CROSS(CCI3,-50) AND REF(CCI3,1)<0,LOW,HIGH,0,0),COLORMAGENTA;


AAA:=DATACOUNT-BARPOS>25/2;
AAA1:=DATACOUNT-BARPOS>30;
CCC:=DATACOUNT-BARPOS-1;
XH25:=IF(AAA,REFX(MA(H,25),25/2),REFX(MA(H,25),CCC));
XHH25:=IF(AAA,REFX(XH25,25/2),REFX(MA(XH25,25),CCC));
XL25:IF(AAA,REFX(MA(L,25),25/2),REFX(MA(L,25),CCC));
XLL25:=IF(AAA,REFX(XL25,25/2),REFX(MA(XL25,25),CCC));
//-----转换XMA(X,N)结束---------------------
//XMA(X,N)=(SUM(X,N-1)+MA(X,N-1))/N
//XMA(X,N)=REFX1(MA(X,N),N/2);
//(SUM(H,60-1)+MA(H,60-1))/60;
XMAH60:=IF(AAA1,REFX(MA(H,60),60/2),REFX(MA(H,60),CCC));
//(SUM(L,60-1)+MA(L,60-1))/60;
XMAL60:=IF(AAA1,REFX(MA(L,60),60/2),REFX(MA(L,60),CCC));
//(SUM(XMAH60,60-1)+MA(XMAH60,60-1))/60;
XMAHH60:=IF(AAA1,REFX(MA(XMAH60,60),60/2),REFX(MA(XMAH60,60),CCC));
//(SUM(XMAL60,60-1)+MA(XMAL60,60-1))/60;
XMALL60:=IF(AAA1,REFX(MA(XMAL60,60),60/2),REFX(MA(XMAL60,60),CCC));
波段顶0:=(XMAHH60-XMALL60)*2.6+XMAHH60;
波段底0:=XMALL60-(XMAHH60-XMALL60)*2.6;
//波段顶00:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.6+XMA(XMA(H,60),60);
//波段底00:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.6;
STICKLINE(多头定位=1,波段顶0,波段底0,15,0),COLOR000066;
STICKLINE(空头定位=1,波段顶0,波段底0,15,0),COLOR003300;
STICKLINE(震荡定位=1,波段顶0,波段底0,15,0),COLOR555555;



 

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

博易技术人员: 短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
B:=(短高H+短低L)/2;
D:=MA(B,10);
D14:=MA(B,14),COLORRED,LINETHICK2;
D21:=MA(B,21),COLORRED,LINETHICK2;
A1:=MA((3*C+L+O+H)/6,28);
B1:=(20*A1+19*REF(A1,1)+18*REF(A1,2)+17*REF(A1,3)+16*REF(A1,4)+15*REF(A1,5)+14*REF(A1,6)
+13*REF(A1,7)+12*REF(A1,8)+11*REF(A1,9)+10*REF(A1,10)+9*REF(A1,11)+8*REF(A1,12)
+7*REF(A1,13)+6*REF(A1,14)+5*REF(A1,15)+4*REF(A1,16)+3*REF(A1,17)+2*REF(A1,18)+
REF(A1,12))/210,COLORGREEN,LINETHICK1;
D1:=MA(B1,14),COLORGREEN,LINETHICK2;
D90H:=EMA(短高H,90),COLORRED,LINETHICK1;
D90L:=EMA(短低L,90),COLORRED,LINETHICK1;
D90差:=D90H-D90L;
D90顶:=D90H+D90差*2,COLORRED,LINETHICK1;
D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
D90HH:=D90H-D90差*0.1,COLORRED,LINETHICK1;
D90LL:=D90L+D90差*0.1,COLORRED,LINETHICK1;
高0:=(MA(MA(H,30),30)-MA(MA(L,30),30))*1+MA(MA(H,30),30);
低0:=MA(MA(L,30),30)-(MA(MA(H,30),30)-MA(MA(L,30),30))*1;
多头定位:=低0>=D90底 AND 高0>=D90顶;
空头定位:=高0<=D90顶 AND 低0<=D90底;
震荡定位:=低0>=D90底 AND 高0<=D90顶;
波段顶00:=(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6+MA(MA(H,60),60);
波段底00:=MA(MA(L,60),60)-(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6;

AAA:=DATACOUNT-BARPOS>25/2;
AAA1:=DATACOUNT-BARPOS>30;
CCC:=DATACOUNT-BARPOS-1;
XH25:=IF(AAA,REFX(MA(H,25),25/2),REFX(MA(H,25),CCC));
XHH25:=IF(AAA,REFX(XH25,25/2),REFX(MA(XH25,25),CCC));
XL25:IF(AAA,REFX(MA(L,25),25/2),REFX(MA(L,25),CCC));
XLL25:=IF(AAA,REFX(XL25,25/2),REFX(MA(XL25,25),CCC));
//-----转换XMA(X,N)结束---------------------
//XMA(X,N)=(SUM(X,N-1)+MA(X,N-1))/N
//XMA(X,N)=REFX1(MA(X,N),N/2);
//(SUM(H,60-1)+MA(H,60-1))/60;
XMAH60:=IF(AAA1,REFX(MA(H,60),60/2),REFX(MA(H,60),CCC));
//(SUM(L,60-1)+MA(L,60-1))/60;
XMAL60:=IF(AAA1,REFX(MA(L,60),60/2),REFX(MA(L,60),CCC));
//(SUM(XMAH60,60-1)+MA(XMAH60,60-1))/60;
XMAHH60:=IF(AAA1,REFX(MA(XMAH60,60),60/2),REFX(MA(XMAH60,60),CCC));
//(SUM(XMAL60,60-1)+MA(XMAL60,60-1))/60;
XMALL60:=IF(AAA1,REFX(MA(XMAL60,60),60/2),REFX(MA(XMAL60,60),CCC));
波段顶0:=(XMAHH60-XMALL60)*2.6+XMAHH60;
波段底0:=XMALL60-(XMAHH60-XMALL60)*2.6;
//波段顶00:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.6+XMA(XMA(H,60),60);
//波段底00:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.6;
STICKLINE(多头定位=1,波段顶0,波段底0,15,0),COLOR000066;
STICKLINE(空头定位=1,波段顶0,波段底0,15,0),COLOR003300;
STICKLINE(震荡定位=1,波段顶0,波段底0,15,0),COLOR555555;
STICKLINE(1=1,D90HH,D90LL,5,0),COLORGRAY;
做空:(MA(MA(H,30),30)-MA(MA(L,30),30))*1+MA(MA(H,30),30),LINETHICK2,COLORWHITE;
做多:MA(MA(L,30),30)-(MA(MA(H,30),30)-MA(MA(L,30),30))*1,LINETHICK2,COLORWHITE;
波段顶:(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6+MA(MA(H,60),60),LINETHICK2,COLORYELLOW;
波段底:MA(MA(L,60),60)-(MA(MA(H,60),60)-MA(MA(L,60),60))*2.6,LINETHICK2,COLORYELLOW;
B0:=(短高H+短低L)/2;
D0:=MA(B0,10);
多空中线:=(B0+D0)/2,COLORYELLOW,LINETHICK2;

DRAWTEXT(ISLASTBAR,做空,'空'),COLORGREEN;
DRAWTEXT(ISLASTBAR,做多,'多'),COLORRED;
DRAWTEXT(ISLASTBAR,波段顶,'顶'),COLORGREEN;
DRAWTEXT(ISLASTBAR,波段底,'底'),COLORRED;
MACD价格:=EMA(CLOSE,3) - EMA(CLOSE,9);
DEA33:=EMA((EMA(MACD价格,3) - EMA(MACD价格,9)),9),COLORWHITE,LINETHICK0;
DEA333:=REF(DEA33,1),COLORWHITE,LINETHICK0;
STICKLINE(DEA333<=DEA33,LOW,HIGH,0,0),COLORRED;
STICKLINE(DEA333<=DEA33,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(DEA333>=DEA33,LOW,HIGH,0,0),COLORGREEN;
STICKLINE(DEA333>=DEA33,CLOSE,OPEN,3,1),COLORGREEN;
CCI3:=((H+L+C)/3-MA((H+L+C)/3,3))/(0.015*AVEDEV((H+L+C)/3,3));
STICKLINE(L<做多 AND CROSS(CCI3,-50) AND REF(CCI3,1)<0,LOW,HIGH,0,0),COLORMAGENTA;


布林线顶1:EMA(多空中线,10)+5*STD(EMA(多空中线,10),10),COLORWHITE;
布林线底1:EMA(多空中线,10)-5*STD(EMA(多空中线,10),10),COLORWHITE; 来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容