1、缠论笔
2、缠论中枢 中枢上下沿 点位标注
3、H1234 L1234 高低点
4、顶底背离提示和顶底背离K线变色文字提示
适用:
文华财经软件电脑端wh7和wh6两个版本,适用任意周期。
仅保留最新5笔的形成的中枢,新笔形成,中枢也会向前移动。
文华软件指标编译器是麦语言。
部分源码:
缠论线开关:=1;//笔中枢;
MA8:=1;
展F:=21;
HH展BDD:=(H>HV(H,展F))*缠论线开关*MA8;
NH展BDD:=(BARSLAST(HH展BDD)+1)*缠论线开关*MA8;
LL展BDD:=(L<LV(L,展F))*缠论线开关*MA8;
NL展BDD:=(BARSLAST(LL展BDD)+1)*缠论线开关*MA8;
AH展BDD:=(BACKSET(COUNT(LL展BDD,NH展BDD)&&LL展BDD,NH展BDD))*缠论线开关*MA8;
AL展BDD:=(BACKSET(COUNT(HH展BDD,NL展BDD)&&HH展BDD,NL展BDD))*缠论线开关*MA8;
//DRAWLINE1(CROSS(AH展BDD=1,0.5),H,CROSS(AL展BDD=1,0.5),L,0),DASHDOTDOT,LINETHICK1,RGB(146,99,1);
//DRAWLINE1(CROSS(AL展BDD=1,0.5),L,CROSS(AH展BDD=1,0.5),H,0),DASHDOTDOT,LINETHICK1,RGB(143,32,255);
//DRAWNUMBER(CROSS(AH展BDD=1,0.5),H+0*MINPRICE,H-VALUEWHEN(CROSS(AL展BDD=1,0.5),L),1,COLORYELLOW),ALIGN0,VALIGN2,FONTSIZE16;
//DRAWNUMBER(CROSS(AL展BDD=1,0.5),L-0*MINPRICE,L-VALUEWHEN(CROSS(AH展BDD=1,0.5),H),1,COLORGREEN),ALIGN0,VALIGN0,FONTSIZE16;
LX:=AL展BDD, NOTEXT;
HX:=AH展BDD, NOTEXT;
笔:=1;
//1、本级别 (BOLL26)笔:
DRAWLINE1(笔*CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),RGB(168,168,168),DOT;//画笔,虚线;
DRAWLINE1(笔*CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),RGB(168,168,168),DOT;//画笔,虚线;
//BOLL26最后一笔(未完成);
//HH:=CROSS(HX=1,0.5);
//LL:=CROSS(LX=1,0.5);
HH:CROSS(AH展BDD=1,0.5), NOTEXT;
LL:CROSS(AL展BDD=1,0.5), NOTEXT;
DRAWLINE3(笔*ISLASTBAR&&BARSLAST(HH)<BARSLAST(LL),笔*VALUEWHEN(HH,H),笔*BARSLAST(HH),1,LLV(L,BARSLAST(HH)),LLVBARS(L,BARSLAST(HH)),0),RGB(200,200,0),LINETHICK2;//BOLL26最后一笔(未完成),向下笔;
DRAWLINE3(笔*ISLASTBAR&&BARSLAST(HH)>BARSLAST(LL),笔*VALUEWHEN(LL,L),笔*BARSLAST(LL),1,HHV(H,BARSLAST(LL)),HHVBARS(H,BARSLAST(LL)),0),RGB(200,200,0),LINETHICK2;//BOLL26最后一笔(未完成),向上笔;
BADS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
BBDS4:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),5));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS4=1&&BADS4=0,L,CROSS(HX=1,0.5),H,0),RGB(200,200,0),LINETHICK2;//向上笔(倒数4),黄色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS4=1&&BADS4=0,H,CROSS(LX=1,0.5),L,0),RGB(200,200,0),LINETHICK2;//向下笔(倒数4),黄色;
//2.2、倒数第2笔(已完成);
BADS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
BBDS2:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS2=1&&BADS2=0,L,CROSS(HX=1,0.5),H,0),RGB(128,128,255),LINETHICK2;//向上笔(倒数2),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS2=1&&BADS2=0,H,CROSS(LX=1,0.5),L,0),RGB(128,128,255),LINETHICK2;//向下笔(倒数2),紫红色;
//2.3、倒数第3笔(已完成);
BADS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),3));
BBDS3:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),4));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS3=1&&BADS3=0,L,CROSS(HX=1,0.5),H,0),RGB(128,128,255),LINETHICK2;//向上笔(倒数3),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS3=1&&BADS3=0,H,CROSS(LX=1,0.5),L,0),RGB(128,128,255),LINETHICK2;//向下笔(倒数3),紫红色;
//2.4、倒数第1笔(已完成);
BADS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),1));
BBDS1:=BACKSET(ISLASTBAR,SUMBARS(CROSS(LX=1,0.5)||CROSS(HX=1,0.5),2));
DRAWLINE1(笔*CROSS(LX=1,0.5)&&BBDS1=1&&BADS1=0,L,CROSS(HX=1,0.5),H,0),RGB(128,128,255),LINETHICK2;//向上笔(倒数1),紫红色;
DRAWLINE1(笔*CROSS(HX=1,0.5)&&BBDS1=1&&BADS1=0,H,CROSS(LX=1,0.5),L,0),RGB(128,128,255),LINETHICK2;//向下笔(倒数1),紫红色;
发表评论 取消回复