Converting the RSI Divergence indicator from TradingView to MT5 indicator

MQL5 Indicators Converting

Job finished

Execution time 6 days
Feedback from customer
A bit late on delivery, but I'm overall very positive.

Specification

study(title="RSI Divergence Indicator", shorttitle= "RSI DIV", format=format.price)
len = 14
//input(title="RSI Period", minval=1, defval=14)
src = close
//input(title="RSI Source", defval=close)
lbR = 5
//input(title="Pivot Lookback Right", defval=5)
lbL = 5
//input(title="Pivot Lookback Left", defval=5)
rangeUpper = 60
//input(title="Max of Lookback Range", defval=60)
rangeLower = 5
//input(title="Min of Lookback Range", defval=5)
plotBull = input(title="Plot Bullish", defval=true)
plotHiddenBull = input(title="Plot Hidden Bullish", defval=true)
plotBear = input(title="Plot Bearish", defval=true)
plotHiddenBear = input(title="Plot Hidden Bearish", defval=true)
bearColor = color.red
bullColor = color.green
hiddenBullColor = color.new(color.green, 80)
hiddenBearColor = color.new(color.red, 80)
textColor = color.white
noneColor = color.new(color.white, 100)
osc = rsi(src, len)

// ### Smoothed MA

showSmma = input(title="Show Moving Average", type=input.bool, defval=true, group = "Smoothed MA")

smmaLen = 50
//input(50, minval=1, title="SMMA Length", group = "Smoothed MA")
smmaSrc = osc
smma = 0.0
smma := na(smma[1]) ? sma(smmaSrc, smmaLen) : (smma[1] * (smmaLen - 1) + smmaSrc) / smmaLen
plot(showSmma ? smma : na, linewidth=2, color=color.white)

// End ###

lineColor = (osc > smma) ?color.yellow :  color.yellow

plot(osc, title="RSI", linewidth=2, color=lineColor)
hline(50, title="Middle Line", linestyle=hline.style_solid)
// obLevel = hline(70, title="Overbought", linestyle=hline.style_dotted)
// osLevel = hline(30, title="Oversold", linestyle=hline.style_dotted)
//fill(obLevel, osLevel, title="Background", color=#9915FF, transp=90)

plFound = na(pivotlow(osc, lbL, lbR)) ? false : true
phFound = na(pivothigh(osc, lbL, lbR)) ? false : true
_inRange(cond) =>
        bars = barssince(cond == true)
        rangeLower <= bars and bars <= rangeUpper

//------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low

oscHL = osc[lbR] > valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1])

// Price: Lower Low

priceLL = low[lbR] < valuewhen(plFound, low[lbR], 1)
bullCond = plotBull and priceLL and oscHL and plFound

plot(
     plFound ? osc[lbR] : na,
     offset=-lbR,
     title="Regular Bullish",
     linewidth=2,
     color=(bullCond ? bullColor : noneColor),
     transp=0
     )

plotshape(
         bullCond ? osc[lbR] : na,
         offset=-lbR,
         title="Regular Bullish Label",
         text=" Bull ",
         style=shape.labelup,
         location=location.absolute,
         color=bullColor,
         textcolor=textColor,
         transp=0
         )

//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low

oscLL = osc[lbR] < valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1])

// Price: Higher Low

priceHL = low[lbR] > valuewhen(plFound, low[lbR], 1)
hiddenBullCond = plotHiddenBull and priceHL and oscLL and plFound

plot(
         plFound ? osc[lbR] : na,
         offset=-lbR,
         title="Hidden Bullish",
         linewidth=2,
         color=(hiddenBullCond ? hiddenBullColor : noneColor),
         transp=0
         )

plotshape(
         hiddenBullCond ? osc[lbR] : na,
         offset=-lbR,
         title="Hidden Bullish Label",
         text=" H Bull ",
         style=shape.labelup,
         location=location.absolute,
         color=bullColor,
         textcolor=textColor,
         transp=0
         )

//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High

oscLH = osc[lbR] < valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1])

// Price: Higher High

priceHH = high[lbR] > valuewhen(phFound, high[lbR], 1)

bearCond = plotBear and priceHH and oscLH and phFound

plot(
         phFound ? osc[lbR] : na,
         offset=-lbR,
         title="Regular Bearish",
         linewidth=2,
         color=(bearCond ? bearColor : noneColor),
         transp=0
         )

plotshape(
         bearCond ? osc[lbR] : na,
         offset=-lbR,
         title="Regular Bearish Label",
         text=" Bear ",
         style=shape.labeldown,
         location=location.absolute,
         color=bearColor,
         textcolor=textColor,
         transp=0
         )

//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High

oscHH = osc[lbR] > valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1])

// Price: Lower High

priceLH = high[lbR] < valuewhen(phFound, high[lbR], 1)

hiddenBearCond = plotHiddenBear and priceLH and oscHH and phFound

plot(
         phFound ? osc[lbR] : na,
         offset=-lbR,
         title="Hidden Bearish",
         linewidth=2,
         color=(hiddenBearCond ? hiddenBearColor : noneColor),
         transp=0
         )

plotshape(
         hiddenBearCond ? osc[lbR] : na,
         offset=-lbR,
         title="Hidden Bearish Label",
         text=" H Bear ",
         style=shape.labeldown,
         location=location.absolute,
         color=bearColor,
         textcolor=textColor,
         transp=0
         )
         

// ### Alerts


if bearCond
    alert("Bearish Divergence")
else if hiddenBearCond
    alert("Hidden Bearish Divergence")
else if bullCond
    alert("Bullish Divergence")
else if hiddenBullCond
    alert("Hidden Bullish Divergence")



// END ###
Hello, Please convert this Tradingview code to a MT5 indicator.

Responded

1
Developer 1
Rating
(792)
Projects
1361
72%
Arbitration
112
29% / 48%
Overdue
340
25%
Working
Similar orders
Hello Developer, I am Darshan Galani. i want to Convert Tradingview Indicator to MQ4 & MQ5 file.i also want to source code that must be easy to understand. TradingView Indicator: LuxAlgo Trendlines with Breaks
hello i need a good developer, i would do a conversion of a open source code from mql4 to mql5, it's not urgent so no hurry please take your time
I would like to ask the following: I work on a CTrader account (provided by a Broker) but on the Tradingview Platform. I would like to place an order with you if you make the following configuration correctly and at a good price: It is only about SL and TP. They must work like this: 1. When launching any order, SL should be set at 60p pips and TP at 4000 pips distance. 2. Whenever the launched position moves up or
Hello Developer, I am Darshan Galani. i want to Convert Tradingview Indicator to MQ4 & MQ5 file.i also want to source code that must be easy to understand. TradingView Indicator: LuxAlgo Trendlines with Breaks
Hello Developers, I need the below MT5 indicator converted to tradingview pinescript, modifications arent needed. I have the source code and will share, the converted indicator should work exactly the same, no need to change anything. Knowledge of pinescript coding is required. https://www.mql5.com/en/market/product/62843?source=Site +Market+MT5+Search+Rating006%3afractals
hello 👋 great developer am looking for developer that will help me to convert pinescript strategy to mt4 strategy I will be looking for your bid soon Best regards Ayofe
I have a HTF bot for prop challenge pass, I was buy it at 30$, now kortana didn't support mt4, so now I want to convert it to mt5, can you do this for me
👋 Hey, can you help me with code my script which is already working in pine script. moreover, I want a system where I can sell my trading bot and can give access with license. possible
I need to convert custom a indicator, I'm looking to convert from NinjaTrader to Quantower--are you familiar with Quantower and it's coding language? it's a rather simple indicator i just can't code on Quantower and would need that additional help--le me know. thanks
Hey I am in need of a proficient coder who is highly skilled in converting indicators from one trading platform to another, like the one we have here, the indicator is on metatrader 4 and would like to have an expert to convert this mt4 indicator to tradingview pinescript indicator, please if you can't do this kindly ignore this post, only apply just if you are able to do it thanks

Project information

Budget
30+ USD
VAT (19%): 5.7 USD
Total: 35.7 USD
For the developer
27 USD
Deadline
to 2 day(s)