Page 2128 of 2170

Re: MT4 Indicator requests and ideas

Posted: Tue May 06, 2025 6:07 am
by mrtools
Narutopips wrote: Tue May 06, 2025 4:40 am Please, Mrtools, can you be so kind as to add an Alert to this indicator, and if possible, make it MTF. You can direcct me if there is alreadyone with Alert. Thanks
Try here.

Re: MT4 Indicator requests and ideas

Posted: Tue May 06, 2025 2:07 pm
by sal
dear mr.tools
possible to convert this TV code to mt4. I think its good one..
or is it any similar one in mt4, please share
// © BackQuant

//@version=5
indicator(
"Kalman Hull RSI [BackQuant]",
shorttitle = "∫KHRSI [BackQuant]",
overlay = false,
precision = 2,
timeframe = "",
timeframe_gaps = true
)



// Define User Inputs
series float pricesource = input.source(close, "Kalman Price Source", group = "Calculation")
simple float measurementNoise = input.float(3.0, title="Measurement Noise", group = "Calculation", tooltip = "Lookback Period/ Calculation Length", step = 1.0)
simple float processNoise = input.float(0.01, title="Process Noise", step = 0.01, group = "Calculation")
simple int rsiPeriod = input.int(12, "RSI Period", group = "Calculation")
simple bool showkalman = input.bool(true, "Show Oscillator?", group = "UI Settings")
simple bool paintCandles = input.bool(false, "Paint candles according to Trend?", group = "UI Settings")
simple bool showoboslvls = input.bool(true, "Show Static High and Low Levels (Extreme OB/ OS Thresholds)", group = "UI Settings")

/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////
// Kalman Price Filter Function
N = 5
var float[] stateEstimate = array.new_float(N, na)
var float[] errorCovariance = array.new_float(N, 100.0)
f_init(series float pricesource) =>
if na(array.get(stateEstimate, 0))
for i = 0 to N-1
array.set(stateEstimate, i, pricesource)
array.set(errorCovariance, i, 1.0)

f_kalman(series float pricesource, float measurementNoise) =>
// Prediction Step
predictedStateEstimate = array.new_float(N)
predictedErrorCovariance = array.new_float(N)
for i = 0 to N-1
array.set(predictedStateEstimate, i, array.get(stateEstimate, i)) // Simplified prediction
array.set(predictedErrorCovariance, i, array.get(errorCovariance, i) + processNoise)

kalmanGain = array.new_float(N)
for i = 0 to N-1
kg = array.get(predictedErrorCovariance, i) / (array.get(predictedErrorCovariance, i) + measurementNoise)
array.set(kalmanGain, i, kg)
array.set(stateEstimate, i, array.get(predictedStateEstimate, i) + kg * (pricesource - array.get(predictedStateEstimate, i)))
array.set(errorCovariance, i, (1 - kg) * array.get(predictedErrorCovariance, i))

array.get(stateEstimate, 0)

f_init(pricesource)
kalmanFilteredPrice = f_kalman(pricesource, measurementNoise)
/////////////////////////////////////////////////////////////// © BackQuant ///////////////////////////////////////////////////////////////
// Hull Moving Average Function with Kalman instead of Weighted Moving Average
KHMA(_src, _length) =>
f_kalman(2 * f_kalman(_src, _length / 2) - f_kalman(_src, _length), math.round(math.sqrt(_length)))
// Return
kalmanHMA = KHMA(pricesource, measurementNoise)

kalman_hull_rsi = ta.rsi(kalmanHMA, rsiPeriod)


var color plotcol = #1dcaff4d

if kalman_hull_rsi > 50 and kalman_hull_rsi <= 55
plotcol := #1dcaff4d
else if kalman_hull_rsi > 55 and kalman_hull_rsi <= 62.5
plotcol := #1e9b254d
else if kalman_hull_rsi > 62.5 and kalman_hull_rsi <= 75
plotcol := #00ff003d
else if kalman_hull_rsi > 75 and kalman_hull_rsi <= 90
plotcol := #00ff0080
else if kalman_hull_rsi > 90
plotcol := #33ff00fc
else if kalman_hull_rsi < 50 and kalman_hull_rsi >= 45
plotcol := #e651004d
else if kalman_hull_rsi < 45 and kalman_hull_rsi >= 37.5
plotcol := #7715154d
else if kalman_hull_rsi < 37.5 and kalman_hull_rsi >= 25
plotcol := #ff00004d
else if kalman_hull_rsi < 25 and kalman_hull_rsi >= 10
plotcol := #ff000080
else if kalman_hull_rsi < 10
plotcol := #ff0000


plot(showkalman ? kalman_hull_rsi : na, style = plot.style_columns, histbase = 50, color = plotcol)
// Define Set Colors
osbgcol = #00e6764d
obbgcol = #ff52524d
obcol = #ff0000fc
oscol = #00ff00fc
midcol = #ffffff4d
barcolor = #00000000



// OB and OS Extreme Zones + Midline
obupper = plot(showoboslvls ? 100 : na , "+", obcol, editable = false)
osupper = plot(showoboslvls ? 20 : na , "-", oscol, editable = false)
oblower = plot(showoboslvls ? 80 : na , "+", obcol, editable = false)
oslower = plot(showoboslvls ? 0 : na , "-", oscol, editable = false)
fill(obupper, oblower, #7715154d, 'OB Fill')
fill(osupper, oslower, #1e9b254d, 'OS Fill')



// Colouring
var barColour = #ffffff
if kalman_hull_rsi > 50
barColour := #00ff00
else if kalman_hull_rsi < 50
barColour := #ff0000

// Plotting
barcolor(paintCandles ? barColour : na)

alertcondition(ta.crossover(kalman_hull_rsi, 50), title="Kalman Hull RSI Long", message="Kalman Hull RSI Long {{exchange}}:{{ticker}}")
alertcondition(ta.crossunder(kalman_hull_rsi, 50), title="Kalman Hull RSI Short", message="Kalman Hull RSI Short {{exchange}}:{{ticker}}")

Re: MT4 Indicator requests and ideas

Posted: Tue May 06, 2025 3:49 pm
by Intrest 1
This is an OBV indicator that is recounted through RSI. Could respected encoders do the same where, instead of OBV, through RSI is the Accumulation-Distribution(A/D) is recounted?

Re: MT4 Indicator requests and ideas

Posted: Tue May 06, 2025 5:37 pm
by rsistoch
Hi everyone. I am looking for a simple indicator that works like Xard's ADR2 Plus. Shows the fibonacci levels according to the previous day's HL. I want it to show past days as well and add levels from -400% to 400%.
Thank you!!!

Re: MT4 Indicator requests and ideas

Posted: Fri May 09, 2025 9:45 am
by mrtools
Intrest 1 wrote: Tue May 06, 2025 3:49 pm This is an OBV indicator that is recounted through RSI. Could respected encoders do the same where, instead of OBV, through RSI is the Accumulation-Distribution(A/D) is recounted?
Did this one.

Re: MT4 Indicator requests and ideas

Posted: Fri May 09, 2025 11:11 am
by tmostafa007
Dear All,

anyone can help me to enhance this code , i think there is a problem in the buffer and code as i need to create a dashboard that present the last bar color appear, also i need it to show me on the dashboard the next TF last bar color

thanks in advance

Re: MT4 Indicator requests and ideas

Posted: Fri May 09, 2025 12:19 pm
by LIKE
tmostafa007 wrote: Fri May 09, 2025 11:11 am Dear All,

anyone can help me to enhance this code , i think there is a problem in the buffer and code as i need to create a dashboard that present the last bar color appear, also i need it to show me on the dashboard the next TF last bar color

thanks in advance
You can refer to the VZU Trading System developed by Mr. Vzulaks, as he has made enhancements to this indicator.
vzu-trading-system-t8475981.html

Re: MT4 Indicator requests and ideas

Posted: Wed May 14, 2025 12:56 am
by 太虚一毫
thiru wrote: Sun Jul 03, 2022 12:30 am try, with arrow size and code

GapFinder.mq4
It looks better if the arrows are represented with rectangular boxes.

Re: MT4 Indicator requests and ideas

Posted: Wed May 14, 2025 1:45 am
by Intrest 1
https://ru.tradingview.com/script/b0wW6 ... Histogram/

Could anyone make such an indicator for MT4?

Re: MT4 Indicator requests and ideas

Posted: Fri May 16, 2025 4:20 am
by ujtrader
Intrest 1 wrote: Wed May 14, 2025 1:45 am https://ru.tradingview.com/script/b0wW6 ... Histogram/

Could anyone make such an indicator for MT4?
try this..