请老师调整一下 [博易POBO]
咨询内容:
请老师调整一下
PERIOD:=1;
NG:=BACKSET(ISLASTBAR,BARSLAST(CROSS(TIME>=IF(PERIOD=0,090000,0900)&&TIME<IF(PERIOD=0,150000, 1500),0.5)||CROSS(TIME>=IF(PERIOD=0,210000,2100)&&TIME<IF(PERIOD=0,220000,2200),0.5))+1);
VERTLINE(CROSS(NG,0.5));////开盘K线
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);////指标 2
DEA := EMA(DIFF,9);//
MACD:=2*(DIFF-DEA),COLORSTICK;//
J:=CROSS(DIFF,DEA),NODRAW;
S:=CROSS(DEA,DIFF),NODRAW;
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
HHK:=REFX(HHV(H,100),10),LINETHICK1;
LLK:=REFX(LLV(L,100),10),LINETHICK1;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),HHK,COLORBLUE,COLORRED),LINETHICK2;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),LLK,COLORBLUE,COLORRED),LINETHICK2;
N1:=2;
N2:=2;
HHH:=HHK*(1-0.001*N1),LINETHICK1;
LLL:=LLK*(1+0.001*N2),LINETHICK1;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;
Y:=H>HHK*(1-0.001*N1) || L<LLK*(1+0.001*N2);
H1:=VALUEWHEN(Y=0,H),LINETHICK2;
O1:=VALUEWHEN(Y=0,O),LINETHICK2;
L1:=VALUEWHEN(Y=0,L),LINETHICK2;
C1:=VALUEWHEN(Y=0,C),LINETHICK2;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),H1,O1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),O1,L1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),L1,C1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),H1,O1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),O1,L1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),L1,C1),COLOR23CC99;
CON1:=DIFF>0 && DEA>0 && DIFF>REF(DIFF,1);
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,1,2),COLORYELLOW;
CON2:=DIFF<0 && DEA<0 && DIFF<REF(DIFF,1);
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWSL(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,1)),L,0,10000,0),COLORGREEN,LINETHICK3;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,10000,0),COLOR4080FF,LINETHICK3;////最后两个图标(图标横线)
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,3,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,2,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORRED;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,0.35,0),COLORRED,LINETHICK3;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,-0.35,0),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),H,1,MAX(O,C)),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),L,1,MIN(O,C)),COLORRED,LINETHICK3;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,3,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,2,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORBLUE;
K线咋不变色,//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;这两条压缩厉害
VERTLINE(CROSS(NG,0.5));////开盘K线
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);////指标 2
DEA := EMA(DIFF,9);//
MACD:=2*(DIFF-DEA),COLORSTICK;//
J:=CROSS(DIFF,DEA),NODRAW;
S:=CROSS(DEA,DIFF),NODRAW;
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
HHK:=REFX(HHV(H,100),10),LINETHICK1;
LLK:=REFX(LLV(L,100),10),LINETHICK1;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),HHK,COLORBLUE,COLORRED),LINETHICK2;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),LLK,COLORBLUE,COLORRED),LINETHICK2;
N1:=2;
N2:=2;
HHH:=HHK*(1-0.001*N1),LINETHICK1;
LLL:=LLK*(1+0.001*N2),LINETHICK1;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;
Y:=H>HHK*(1-0.001*N1) || L<LLK*(1+0.001*N2);
H1:=VALUEWHEN(Y=0,H),LINETHICK2;
O1:=VALUEWHEN(Y=0,O),LINETHICK2;
L1:=VALUEWHEN(Y=0,L),LINETHICK2;
C1:=VALUEWHEN(Y=0,C),LINETHICK2;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),H1,O1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),O1,L1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),L1,C1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),H1,O1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),O1,L1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),L1,C1),COLOR23CC99;
CON1:=DIFF>0 && DEA>0 && DIFF>REF(DIFF,1);
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,1,2),COLORYELLOW;
CON2:=DIFF<0 && DEA<0 && DIFF<REF(DIFF,1);
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWSL(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,1)),L,0,10000,0),COLORGREEN,LINETHICK3;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,10000,0),COLOR4080FF,LINETHICK3;////最后两个图标(图标横线)
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,3,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,2,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORRED;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,0.35,0),COLORRED,LINETHICK3;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,-0.35,0),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),H,1,MAX(O,C)),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),L,1,MIN(O,C)),COLORRED,LINETHICK3;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,3,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,2,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORBLUE;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;这两条压缩厉害 谢谢老师 来源 程序化久久网
NG:=BACKSET(ISLASTBAR,BARSLAST(CROSS(TIME>=IF(PERIOD=0,090000,0900)&&TIME<IF(PERIOD=0,150000, 1500),0.5)||CROSS(TIME>=IF(PERIOD=0,210000,2100)&&TIME<IF(PERIOD=0,220000,2200),0.5))+1);
VERTLINE(CROSS(NG,0.5));////开盘K线
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);////指标 2
DEA := EMA(DIFF,9);//
MACD:=2*(DIFF-DEA),COLORSTICK;//
J:=CROSS(DIFF,DEA),NODRAW;
S:=CROSS(DEA,DIFF),NODRAW;
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
HHK:=REFX(HHV(H,100),10),LINETHICK1;
LLK:=REFX(LLV(L,100),10),LINETHICK1;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),HHK,COLORBLUE,COLORRED),LINETHICK2;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),LLK,COLORBLUE,COLORRED),LINETHICK2;
N1:=2;
N2:=2;
HHH:=HHK*(1-0.001*N1),LINETHICK1;
LLL:=LLK*(1+0.001*N2),LINETHICK1;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;
Y:=H>HHK*(1-0.001*N1) || L<LLK*(1+0.001*N2);
H1:=VALUEWHEN(Y=0,H),LINETHICK2;
O1:=VALUEWHEN(Y=0,O),LINETHICK2;
L1:=VALUEWHEN(Y=0,L),LINETHICK2;
C1:=VALUEWHEN(Y=0,C),LINETHICK2;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),H1,O1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),O1,L1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),L1,C1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),H1,O1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),O1,L1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),L1,C1),COLOR23CC99;
CON1:=DIFF>0 && DEA>0 && DIFF>REF(DIFF,1);
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,1,2),COLORYELLOW;
CON2:=DIFF<0 && DEA<0 && DIFF<REF(DIFF,1);
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWSL(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,1)),L,0,10000,0),COLORGREEN,LINETHICK3;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,10000,0),COLOR4080FF,LINETHICK3;////最后两个图标(图标横线)
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,3,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,2,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORRED;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,0.35,0),COLORRED,LINETHICK3;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,-0.35,0),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),H,1,MAX(O,C)),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),L,1,MIN(O,C)),COLORRED,LINETHICK3;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,3,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,2,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORBLUE;
K线咋不变色,//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;这两条压缩厉害
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: NG:=BACKSET(ISLASTBAR,BARSLAST(REF(HOUR,1)=15 AND HOUR<>15));VERTLINE(CROSS(NG,0.5));////开盘K线
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);////指标 2
DEA := EMA(DIFF,9);//
MACD:=2*(DIFF-DEA),COLORSTICK;//
J:=CROSS(DIFF,DEA),NODRAW;
S:=CROSS(DEA,DIFF),NODRAW;
LL:=CROSS( BACKSET(REFX(J,1)||ISLASTBAR&&DIFF<DEA,LLVBARS(L,BARSLAST(S)+1)+1),0.5),NODRAW;
HH:=CROSS( BACKSET(REFX(S,1)||ISLASTBAR&&DIFF>DEA,HHVBARS(H,BARSLAST(J)+1)+1),0.5),NODRAW;
HHK:=REFX(HHV(H,100),10),LINETHICK1;
LLK:=REFX(LLV(L,100),10),LINETHICK1;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),HHK,COLORBLUE,COLORRED),LINETHICK2;
//DRAWCOLORLINE(BARSLAST(HH)<BARSLAST(LL),LLK,COLORBLUE,COLORRED),LINETHICK2;
N1:=2;
N2:=2;
HHH:=HHK*(1-0.001*N1),LINETHICK1;
LLL:=LLK*(1+0.001*N2),LINETHICK1;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;
Y:=H>HHK*(1-0.001*N1) || L<LLK*(1+0.001*N2);
H1:=VALUEWHEN(Y=0,H),LINETHICK2;
O1:=VALUEWHEN(Y=0,O),LINETHICK2;
L1:=VALUEWHEN(Y=0,L),LINETHICK2;
C1:=VALUEWHEN(Y=0,C),LINETHICK2;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),H1,O1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),O1,L1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)<BARSLAST(LL)||LL),L1,C1),COLORFF9900;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),H1,O1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),O1,L1),COLOR23CC99;
FILLRGN(NG && (BARSLAST(HH)>=BARSLAST(LL)||HH),L1,C1),COLOR23CC99;
CON1:=DIFF>0 && DEA>0 && DIFF>REF(DIFF,1);
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,1,2),COLORYELLOW;
CON2:=DIFF<0 && DEA<0 && DIFF<REF(DIFF,1);
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWICON(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,2)),L,2),VALIGN1;
DRAWSL(NG && CON2&&BACKSET(ISLASTBAR,SUMBARS(CON2,1)),L,0,10000,0),COLORGREEN,LINETHICK3;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWICON(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,2)),H,1),VALIGN1;
DRAWSL(NG && CON1&&BACKSET(ISLASTBAR,SUMBARS(CON1,1)),H,0,10000,0),COLOR4080FF,LINETHICK3;////最后两个图标(图标横线)
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,3,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISUP,O,C,2,1),COLORRED;
STICKLINE(NG && BARSLAST(HH)>BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORRED;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,0.35,0),COLORRED,LINETHICK3;
//DRAWSL(NG && BARSLAST(HH)>BARSLAST(LL)&&ISEQUAL,O,0,-0.35,0),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),H,1,MAX(O,C)),COLORRED,LINETHICK3;
//DRAWLINE(NG && BARSLAST(HH)>BARSLAST(LL),L,1,MIN(O,C)),COLORRED,LINETHICK3;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,3,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISUP,O,C,2,1),COLORBLUE;
STICKLINE(NG && BARSLAST(HH)<BARSLAST(LL)&&ISDOWN,O,C,2,0),COLORBLUE;
//FILLRGN(NG,HHK,HHH),COLORFFEEFF;
//FILLRGN(NG,LLK,LLL),COLORFF9999;这两条压缩厉害 谢谢老师 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容