通达信超级OBV副图源码贴图
{超级OBV}
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(CLOSE)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),BARSCOUNT(CLOSE)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(CLOSE));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(CLOSE)),2,DRAWNULL));
UU:=终点=1 OR 终点=2 AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(CLOSE));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(CLOSE));
天数:=BARSLAST(起始点);
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0);
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0);
TDXSTEP1219:DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
TDXSTEP1220:DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL);
横线起始价:=REF(CLOSE,天数);
空间评估:=(横线起始价-CLOSE)/CLOSE*100;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
TDXSTEP1221:STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),DOTLINE,COLORLIBLUE;
AA:=STRCAT(STRCAT(STRCAT(53,54),55),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
TDXSTEP1222:STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
TDXSTEP1223:STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
TDXSTEP1224:STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
TDXSTEP1225:STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
TDXSTEP1226:STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
TDXSTEP1227:STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
TDXSTEP1228:DRAWTEXT(VA2 AND VA2!=UU,MOBV/10*9,56);
TDXSTEP1229:DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,57);
TDXSTEP1230:DRAWTEXT(ZZ,MOBV/10*7,58),COLORBLUE;
TDXSTEP1231:DRAWTEXT(ZZ,MOBV/10,57),COLORBLUE;
TDXSTEP1232:DRAWTEXT(BDTJ,MOBV/10*9,59),COLORRED;
TDXSTEP1233:DRAWTEXT(BDTJ,MOBV/10,58),COLORRED;
TDXSTEP1234:IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),DOTLINE,COLORRED;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J1:=DIFF;
J2:=DEA;
J3:=K;
J4:=D;
VL:=REF(LOW,1);
VH:=REF(HIGH,1);
VAR1:=SMA(ABS(HIGH-VH),13,1)/SMA(MAX(HIGH-VH,0),13,1)*100;
VAR2:=SMA(ABS(LOW-VL),13,1)/SMA(MAX(LOW-VL,0),13,1)*100;
VAR3:=REF(CLOSE,1);
VAR4:=MA(VAR2,13);
VAR5:=LLV(LOW,34);
VAR6:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;
VAR7:=CROSS(93,VAR6);
VAR8:=EMA(IF(LOW<=VAR5,VAR4,0),3);
VAR9:=HIGH>LLV(LOW,0)*7;
VAR10:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1);
VAR11:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR10*10.9;
T:=FILTER(IF(VAR11<=VAR10 AND VAR8>REF(VAR8,1),VAR8*8,0),20);
洗盘结束:IF(VAR11<=VAR10 AND VAR8>REF(VAR8,1),100000,0),COLORMAGENTA,LINETHICK2;
T0:FILTER(IF(CROSS(J4,J3) AND SUM(J1>REF(J1,1),3)>3,CROSS(J4,J3) AND CROSS(J2,J1),0),13),STICK,COLOR5E8262,LINETHICK3;
T1:FILTER(CROSS(J1,J2) AND VOL>REF(SUM(VOL,5),1),3),STICK,COLORYELLOW,LINETHICK3;
T2:FILTER(VAR7 AND CLOSE/(REF(CLOSE,1)-1)*100!=5 AND VAR9 AND VOL>REF(SUM(VOL,3),1),5),STICK,COLORCYAN,LINETHICK3;
T3:FILTER(VAR9 AND CROSS(J4,J3) AND CLOSE/(REF(CLOSE,1)-1)*100!=5,22),STICK,COLORGREEN,LINETHICK3;
TDXSTEP1235:DRAWTEXT(T0,T0,23),COLOR5E8262;
TDXSTEP1236:DRAWTEXT(T,120000,24),COLORMAGENTA;
TDXSTEP1237:DRAWTEXT(T1,T1*0.9,25),COLORYELLOW;
TDXSTEP1238:DRAWTEXT(T2,T2*0.9,26),COLORCYAN;
TDXSTEP1239:DRAWTEXT(T3,T3*0.9,27),COLORGREEN;
- 上一篇公式:MACD脉冲 加入止赢参考线
- 下一篇公式:抓板利器分时指标 不看后悔 源码