Conversion of TradingView Pine Script to MQL5 Indicator

MQL5 Indicators Converting

Job finished

Execution time 22 hours
Feedback from customer
I hired this developer to create a complex custom indicator. The code was flawless, with zero bugs, and they implemented all my requested features precisely.
Feedback from employee
Thanks for your fair order. Wish you safe trades,

Specification

Please convert the 2 Pine Scripts below into MQL5 Indicator, it has to be done in 2 days:

1. RMD

//@version=5
indicator('Ranging Market Detector', shorttitle='RMD')

// input paraneters
treshold_level = input.float(title='treshold', defval=4, minval=0, step=1)

//Kalman filter calculation
p = ohlc4

value1 = 0.0
value2 = 0.0
klmf = 0.0

value1 := 0.2 * (p - p[1]) + 0.8 * nz(value1[1])
value2 := 0.1 * (high - low) + 0.8 * nz(value2[1])
lambda = math.abs(value1 / value2)

alpha = (-lambda * lambda + math.sqrt(lambda * lambda * lambda * lambda + 16 * lambda * lambda)) / 8
klmf := alpha * p + (1 - alpha) * nz(klmf[1])


// Calculateing the absolute value of the Kalman filter curve slope
klmf_diff = math.abs(klmf - klmf[1])

// Long term average of the Kalman filter slope
av_klmf_diff = 1.0 * ta.ema(klmf_diff, 200)

// The Kalman filter slope minus the average slope (Decline from the average slope)
// This slope decline is divided by the average slope value to normalize it
normalized_slope_decline = (klmf_diff - av_klmf_diff) / av_klmf_diff

// Condition that defines the trend regime
// Slope declined from the average by not less than the given treshold value
trend_condition = (normalized_slope_decline >= treshold_level) or (normalized_slope_decline[1] >= treshold_level)

bgcol = trend_condition ? color.new(color.yellow, 30) : color.new(color.gray, 30)
// Plot normalized slope decline as histogram plot
plot(normalized_slope_decline, style=plot.style_columns, color=bgcol, linewidth=3)
//plot(lambda, style=plot.style_histogram, color=color.new(color.blue, 0), linewidth=3)
// Plot treshold level line
plot(treshold_level, color=color.new(color.yellow, 0))


2. HalfTrend

//@version=5
indicator('HalfTrend', overlay=true)

amplitude = input(title='Amplitude', defval=1)

channelDeviation = 2
atr_input = 100
showArrows = true
showChannels = true

var int trend = 0
var int nextTrend = 0
var float maxLowPrice = nz(low[1], low)
var float minHighPrice = nz(high[1], high)

var float up = 0.0
var float down = 0.0
float atrHigh = 0.0
float atrLow = 0.0
float arrowUp = na
float arrowDown = na

atr2 = ta.atr(atr_input) / 2
dev = channelDeviation * atr2

highPrice = high[math.abs(ta.highestbars(amplitude))]
lowPrice = low[math.abs(ta.lowestbars(amplitude))]
highma = ta.ema(high, amplitude)
lowma = ta.ema(low, amplitude)

if nextTrend == 1
    maxLowPrice := math.max(lowPrice, maxLowPrice)

    if highma < maxLowPrice and close < nz(low[1], low)
        trend := 1
        nextTrend := 0
        minHighPrice := highPrice
        minHighPrice
else
    minHighPrice := math.min(highPrice, minHighPrice)

    if lowma > minHighPrice and close > nz(high[1], high)
        trend := 0
        nextTrend := 1
        maxLowPrice := lowPrice
        maxLowPrice

if trend == 0
    if not na(trend[1]) and trend[1] != 0
        up := na(down[1]) ? down : down[1]
        arrowUp := up - atr2
        arrowUp
    else
        up := na(up[1]) ? maxLowPrice : math.max(maxLowPrice, up[1])
        up
    atrHigh := up + dev
    atrLow := up - dev
    atrLow
else
    if not na(trend[1]) and trend[1] != 1
        down := na(up[1]) ? up : up[1]
        arrowDown := down + atr2
        arrowDown
    else
        down := na(down[1]) ? minHighPrice : math.min(minHighPrice, down[1])
        down
    atrHigh := down + dev
    atrLow := down - dev
    atrLow

ht = trend == 0 ? up : down

var color buyColor = color.blue
var color sellColor = color.red

htColor = trend == 0 ? buyColor : sellColor
htPlot = plot(ht, title='HalfTrend', linewidth=2, color=htColor)


Responded

1
Developer 1
Rating
(254)
Projects
572
36%
Arbitration
64
20% / 58%
Overdue
147
26%
Free
2
Developer 2
Rating
(294)
Projects
436
64%
Arbitration
5
40% / 0%
Overdue
4
1%
Working
3
Developer 3
Rating
(185)
Projects
239
60%
Arbitration
8
25% / 38%
Overdue
8
3%
Working
Similar orders
Forex trading market opening an account for the first time, modify you system of forex , always there for everyone,you are all welcome and for info on all platforms @ lil_johnny254 there to serve you
An indicator that provides signals based on ZigZag and Moving Average needs to be converted to Java SDK in order to use it on MotiveWave platform. It is required to use this indicator with signals on the MotiveWave platform. The source code will be provided to developers who apply for this job
1. (price 10) I have an equity reporter. This equity reporter displays the maximum and minimum equity reached over a specific interval. So, if the interval is set to 24 hours, the script will generate data in the format: "Profit ATT" (profit AtThatTime) shows max./min. during the specific interval This specific report shows data in pips. It can also be set to display in price or percentages. The interval is also
Hello Guys! I want to modify/fix the indicator that uses sequential type of entries (it counts from 1 to 9) and if the conditions are met it provides an arrow (signal) with alert. The problem is that, sometimes (for unknown for me reasons) it repaints arrow signal. Like on the picture: Signal 1 - everything is correct. The signal is created. Signal 2 - everything is correct. The signal is created. Signal 3 -
I have the source code for a think or swim indicator. I would like someone procient in converting TOS code for use in MT5. Good communication skills in English is preferred. A detailed description of the indicator can be found here: https://intercom.help/simpler-trading/en/articles/6003945-about-quant-pivots
Hi, I am having trouble with my EA developer for me . i have not able to see him online to communicating with me . The EA is based on a strategy from and indicator signal . The error i get from the EA is ............ indicator is too slow, 2078 ms. rewrite the indicator, please, i need anyone who can fix it for me
I 'm looking for a bot to take trades . I have questions 1 . What is the win rate? It could be ! 2 . Any guarantee if the bot does not take a win trade
I am looking to have a tool developed that can connect and copy trade from Quantower on machine A to Quantower on machine B. I am aware that Quantower has a built in trade copier but I need to get the trades over to a different instance of QT on a separate machine. Is this possible and something you could help with? All orders for entry and exit would be market orders so do not need any targets or stop losses copied
I'm looking for professional developer for my project.I'm having indicators source code , i want to convert it into MT4 EA .it is having some basic inputs such as lot size,TP,SL,B.E,trailing,News filter features along with some special inputs.detailed strategy will be discussed in chat room.i prefer Indian developers who speaks hindi
Modify EA 30 - 50 USD
I am looking to add an extra order in the opposite direction to the current settings for an EA. entry settings should be cloned from the current EA, and the user should be able to edit these settings, in the same way as the user is currently able to edit the normal EA settings. for this project I would like to only clone the settings for "initial trade only" trading mode in the current EA, and also only allow

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
to 2 day(s)