通达信有傻瓜式的主图指标。懂得拿去琢磨去。
波神做空
T:=CONST(HHVBARS(H,N));
Q1:=CONST((REF(H,T)-REF(L,T)));
Q2:=CONST(REF(H,T));
PT:=CONST(HHVBARS(H,N));
TQ1:IF(CURRBARSCOUNT<=PT+1,CONST(IF(PT=0,H,REF(H,PT))),DRAWNULL),COLORWHITE,DOTLINE;
TQ2:IF(CURRBARSCOUNT<=PT+1,CONST(IF(PT=0,L,REF(L,PT))),DRAWNULL),COLORWHITE,DOTLINE;
Q:=CONST(TQ1-TQ2);
H1:=CONST(TQ1);
L1:=CONST(TQ2);
X1:H1-Q1*1.829,COLORYELLOW,NODRAW;
X2:H1-Q1*2.398,COLORWHITE,NODRAW;
X3:H1-Q1*3.100,COLORGREEN,NODRAW;
X4:H1-Q1*3.498,COLORYELLOW,NODRAW;
X5:H1-Q1*3.968,COLORLIMAGENTA,NODRAW;
X6:H1-Q1*4.701,COLORYELLOW,NODRAW;
X7:H1-Q1*5.251,COLORGREEN,NODRAW;
X8:H1-Q1*6.000,COLORYELLOW,NODRAW;
X9:H1-Q1*6.801,COLORBLUE,NODRAW;
TW1:STICKLINE(CURRBARSCOUNT<=PT+1,X1,X1,2,-1),COLORYELLOW;
TW2:STICKLINE(CURRBARSCOUNT<=PT+1,X2,X2,2,-1),COLORWHITE;
TW3:STICKLINE(CURRBARSCOUNT<=PT+1,X3,X3,2,-1),COLORGREEN;
TW4:STICKLINE(CURRBARSCOUNT<=PT+1,X4,X4,2,-1),COLORYELLOW;
TW5:STICKLINE(CURRBARSCOUNT<=PT+1,X5,X5,2,0),COLORLIMAGENTA;
TW6:STICKLINE(CURRBARSCOUNT<=PT+1,X6,X6,2,-1),COLORYELLOW;
TW7:STICKLINE(CURRBARSCOUNT<=PT+1,X7,X7,2,-1),COLORGREEN;
TW8:STICKLINE(CURRBARSCOUNT<=PT+1,X8,X8,2,-1),COLORYELLOW;
TW9:STICKLINE(CURRBARSCOUNT<=PT+1,X9,X9,2,0),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=PT+3,H1*0.995,'高'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=PT+3,L1,'低'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,X9,' 9'),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=1,X8,' 8'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X7,' 7'),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,X6,' 6'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X5,' 5'),COLORLIMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,X4,' 4'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X3,' 3'),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,X2,' 2'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,X1,' 1'),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=1,H1*1.003 ,CONST(H1)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=1,L1*1.003 ,CONST(L1)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X1*1.003 ,CONST(X1)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X2*1.003 ,CONST(X2)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X3*1.003 ,CONST(X3)),COLORGREEN;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X4*1.003 ,CONST(X4)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X5*1.003 ,CONST(X5)),COLORLIMAGENTA;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X6*1.003 ,CONST(X6)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X7*1.003 ,CONST(X7)),COLORGREEN;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X8*1.003 ,CONST(X8)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X9*1.003 ,CONST(X9)),,COLORBLUE;
波神做多
T:=CONST(LLVBARS(L,N));
Q1:=CONST((REF(H,T)-REF(L,T)));
Q2:=CONST(REF(H,T));
PT:=CONST(LLVBARS(L,N));
TQ1:IF(CURRBARSCOUNT<=PT+1,CONST(IF(PT=0,L,REF(L,PT))),DRAWNULL),COLORWHITE,DOTLINE;
TQ2:IF(CURRBARSCOUNT<=PT+1,CONST(IF(PT=0,H,REF(H,PT))),DRAWNULL),COLORWHITE,DOTLINE;
Q:=CONST(TQ2-TQ1);
H1:=CONST(TQ2);
L1:=CONST(TQ1);
X1:L1+Q1*1.829,NODRAW,COLORYELLOW;
X2:L1+Q1*2.398,NODRAW,COLORWHITE;
X3:L1+Q1*3.100,NODRAW,COLORGREEN;
X4:L1+Q1*3.498,NODRAW,COLORYELLOW;
X5:L1+Q1*3.968,NODRAW,COLORLIMAGENTA;
X6:L1+Q1*4.701,NODRAW,COLORYELLOW;
X7:L1+Q1*5.251,NODRAW,COLORGREEN;
X8:L1+Q1*6.000,NODRAW,COLORYELLOW;
X9:L1+Q1*6.801,NODRAW,COLORBLUE;
TW1:STICKLINE(CURRBARSCOUNT<=PT+1,X1,X1,2,-1),COLORYELLOW;
TW2:STICKLINE(CURRBARSCOUNT<=PT+1,X2,X2,2,-1),COLORWHITE;
TW3:STICKLINE(CURRBARSCOUNT<=PT+1,X3,X3,2,-1),COLORGREEN;
TW4:STICKLINE(CURRBARSCOUNT<=PT+1,X4,X4,2,-1),COLORYELLOW;
TW5:STICKLINE(CURRBARSCOUNT<=PT+1,X5,X5,2,0),COLORLIMAGENTA;
TW6:STICKLINE(CURRBARSCOUNT<=PT+1,X6,X6,2,-1),COLORYELLOW;
TW7:STICKLINE(CURRBARSCOUNT<=PT+1,X7,X7,2,-1),COLORGREEN;
TW8:STICKLINE(CURRBARSCOUNT<=PT+1,X8,X8,2,-1),COLORYELLOW;
TW9:STICKLINE(CURRBARSCOUNT<=PT+1,X9,X9,2,0),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=PT+3,H1*0.995,'高'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=PT+3,L1,'低'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,X9,' 9'),COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=1,X8,' 8'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X7,' 7'),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,X6,' 6'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X5,' 5'),COLORLIMAGENTA;
DRAWTEXT(CURRBARSCOUNT=1,X4,' 4'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,X3,' 3'),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,X2,' 2'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,X1,' 1'),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=1,H1*1.003 ,CONST(H1)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=1,L1*1.003 ,CONST(L1)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X1*1.003 ,CONST(X1)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X2*1.003 ,CONST(X2)),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X3*1.003 ,CONST(X3)),COLORGREEN;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X4*1.003 ,CONST(X4)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X5*1.003 ,CONST(X5)),COLORLIMAGENTA;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X6*1.003 ,CONST(X6)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X7*1.003 ,CONST(X7)),COLORGREEN;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X8*1.003 ,CONST(X8)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=PT+4,X9*1.003 ,CONST(X9)),,COLORBLUE; |