N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO1:=VALUEWHEN(N=1,O);//當(dāng)天的開盤價
昨高:REF(HHV(H,N),N),NODRAW;//昨天全天的最高價
昨低:REF(LLV(L,N),N),NODRAW;//昨天全天的最低價
昨收:REF(C,N),NODRAW;//昨天的收盤價
昨開:REF(OO1,N),NODRAW;//昨天的開盤價
DRAWSL(1,昨高,0,1,0,COLORRED);
DRAWSL(1,昨低,0,1,0,COLORGREEN);
DRAWSL(1,昨收,0,1,0,COLORYELLOW);
DRAWSL(1,昨開,0,1,0,COLORMAGENTA);
N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO1:=VALUEWHEN(N=1,O);//當(dāng)天的開盤價
昨高:REF(HHV(H,N),N),NODRAW;//昨天全天的最高價
昨低:REF(LLV(L,N),N),NODRAW;//昨天全天的最低價
昨收:REF(C,N),NODRAW;//昨天的收盤價
昨開:REF(OO1,N),NODRAW;//昨天的開盤價
DRAWSL(1,昨高,0,1,0,COLORRED);
DRAWSL(1,昨低,0,1,0,COLORGREEN);
DRAWSL(1,昨收,0,1,0,COLORYELLOW);
DRAWSL(1,昨開,0,1,0,COLORMAGENTA);
DRAWTEXT(ISLASTBAR,昨高,'昨高');
DRAWTEXT(ISLASTBAR,昨低,'昨低');
DRAWTEXT(ISLASTBAR,昨收,'昨收');
DRAWTEXT(ISLASTBAR,昨開,'昨開');
僅供參考
老師,能不能把這4個價格線改為虛線,我改動沒有改了。謝謝
N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO1:=VALUEWHEN(N=1,O);//當(dāng)天的開盤價
昨高:REF(HHV(H,N),N),NODRAW;//昨天全天的最高價
昨低:REF(LLV(L,N),N),NODRAW;//昨天全天的最低價
昨收:REF(C,N),NODRAW;//昨天的收盤價
昨開:REF(OO1,N),NODRAW;//昨天的開盤價
DRAWSL(1,昨高,0,1,0,COLORRED);
DRAWSL(1,昨低,0,1,0,COLORGREEN);
DRAWSL(1,昨收,0,1,0,COLORYELLOW);
DRAWSL(1,昨開,0,1,0,COLORMAGENTA);
DRAWTEXT(ISLASTBAR,昨高,'昨高');
DRAWTEXT(ISLASTBAR,昨低,'昨低');
DRAWTEXT(ISLASTBAR,昨收,'昨收');
DRAWTEXT(ISLASTBAR,昨開,'昨開');
您試下:
N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO1:=VALUEWHEN(N=1,O);//當(dāng)天的開盤價
昨高:REF(HHV(H,N),N),DOT;//昨天全天的最高價
昨低:REF(LLV(L,N),N),DOT;//昨天全天的最低價
昨收:REF(C,N),DOT;//昨天的收盤價
昨開:REF(OO1,N),DOT;//昨天的開盤價
DRAWTEXT(ISLASTBAR,昨高,'昨高');
DRAWTEXT(ISLASTBAR,昨低,'昨低');
DRAWTEXT(ISLASTBAR,昨收,'昨收');
DRAWTEXT(ISLASTBAR,昨開,'昨開');
僅供參考