通达信公式画线OBV
X_1:=30;
X_2:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,X_2),0),COLORRED,LINETHICK4;
MAOBV:MA(OBV,X_1),COLORGREEN;
DRAWBAND(OBV,RGB(255,0,255),MAOBV,RGB(127,255,0));
X_3:=IF(OBV>=REF(OBV,1) AND OBV>=MAOBV,OBV,DRAWNULL);
DRAWBAND(X_3,RGB(255,0,0),MAOBV,RGB(220,20,60));
X_4:=5;
X_5:=X_4;
X_6:=REF(OBV,X_4)=HHV(OBV,2*X_4+1);
X_7:=BACKSET(X_6,X_4+1);
X_8:=FILTER(X_7,X_4) AND OBV=HHV(OBV,X_4+1);
X_9:=BARSLAST(X_8);
X_10:=IF(X_8,CURRBARSCOUNT,0);
X_11:=IF(X_9,REF(OBV,X_9),OBV);
X_12:=IF(X_9,REF(X_10,X_9),X_10);
X_13:=REF(X_11,X_9+1);
X_14:=CONST(X_12);
X_15:=REF(X_12,X_9+1);
X_16:=CONST(X_15);
X_17:=REF(X_13,X_9+1);
X_18:=IF(CURRBARSCOUNT>X_16,0,1);
高点压力:DRAWLINE(CURRBARSCOUNT=X_16,OBV,CURRBARSCOUNT=X_14,OBV,1),DOTLINE,COLORGREEN;
X_19:=REF(OBV,X_5)=LLV(OBV,2*X_5+1);
X_20:=BACKSET(X_19,X_5+1);
X_21:=FILTER(X_20,X_5) AND OBV=LLV(OBV,X_5+1);
X_22:=BARSLAST(X_21);
X_23:=IF(X_21,CURRBARSCOUNT,0);
X_24:=IF(X_22,REF(OBV,X_22),OBV);
X_25:=IF(X_22,REF(X_23,X_22),X_23);
X_26:=CONST(X_25);
X_27:=REF(X_24,X_22+1);
X_28:=REF(X_25,X_22+1);
X_29:=CONST(X_28);
低点支撑:DRAWLINE(CURRBARSCOUNT=X_29,OBV,CURRBARSCOUNT=X_26,OBV,1),DOTLINE,COLORRED;
X_30:=10;
X_31:=SUM(IF(CLOSE=REF(CLOSE,1),0,X_2),0);
X_32:=REF(X_31,X_30)=HHV(X_31,2*X_30+1);
X_33:=FILTER(X_32,X_30);
X_34:=BACKSET(X_33,X_30+1);
X_35:=FILTER(X_34,X_30);
T线:REF(OBV,BARSLAST(X_35)),COLORMAGENTA,LINETHICK0;
STICKLINE(CLOSE>0,T线,T线,6,0),COLORFF6600;
X_36:=CROSS(0.8,HIGH=HHV(HIGH,4));
X_37:=BARSLAST(X_36)+1;
X_38:=REF(HIGH,X_37);
X_39:=CROSS(0.8,LOW=LLV(LOW,4));
X_40:=BARSLAST(X_39)+1;
X_41:=REF(LOW,X_40);
STICKLINE(CROSS(OBV,T线),T线,T线*1.03,1,0),COLORYELLOW;
|