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 อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย 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")