请老师修改,用一周K线作画线,然后只显示1小时K线图上。
NN:=BARSLAST(DATE<>REF(DATE,1) )+1;
H1:=REF(HHV(HIGH,NN),NN);
L1:=REF(LLV(LOW,NN),NN);
C1:=VALUEWHEN(DATE<>REF(DATE,1),REF(C,1));
PIVOT:=(H1+L1+C1)/3;
R1:=2*PIVOT-L1;
S1:=2*PIVOT-H1;
R2:=PIVOT+(R1-S1);
S2:=PIVOT-(R1-S1);
R3:=H1+2*(PIVOT-L1);
S3:=L1-2*(H1-PIVOT);
DRAWSL(ISLASTBAR&&BARTYPE=1,R1,0,1,3,COLORRED);
DRAWSL(ISLASTBAR&&BARTYPE=1,R2,0,1,3,COLORMAGENTA);
DRAWSL(ISLASTBAR&&BARTYPE=1,R3,0,1,3,COLORRED);
DRAWSL(ISLASTBAR&&BARTYPE=1,PIVOT,0,1,3,COLORYELLOW);
DRAWSL(ISLASTBAR&&BARTYPE=1,S1,0,1,3,COLORGREEN);
DRAWSL(ISLASTBAR&&BARTYPE=1,S2,0,1,3,COLORCYAN);
DRAWSL(ISLASTBAR&&BARTYPE=1,S3,0,1,3,COLORBLUE);
DRAWTEXT(ISLASTBAR&&BARTYPE=1,R1,'压力1'),COLORRED;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,R2,'压力2'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,R3,'压力3'),COLORRED;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,PIVOT,'多空线 '),COLORYELLOW;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,S1,'支撑1'),COLORGREEN;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,S2,'支撑2'),COLORCYAN;
DRAWTEXT(ISLASTBAR&&BARTYPE=1,S3,'支撑3'),COLORBLUE;
(来源:文华财经)