等级: 新手上路
- 注册:
- 2024-9-24
- 曾用名:
|
N:=BARSLAST(DATE<>REF(DATE,1))+1;
TJX:=MONTH=3&&CROSS(COUNT(CROSS(WEEKDAY=1,0.5),BARSLAST(CROSS(MONTH=3,0.5))+1)=2,0.5);
TJY:=MONTH=11&&CROSS(COUNT(CROSS(WEEKDAY=1,0.5),BARSLAST(CROSS(MONTH=11,0.5))+1)=1,0.5);
M1:=BARSLAST(TJX)+1;
M2:=BARSLAST(TJY)+1;
TJ1:=M1>0&&(M1<M2||ISNULL(M2))&&TIME=0600;
TJ2:=M1>0&&(M1<M2||ISNULL(M2))&&TIME=1400;
TJ3:=M1>0&&(M1<M2||ISNULL(M2))&&TIME=2000;
TJ4:=M1>0&&(M1<M2||ISNULL(M2))&&DATE<>REFX(DATE,1);
H1:=REFX1(HHV(H,16),15);
L1:=REFX1(LLV(L,16),15);
DRAWSL(TJ1,H1,0,15,0,COLORWHITE),DOT;
DRAWSL(TJ1,L1,0,15,0,COLORWHITE),DOT;
DRAWLINE(TJ1,H1,TJ1,L1,COLORWHITE),DOT;
DRAWLINE(REFX(TJ2,1),HHV(H,16),REFX(TJ2,1),LLV(L,16),COLORWHITE),DOT;
DRAWNUMBER(TJ1,H1,H1,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ1,L1,L1,4,COLORGREEN),ALIGN0,VALIGN0;
H2:=REFX1(HHV(H,12),11);
L2:=REFX1(LLV(L,12),11);
DRAWSL(TJ2,H2,0,11,0,COLORWHITE),DOT;
DRAWSL(TJ2,L2,0,11,0,COLORWHITE),DOT;
DRAWLINE(TJ2,H2,TJ2,L2,COLORWHITE),DOT;
DRAWLINE(REFX(TJ3,1),HHV(H,12),REFX(TJ3,1),LLV(L,12),COLORWHITE),DOT;
DRAWNUMBER(TJ2,H2,H2,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ2,L2,L2,4,COLORGREEN),ALIGN0,VALIGN0;
H3:=REFX1(HHV(H,18),17);
L3:=REFX1(LLV(L,18),17);
DRAWSL(TJ3,H3,0,17,0,COLORWHITE),DOT;
DRAWSL(TJ3,L3,0,17,0,COLORWHITE),DOT;
DRAWLINE(TJ3,H3,TJ3,L3,COLORWHITE),DOT;
DRAWLINE(TJ4,HHV(H,18),TJ4,LLV(L,18),COLORWHITE),DOT;
DRAWNUMBER(TJ3,H3,H3,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ3,L3,L3,4,COLORGREEN),ALIGN0,VALIGN0;
TJ5:=M2>0&&(M2<M1||ISNULL(M1))&&TIME=0700;
TJ6:=M2>0&&(M2<M1||ISNULL(M1))&&TIME=1500;
TJ7:=M2>0&&(M2<M1||ISNULL(M1))&&TIME=2100;
TJ8:=M2>0&&(M2<M1||ISNULL(M1))&&DATE<>REFX(DATE,1);
H5:=REFX1(HHV(H,16),15);
L5:=REFX1(LLV(L,16),15);
DRAWSL(TJ5,H5,0,15,0,COLORWHITE),DOT;
DRAWSL(TJ5,L5,0,15,0,COLORWHITE),DOT;
DRAWLINE(TJ5,H5,TJ5,L5,COLORWHITE),DOT;
DRAWLINE(REFX(TJ6,1),HHV(H,16),REFX(TJ6,1),LLV(L,16),COLORWHITE),DOT;
DRAWNUMBER(TJ5,H5,H5,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ5,L5,L5,4,COLORGREEN),ALIGN0,VALIGN0;
H6:=REFX1(HHV(H,12),11);
L6:=REFX1(LLV(L,12),11);
DRAWSL(TJ6,H6,0,11,0,COLORWHITE),DOT;
DRAWSL(TJ6,L6,0,11,0,COLORWHITE),DOT;
DRAWLINE(TJ6,H6,TJ6,L6,COLORWHITE),DOT;
DRAWLINE(REFX(TJ7,1),HHV(H,12),REFX(TJ7,1),LLV(L,12),COLORWHITE),DOT;
DRAWNUMBER(TJ6,H6,H6,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ6,L6,L6,4,COLORGREEN),ALIGN0,VALIGN0;
H7:=REFX1(HHV(H,18),17);
L7:=REFX1(LLV(L,18),17);
DRAWSL(TJ7,H7,0,17,0,COLORWHITE),DOT;
DRAWSL(TJ7,L7,0,17,0,COLORWHITE),DOT;
DRAWLINE(TJ7,H7,TJ7,L7,COLORWHITE),DOT;
DRAWLINE(TJ8,HHV(H,18),TJ8,LLV(L,18),COLORWHITE),DOT;
DRAWNUMBER(TJ7,H7,H7,4,COLORRED),ALIGN0,VALIGN2;
DRAWNUMBER(TJ7,L7,L7,4,COLORGREEN),ALIGN0,VALIGN0;
Z1:=M1>0&&(M1<M2||ISNULL(M2))&&DATE<>REFX(DATE,1);
P1:=M1>0&&(M1<M2||ISNULL(M2))&&TIME>=1000&&TIME<1700&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=1000)+1)=1,0.5);
DRAWLINE(Z1,REF(H,BARSLAST(P1)),Z1,REF(L,BARSLAST(P1)),COLORYELLOW);
DRAWLINE(P1,H,P1,L,COLORYELLOW);
DRAWSL(Z1,REF(H,BARSLAST(P1)),0,-BARSLAST(P1),0,COLORYELLOW);
DRAWSL(Z1,REF(L,BARSLAST(P1)),0,-BARSLAST(P1),0,COLORYELLOW);
P2:=M1>0&&(M1<M2||ISNULL(M2))&&TIME>=1700&&TIME<2100&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=1700)+1)=1,0.5);
DRAWLINE(Z1,REF(H,BARSLAST(P2)),Z1,REF(L,BARSLAST(P2)),COLORBLUE);
DRAWLINE(P2,H,P2,L,COLORBLUE);
DRAWSL(Z1,REF(H,BARSLAST(P2)),0,-BARSLAST(P2),0,COLORBLUE);
DRAWSL(Z1,REF(L,BARSLAST(P2)),0,-BARSLAST(P2),0,COLORBLUE);
P3:=M1>0&&(M1<M2||ISNULL(M2))&&(TIME>=2100||TIME<0030)&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=2100)+1)=1,0.5);
DRAWLINE(Z1,REF(H,BARSLAST(P3)),Z1,REF(L,BARSLAST(P3)),COLORGREEN);
DRAWLINE(P3,H,P3,L,COLORGREEN);
DRAWSL(Z1,REF(H,BARSLAST(P3)),0,-BARSLAST(P3),0,COLORGREEN);
DRAWSL(Z1,REF(L,BARSLAST(P3)),0,-BARSLAST(P3),0,COLORGREEN);
P4:=M1>0&&(M1<M2||ISNULL(M2))&&(TIME>=0300||TIME<0500)&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=0030)+1)=1,0.5);
DRAWLINE(Z1,REF(H,BARSLAST(P4)),Z1,REF(L,BARSLAST(P4)),COLORRED);
DRAWLINE(P4,H,P4,L,COLORRED);
DRAWSL(Z1,REF(H,BARSLAST(P4)),0,-BARSLAST(P4),0,COLORRED);
DRAWSL(Z1,REF(L,BARSLAST(P4)),0,-BARSLAST(P4),0,COLORRED);
Z2:=M2>0&&(M1>M2||ISNULL(M1))&&TIME=0600;
Q1:=M2>0&&(M1>M2||ISNULL(M1))&&TIME>=1100&&TIME<1600&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=1100)+1)=1,0.5);
DRAWLINE(Z2,REF(H,BARSLAST(Q1)),Z2,REF(L,BARSLAST(Q1)),COLORYELLOW);
DRAWLINE(Q1,H,Q1,L,COLORYELLOW);
DRAWSL(Z2,REF(H,BARSLAST(Q1)),0,-BARSLAST(Q1),0,COLORYELLOW);
DRAWSL(Z2,REF(L,BARSLAST(Q1)),0,-BARSLAST(Q1),0,COLORYELLOW);
Q2:=M2>0&&(M1>M2||ISNULL(M1))&&TIME>=1600&&TIME<2200&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=1600)+1)=1,0.5);
DRAWLINE(Z2,REF(H,BARSLAST(Q2)),Z2,REF(L,BARSLAST(Q2)),COLORBLUE);
DRAWLINE(Q2,H,Q2,L,COLORBLUE);
DRAWSL(Z2,REF(H,BARSLAST(Q2)),0,-BARSLAST(Q2),0,COLORBLUE);
DRAWSL(Z2,REF(L,BARSLAST(Q2)),0,-BARSLAST(Q2),0,COLORBLUE);
Q3:=M2>0&&(M1>M2||ISNULL(M1))&&(TIME>=2200||TIME<0130)&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=2200)+1)=1,0.5);
DRAWLINE(Z2,REF(H,BARSLAST(Q3)),Z2,REF(L,BARSLAST(Q3)),COLORGREEN);
DRAWLINE(Q3,H,Q3,L,COLORGREEN);
DRAWSL(Z2,REF(H,BARSLAST(Q3)),0,-BARSLAST(Q3),0,COLORGREEN);
DRAWSL(Z2,REF(L,BARSLAST(Q3)),0,-BARSLAST(Q3),0,COLORGREEN);
Q4:=M2>0&&(M1>M2||ISNULL(M1))&&(TIME>=0130||TIME<0600)&&CROSS(COUNT(ABS(C-O)<=(H-L)/2,BARSLAST(TIME=0130)+1)=1,0.5);
DRAWLINE(Z2,REF(H,BARSLAST(Q4)),Z2,REF(L,BARSLAST(Q4)),COLORRED);
DRAWLINE(Q4,H,Q4,L,COLORRED);
DRAWSL(Z2,REF(H,BARSLAST(Q4)),0,-BARSLAST(Q4),0,COLORRED);
DRAWSL(Z2,REF(L,BARSLAST(Q4)),0,-BARSLAST(Q4),0,COLORRED);
DRAWSL(ISLASTBAR,C,0,1000000,1,COLORYELLOW),DOT;
DRAWNUMBER(ISLASTBAR,C,C,4,COLORYELLOW),FONTSIZE20,ALIGN0,VALIGN0;
|
|