xel_arjona

BUY & SELL PRESSURE XeLMod V2

BUY & SELL PRESSURE Oscillator
Ver. 2.0 XelMod

WHAT'S THIS?

This is an UPDATED version of a previous script already posted.

List of changes from previous script:
  • Separated as Column Histogram just the Regressive (Rate-Of-Change) Force of the indicator which gives a faster response of the trend.
  • Default period is now set to 81, as better Oscillator swing lagging.

This is an excelent momentum indicator very similar to ADX but in a candle weighting distribution rather than ranges.

For additional reference:
Karthik Marar BUY AND SELL PRESSURE INDICATORS.

Cheers!
Any feedback will be welcome...
@XeL_Arjona

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
//@version=2
study("BUY & SELL PRESSURE by Regression", shorttitle="BSPbR",overlay=false,precision=2)
so = input(title="Buy&Sell Pressure Oscillator:", defval=true)
p  = input(title="Lookback Window:", defval=81)
tev = input(title="Use External Volume?:", defval=false)
evt = input(title="External Volume Ticker:", type=symbol, defval="TVOL")
// Fixed Variables
volsym = tev ? evt : tickerid
vol = nz(security(volsym,period,volume),security(volsym,period,close))
V = vol == 0 ? 1 : nz(vol,1)
C = close
H = high
L = low
Hi  = max(H,C[1])
Lo  = min(L,C[1])
// XeL Rate Of Change MoD (Regressional)
SProc = abs((Hi-C)/Hi)
BProc = abs((C-Lo)/Lo)
SPprc = Hi-C
BPprc = C-Lo
BPs = sum(BProc,p)
SPs = sum(SProc,p)
BPa = sma(BProc,p)
BPap = sma(BPprc,p)
SPa = sma(SProc,p)
SPap = sma(SPprc,p)
BPn = (BProc/BPa)*12
SPn = (SProc/SPa)*12
BPnp = (BPprc/BPap)*12
SPnp = (SPprc/SPap)*12
Va = sma(V,55)
Vn = V/Va
BPo = linreg(BPn * Vn,9,0)
SPo = linreg(SPn * Vn,9,0)
nbf = sma(BPnp * Vn,9)
nsf = sma(SPnp * Vn,9)
regH = (BPo-SPo)
// Plot Directives
OCol = BPo > SPo ? blue : fuchsia
_1hs = BPs > SPs ? BPs : -BPs
_2hs = SPs > BPs ? SPs : -SPs
plot(so?regH:na,color=OCol,style=columns,transp=81,title="RegForce")
plot(so?na:_1hs,color=green,style=columns,transp=72,title="BProc")
plot(so?na:_2hs,color=red,style=columns,transp=72,title="SProc")
plot(so?nbf:na,color=green,style=line,transp=0,title="BPprice")
plot(so?nsf:na,color=red,style=line,transp=0,title="SPprice")