Re: Buy Sell Pressure indicator for MT4
Posted: Thu Feb 16, 2023 2:20 am
Developer version.
Is everything right?
Is everything right?
We need Calc5+ to smooth the transition.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.
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)
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))
//}
TransparentTrader wrote: Sat Feb 18, 2023 1:25 am Wicks, or no wicks? That is the question.
Code: Select all
uw = high - math.max(open, close) lw = math.min(open, close) - low
Code: Select all
B3[i]=(High[i]-MathMax(Open[i],Close[i]))
B2[i]=(MathMin(Open[i],Close[i])-Low[i]);
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])
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])