{================背景 ================}; DRAWGBK(CURRBARSCOUNT=1, RGB(0,0,0),RGB(0,0,0),0,'1',0);
VA:=IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL,-VOL/CAPITAL);
OBV1:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),COLORYELLOW ,LINETHICK1;
{www.fxjgsw.com}
HPB:REF(HHV(OBV1,20),1),COLORRED ,LINETHICK2;
LPB:REF(LLV(OBV1,20),1),COLORBLUE, NODRAW ;
MPB:(HPB+LPB)/2,COLORLIBLUE,DOTLINE;
{以下划变色线};
A0:=OBV1;
A1:EMA(A0,14),COLORGREEN ,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100;
G1:=BARSLAST(CROSS(A1X,0));
买入止损:=REF(A0,G1),COLORMAGENTA,LINETHICK1;
买入盈利:(A0-买入止损)/买入止损*100,NODRAW ;
IF(A1X>=0,买入止损,DRAWNULL),COLORWHITE ,NODRAW;
IF(A1X>=0,A1,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(ISLASTBAR, HPB,' ←上穿买入 '),COLORRED ;
DRAWTEXT(ISLASTBAR, A1,' ←下穿卖出 '),COLORGREEN ;
DRAWTEXT(ISLASTBAR, OBV1,'←操作线 '),COLORYELLOW ;
|
