在1分钟k线图上用水平线画出当天前5分钟k线的高低点的公式,也就是1分钟图前5根k线的高点画一条到收盘的水平线,,低点也画一条到收盘的水平线,要求水平线和k线同步走到收盘。谢谢!
N1:=BARSLAST(DATE>REF(DATE,1))+1;
H2:=HHV(H,4);
L2:=LLV(L,4);
H3:=REF(H2,N1-5);
L3:=REF(L2,N1-5);
IF TIME>090500 AND TIME<150000 THEN BEGIN
X1:H3,COLORRED;
Y1:L3,COLORGREEN;
END
NN:=BARSLAST(DATE>REF(DATE,1))+1;
H2:=HHV(H,5);
L2:=LLV(L,5);
H3:=valuewhen(nn=5,h2);
L3:=valuewhen(nn=5,L2);
IF NN>5 AND TIME<150000 THEN BEGIN
X1:H3,COLORRED;
Y1:L3,COLORGREEN;
END
N1:=BARSLAST(DATE>REF(DATE,1))+1;
H2:=HHV(H,5);
L2:=LLV(L,5);
H3:=REF(H2,N1-5);
L3:=REF(L2,N1-5);
IF TIME>090500 AND TIME<150000 THEN BEGIN
X1:H3,COLORRED;
Y1:L3,COLORGREEN;
END