Re: Buy Sell Pressure indicator for MT4

52
Centaur wrote: Wed Feb 15, 2023 7:48 pm So from an EA point of view my vote will go with the version by fract, his original calculation, Calc2 in the summary, comments?

It is evident that the changes introduced by Calc3 is an attempt to get you into the trade much earlier, but I believe the advantage of Calc2 out ways this attempt.
We need Calc5+ to smooth the transition. :mistake: :)

Re: Buy Sell Pressure indicator for MT4

53
mrtools / kvak, I have one final request to make for the time being. Please do this at your own convenience whenever you have the time to do so.

In an earlier discussion on this thread for the NET BSP indicator, there was this standout quote I pulled from the official TradingView page for this indicator

One of the quotes was the following:

"To smooth things out for normal candles I found a good solution. With this new script we can use different types of MA's (moving averages). Default is set to HMA because it groups well the NORMAL candlesticks and is reactive even with 24 (length?). Change to SMA or EMA when it comes to dealing with HA candles."

I had also mentioned that the Heikin Ashi charts on TradingView produce different values for the open, close and highs and lows than normal candlestick charts.

One of the comments on the TradingView page for NET BSP had the following to say, accompanied by what a custom code would look like if NET BSP only used Heikin Ashi values:

My point in the question was that using "Heikin Ashi" produces different values for the open, close and highs and lows than the plain "Candles", as if you had written different code for the indicator with some sort of pre-filtering:

// Heikin Ashi smoothing {
// average price of the current bar
heikin_ashi_close = (open+high+low+close) / 4
// the midpoint of the previous bar
heikin_ashi_open = (open(1)+close(1)) / 2
heikin_ashi_high = math.max(high, open, close)
heikin_ashi_low = math.min(low, open, close)
//}

// Inputs and Formula {
ln = input(24, "BSP Average")
high_ = math.max(heikin_ashi_high, heikin_ashi_close(1))
low_ = math.min(heikin_ashi_low, heikin_ashi_close(1))
bd = math.abs(heikin_ashi_close - heikin_ashi_open)
uw = heikin_ashi_high - math.max(heikin_ashi_open, heikin_ashi_close)
lw = math.min(heikin_ashi_open, heikin_ashi_close) - heikin_ashi_low
bp = heikin_ashi_close - low_ - lw //buying_pressure
sp = high_ - heikin_ashi_close - uw //selling_pressure
bal = bp - sp
bsp = ta.ema(bal, ln)
//}


But as you can see under "Inputs and Formula", this would create V2 of our BSP indicator on MT4 that eliminated wicks from the equation. We now know better than to do this thanks to Fract.

If we were to apply only the Heikin Ashi prices to the formula we now use in V2.01 of BSP (or NET BSP for that matter), I believe it would look like what is down below. This is my amateur attempt at trying to create such a BSP indicator that only uses Heikin Ashi prices:

Code: Select all

// Inputs and Formula {
bp = heikin_ashi_close - math.min(heikin_ashi_low, heikin_ashi_close(1))                //buying_pressure
sp = math.max(heikin_ashi_high, heikin_ashi_close(1)) - heikin_ashi_close              //selling_pressure
ln = input.int(24, "BSP Length", 1, 200, 1)
bpma = ta.ema(bp, ln)
spma = ta.ema(sp, ln)

We would have to make this change for MT4 since the platform only treats Heikin Ashi as an overlay and not as separate open/high/low/close prices to be used as part of an indicator's mathematical calculations.

What do you think? Would it be worth our while to do this special modification for the BSP and/or NET BSP indicators, allowing us to change moving averages depending on the type of chart we are using?

Eager to hear other traders' thoughts!
These users thanked the author TransparentTrader for the post:
Mickey Abi

Re: Buy Sell Pressure indicator for MT4

54
4 types of prices * 4 types of smoothing = 16 oscillators.
The maximum values of 16 variants are displayed in Cloud_01.

ma_pr.
tied - consistent with trend 41,
proportional - integers (9 bound = 13 proportional),
free - almost normal (10 = 10 regular EMA).

If I use inappropriate parameter names, correct me, I'm not English.
These users thanked the author andrei-1 for the post (total 3):
Chickenspicy, Centaur, FXchaos


Re: Buy Sell Pressure indicator for MT4

57
Wicks, or no wicks? That is the question.

Fract just posted an update on TradingView a few minutes ago that allows users the choice to factor wicks into the indicator's calculations or not.

"Added switch for considering wicks in the formula. Some people thought it was a good idea using the indicator without wicks to eliminate noises in certain conditions of the market."

The code looks like this:

Code: Select all

// © fract
//@version=5
indicator(title='Buying & Selling Pressure', shorttitle='BSP', overlay=false, timeframe = "")

// Inputs and Formula {
sw = input(false, 'No Wicks', 'Focus on body candles')
uw = high - math.max(open, close)
lw = math.min(open, close) - low 
bp = close - (math.min(low, close[1])) - (sw? lw : 0)                //buying_pressure
sp = (math.max(high, close[1])) - close - (sw? uw : 0)               //selling_pressure
ln = input.int(24, "BSP Length", 1, 200, 1)
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, trackprice = true)
spp = plot(spma, "Selling Pressure", color= spma > spma[1] ? sprise : spfall, linewidth = 1, trackprice = true)
fill(bpp, spp, bpma > spma ? color.rgb(0, 255, 0, 90) : color.rgb(255, 0, 0, 90))
//}

I do believe we need something like this in one of the BSP indicators if we don't have it already. Would be interesting to see whether going "wickless" is the better choice depending on the market and/or timeframe you trade.
These users thanked the author TransparentTrader for the post:
andrei-1

Re: Buy Sell Pressure indicator for MT4

60

Code: Select all

B2[i]=(Close[i]-MathMin(Open[i+1],Close[i+1]))
B3[i]=(MathMax(Open[i+1],Close[i+1])-Close[i])

A fifth price has been added.

I was looking for an improvement with a microscope. Yes, it glues the gaps. :)
These users thanked the author andrei-1 for the post (total 4):
Chickenspicy, TransparentTrader, yoki, FXchaos


Who is online

Users browsing this forum: Amazon [Bot], ChatGPT [Bot], Grapeshot [Bot], Mojeek [Bot], Proximic [Bot], SEMrush [Bot], Trendiction [Bot] and 99 guests