joe_vijay

Buy/Sell Pressure Raw

// This is a port of the bar by bar Buy/Sell pressure indicator by Karthik Marar.
// See below link for further details.
// karthikmarar.blogspo...ssure-indicator.html
// The only difference being I used the Hull moving average instead of WMA which the HullMA is a derivative of.
// Credits to Chris Moody for the HullMA code.
// All disclaimers apply

สคริปต์โอเพนซอร์ซ

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

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

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
// This is a port of the bar by bar Buy/Sell pressure indicator by Karthik Marar.
// See below link for further details. 
// http://karthikmarar.blogspot.com/2012/09/buying-and-selling-pressure-indicator.html
// The only difference being I used the Hull moving average instead of WMA which the HullMA is a derivative of.
// Credits to Chris Moody for the HullMA code.
// All disclaimers apply

study("Buy/Sell Pressure Raw ", shorttitle="BSP RAW")
sp = high - close
bp = close - low
hline(0)

hullma(src, len) => 
        wma(2*wma(src, len/2)-wma(src, len), round(sqrt(len)))

bpavg = hullma(bp,60)
spavg = hullma(sp,60)
nbp = bp/bpavg
nsp = sp/spavg
diff1 = nbp-nsp
Varg = hullma(volume,60)
nv = volume/Varg
nbfraw = nbp * nv
nsfraw = nsp * nv

plot(nbfraw, title = "Buy Pressure", style = columns, color= lime)
plot(-nsfraw, title = "Sell Pressure", style = columns, color= red)