Re: Buy Sell Pressure indicator for MT4

61
andrei-1 wrote: Sat Feb 18, 2023 3:30 pm

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. :)

You've done an awful lot of work on this over the past week. Impressive!

What's the difference between these two indicators? Do each of them now have all 5 possible calculations of BSP?


Re: Buy Sell Pressure indicator for MT4

62
TransparentTrader wrote: Thu Feb 16, 2023 10:01 am 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!
This is a Gann adaptive jma smoothed Heiken Ashi think maybe whomever codes this maybe it will help to make the Heiken Ashi version, could maybe even use the ha smoothing. Just my 2 cents.
These users thanked the author mrtools for the post (total 4):
mosape, andrei-1, Akela, yoki

Re: Buy Sell Pressure indicator for MT4

65
mrtools wrote: Sat Feb 18, 2023 4:13 pm This is a Gann adaptive jma smoothed Heiken Ashi think maybe whomever. codes this maybe it will help to make the ha version, could maybe even use the ha smoothing. Just my 2 cents.
Buy Sell Pressure (Heiken Ashi smoothed)

Made this Heiken Ashi smoothed version, seems ok.
These users thanked the author mrtools for the post (total 10):
RodrigoRT7, kvak, TransparentTrader, andrei-1, BeatlemaniaSA, FXchaos, josi, eduarescobar, Ksenija, 太虚一毫


Re: Buy Sell Pressure indicator for MT4

67
Dear mrtools and kvak,

Would you be so kind as to add alerts and a button to the latest version of the BUY / SELL Pressure indicator?

The alerts are for when the histogram changes color :)

Also, if you deem it feasible and not too much trouble an option to switch on/off a slope color change to match the change in histogram color. This is purely a cosmetic request but you know I love the indicators to be easy on the eye :D


Warmest regards,
BeatlemaniaSA
These users thanked the author BeatlemaniaSA for the post (total 2):
Jedidiah, 13Play13
BEATS V5 - "Enjoy The Quiet Between Trades”

Improve Your Trading Psychology - NO FEAR, NO DOUBT

Re: Buy Sell Pressure indicator for MT4

68
BeatlemaniaSA wrote: Sun Feb 19, 2023 8:25 pm Dear mrtools and kvak,

Would you be so kind as to add alerts and a button to the latest version of the BUY / SELL Pressure indicator?

The alerts are for when the histogram changes color :)

Also, if you deem it feasible and not too much trouble an option to switch on/off a slope color change to match the change in histogram color. This is purely a cosmetic request but you know I love the indicators to be easy on the eye :D

Image


Warmest regards,
BeatlemaniaSA
Hello
First I want thanks Mrtools to post this version...
I made this version for test, try it....updated with colored line, alerts and button...
These users thanked the author kvak for the post (total 10):
josi, BeatlemaniaSA, FXchaos, yoki, eduarescobar, Jimmy, 13Play13, Jedidiah, Ksenija, 太虚一毫

Re: Buy Sell Pressure indicator for MT4

70
kvak wrote: Sun Feb 19, 2023 10:59 pm Hello
First I want to thank Mrtools for posting this version...
I made this version for testing, try it....updated with a colored line, alerts, and button...
Thanks, Kvak! Your's and mrtools' work is always appreciated. :)
These users thanked the author BeatlemaniaSA for the post:
kvak
BEATS V5 - "Enjoy The Quiet Between Trades”

Improve Your Trading Psychology - NO FEAR, NO DOUBT


Who is online

Users browsing this forum: alimpe2000, Amazon [Bot], ChatGPT [Bot], Gosfraba, Ruby [Bot], specialkey, thomdel, vvFish, Yandex [Bot] and 76 guests