{RSI画线} LC:=REF(CLOSE,1); RSI2:SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100; OBV:=RSI2; P:=10; A3:=REF(OBV,P)=HHV(OBV,2*P+1); B3:=FILTER(A3,P); C3:=BACKSET(B3,P+1); D3:=FILTER(C3,P);{高点} A4:=REF(OBV,P)=LLV(OBV,2*P+1); B4:=FILTER(A4,P); C4:=BACKSET(B4,P+1); D4:=FILTER(C4,P);{低点} 上:=REF(OBV,BARSLAST(D3)),COLORFF00FF,NODRAW; 下:=REF(OBV,BARSLAST(D4)),COLOR00FF00,NODRAW; 向上:=CROSS(OBV,上*1.01),NODRAW; 相对能量:(OBV-下)/(上-下)*100,COLORYELLOW,NODRAW; R11:=BACKSET(ISLASTBAR,BARSLAST(D3)+1); S11:=R11>REF(R11,1); DRAWLINE(D3,OBV,S11,OBV,1),COLORYELLOW; T11:=BACKSET(ISLASTBAR,BARSLAST(D4)+1); U11:=T11>REF(T11,1); DRAWLINE(D4,OBV,U11,OBV,1),COLOR00FF00; STICKLINE(C>0,下,下,1,0),COLOR00FF00; STICKLINE(C>0,上,上,1,0),COLORFF00FF; DRAWTEXT(CROSS(OBV,上*1.01),上,'上'),COLORYELLOW; DRAWTEXT(CROSS(下*0.99,OBV),下,'下'),COLORYELLOW; DRAWICON(D3,OBV,2); DRAWICON(D4,OBV,1); 20,POINTDOT; 50,POINTDOT; 80,POINTDOT; |
