https://www.tradingview.com/script/D9lP ... -Pressure/
The code is below:
Code: Select all
// © fract
//@version=5
indicator(title='Buying & Selling Pressure', shorttitle='BSP', overlay=false, timeframe="")
// Inputs and Formula {
high_ = math.max(high, close[1])
low_ = math.min(low, close[1])
bp = close - low_ //buying_pressure
sp = high_ - close //selling_pressure
ln = input(24, "BSPMA Length")
bpma = ta.ema(bp, ln)
spma = ta.ema(sp, ln)
//}
// Colors {
bpgrow = #40af40
bpfall = #2962ff
sprise = #f23645
spfall = #f57f17
//}
//{ Plots
bpp = plot(bpma, "Buying Pressure", color= bpma > bpma[1] ? bpgrow : bpfall, linewidth= 1)
spp = plot(spma, "Selling Pressure", color= spma > spma[1] ? sprise : spfall, linewidth = 1)
fill(bpp, spp, bpma > spma ? color.rgb(0, 255, 0, 90) : color.rgb(255, 0, 0, 90))
//}
Similar to the "MADX" indicator I requested a while back, this indicator only has 20 lines of very short code and I don't imagine the conversion to MT4 will be too difficult.
I'm also thinking of similar modifications that I requested when I first talked about the MADX indicator on Forex-Station:
- Adding all averages (I think through the eAverages pack?) so we can experiment with more than just the EMA
- Choosing which kind of moving average you use for "bpma" and "spma" separately
- Being able to change the length of "bpma" and "spma" separately so you aren't stuck with one length for all 3 parameters
- MTF/AHTF mode
- Arrows for buy/sell entries
- Coloring the candles to reflect when the indicator reflects buying/selling pressure
- Alerts to help us know when to look for a trade, especially on the higher timeframes
- A button so we can turn the indicator appearance on and off when we want
Looks to me like another great indicator for short-term scalping, especially for non-forex instruments which become most volatile at specific time periods of each trading day.
Thanks again for all the effort the programmers put in to make these indicators a cost-free reality for the rest of us!