Converting the RSI Divergence indicator from TradingView to MT5 indicator

MQL5 Indicateurs Convertir

Tâche terminée

Temps d'exécution 6 jours
Commentaires du client
A bit late on delivery, but I'm overall very positive.

Spécifications

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.

Répondu

1
Développeur 1
Évaluation
(803)
Projets
1374
72%
Arbitrage
113
28% / 48%
En retard
342
25%
Travail
Commandes similaires
I would like to modify the RSI Epert Avisor with a developer. I would like to use the RSI Expert on the inverse mode and the base setting doesnt conatain this strategy mode
EA DEJA FABRIQUE ? MODIFIER QUELQUE LIGNE POUR LE RENDRE RENTABLE /////////////////////++++++++++++++++++++++++++++++++++ EA AVEC UN SYTEME SIMPLE ; SEULEMENT A MODIFIER %%%%%%%%%%%%%%%%%% SI PERSONNE SACHANT CODER CORRECTEMENT , CE TRAVAIL EST POUR TOI
Buy an sell symbols and guide showing entry to buy or sell setups and I need it gives and tell me to enter buy or to enter sell by automation nnnnnnnnnn fgggghhuuuiijh hhrddfhuuufffff yygggg hhgt hiidcb hygdfbby gyytdv uttrdd. Httdd hyyydv. Yhygf. Uu juhgff uyttt uuuytdbhy uuuyyy hhhff jjueeiivhgffdgu hyuu7trg yyyyffj yyytd u6tttf uuyrrrhi uytrrfh utterly jyrfgkkttv uhyybhhyy hytfgivuyt utfbh utghjio7t. Uuytg uytru
Utilizing the MQL5 MetaEditor Wizard, I created an Expert Advisor, having the following Signal indicators: I was able to optimize the EA and reached a backtest with the following specifications: I was able to reach a profit level of 30K, as indicated below. However, the Bot is not without faults and following the backtest, I started a forward test with real live data and the results were not so great. The EA took a
Connect from Mt5 via binary deriv account api I have mt5 indicator, need to connect with binary deriv account through api. If anyone can setup via API then contact me. everything control mt5
Hello I am looking for a developer to create an 50% retracement Indicator of the previous candle . So once a candle close the Indicator is supposed to take the full candle size from high to low and make a 61% and 50% level on that candle and I would like the candle to show until the next previous candle is done creating. After this I would look to create an ea with it possibly
Hi, I have 2 indicators which are based on the super trend , the alerts on indicator (1) does not work at all , and on the other indicator the alerts do not come on time on time, which is kind of delayed. see attached file below
Looking for an experienced developer to modify my existing TDI strategy , want to add filter for Buy and Sell Signals, Arrows are displayed on chart and what only to leave high accurate arrows Source code to be provided
I have the mq5 file, I need a buffer adding to the indicator, so it appears in the data window so I can reference it later in an EA. As the below screenshot shows, there is a median ray line from yesterday (the dashed horizontal line) - I want this value in the data window called Median Ray. I want this to be a single value per day, so todays Median Ray would be 17868, and so on each day. So I want all the Developing
I would like to develop my own indicator on metatrader 4 and tradingview. We would start with a basic version that we would improve later. It is an indicator based on several analyses and which would provide several indications. I am looking for someone who can develop on MT4 and Mt5, initially I would like to do it on mt4 and then on mt5. If you have expertise in pinescript it is a plus because I would like to

Informations sur le projet

Budget
30+ USD
TVA (19%): 5.7 USD
Total: 35.7 USD
Pour le développeur
27 USD
Délais
à 2 jour(s)