IdeaRe: Already Converted TradingView Indicators to MT4 Indicators

63
JNascente wrote: Fri Mar 25, 2022 10:42 pm Good Morning. Could you please convert fbb to mt4? thanks
No, because it already exists here: Fibonacci Bollinger Bands MT4.

Please make an effort to search through our site next time. And if you're looking for something in particular, you can also deep search Forex-station, too.
Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance

Re: RSI OTT

65
ionone wrote: Sun Mar 27, 2022 1:57 am RSI OTT

I can't find my error...

this looks like a killer indi

RSI OTT is Anıl Özekşi's latest derived version of Optimized Trend Tracker on RSI Oscillator.
He can solve the fake signals of RSI Oscillator by adopting OTT on the indicator.
Those who don't know OTT can search in indicators.
Thanks for re-posting it Jeff. I've cleaned the topic and updated your original post with the new one as this one is working.

Interesting, I've just been reading up on it and OTT stands for Optimized Trend Tracker.
After comparing it to the tradingview one, this MT4 one seems a bit harder to decipher as the lines are a bit squished together.

I wonder if it's the same? Or is your code using Chande's CMO for calculation "somewhere"? ;)

Maybe Mrtools can take a look at it, too, if he's free later. The code on TV is:

Code: Select all

//@version=4
//created by    : @Anil_Ozeksi
//developer     : @Anil_Ozeksi
//author        : @mr. fofenks

study("RISOTTO",overlay=false, precision=2)


src               = close

//RSI
x1                = input(defval = 100      , title = "VAR RSI Period"          , type = input.integer, minval = 1  ,step = 1       , group = "VAR RSI")

//OTT
x2                = input(defval = 50       , title = "RISOTTO Period"          , type = input.integer, minval = 1  ,step = 1       , group = "RISOTTO")
x3                = input(defval = 0.2      , title = "RISOTTO Percent"         , type = input.float  , minval = 0  ,step = 0.05    , group = "RISOTTO")

//Signals
showsignalsc      = input( defval=false     , title = "Show RSI/OTT Crossing Signals?", type=input.bool)

OTT_Func(src,length, percent)=>
    valpha        = 2/(length+1)
    vud1          = src>src[1] ? src-src[1] : 0
    vdd1          = src<src[1] ? src[1]-src : 0
    vUD           = sum(vud1,9)
    vDD           = sum(vdd1,9)
    vCMO          = nz((vUD-vDD)/(vUD+vDD))
    VAR           = 0.0
    VAR          := nz(valpha*abs(vCMO)*src)+(1-valpha*abs(vCMO))*nz(VAR[1])
    fark          = VAR*percent*0.01//multi*atr //
    longStop      = VAR - fark
    longStopPrev  = nz(longStop[1], longStop)
    longStop     := VAR > longStopPrev ? max(longStop, longStopPrev) : longStop
    shortStop     = VAR + fark
    shortStopPrev = nz(shortStop[1], shortStop)
    shortStop    := VAR < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop
    dir           = 1
    dir          := nz(dir[1], dir)
    dir          := dir == -1 and VAR > shortStopPrev ? 1 : dir == 1 and VAR < longStopPrev ? -1 : dir
    MT            = dir==1 ? longStop: shortStop
    OTT           = VAR>MT ? MT*(200+percent)/200 : MT*(200-percent)/200
    [VAR,OTT]

rsi               = rsi(src,x1)

[VRSI,_]          = OTT_Func(rsi, x2, 1)
[_,RISOTTO]       = OTT_Func(VRSI+1000, 2, x3)

buySignalc        = crossover(VRSI+1000, RISOTTO[2])
sellSignallc      = crossunder(VRSI+1000, RISOTTO[2])

plot(VRSI+1000         , color=#0585E1     , linewidth=2, title="VAR RSI" , display = display.all)
plot(nz(RISOTTO[2])    , color=#B800D9     , linewidth=2, title="RISOTTO" , display = display.all)


plotshape(buySignalc    and showsignalsc ? RISOTTO*0.995 : na, title="Buy"  , text="Buy"    , location=location.absolute, style=shape.labelup   , size=size.tiny, color=color.green , textcolor=color.white)
plotshape(sellSignallc  and showsignalsc ? RISOTTO*1.005 : na, title="Sell" , text="Sell"   , location=location.absolute, style=shape.labeldown , size=size.tiny, color=color.red   , textcolor=color.white)

//alertcondition(cross(src, OTT[2]), title="Price Cross Alert", message="OTT - Price Crossing!")
//alertcondition(crossover(src, OTT[2]), title="Price Crossover Alarm", message="PRICE OVER OTT - BUY SIGNAL!")
//alertcondition(crossunder(src, OTT[2]), title="Price Crossunder Alarm", message="PRICE UNDER OTT - SELL SIGNAL!")

  
  
Attachments
Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance


Re: RSI OTT

67
Jimmy wrote: Sun Mar 27, 2022 8:02 pm Thanks for re-posting it Jeff. I've cleaned the topic and updated your original post with the new one as this one is working.

Interesting, I've just been reading up on it and OTT stands for Optimized Trend Tracker.
After comparing it to the tradingview one, this MT4 one seems a bit harder to decipher as the lines are a bit squished together.

I wonder if it's the same? Or is your code using Chande's CMO for calculation "somewhere"? ;)

Maybe Mrtools can take a look at it, too, if he's free later. The code on TV is:

Code: Select all

//@version=4
//created by    : @Anil_Ozeksi
//developer     : @Anil_Ozeksi
//author        : @mr. fofenks

study("RISOTTO",overlay=false, precision=2)


src               = close

//RSI
x1                = input(defval = 100      , title = "VAR RSI Period"          , type = input.integer, minval = 1  ,step = 1       , group = "VAR RSI")

//OTT
x2                = input(defval = 50       , title = "RISOTTO Period"          , type = input.integer, minval = 1  ,step = 1       , group = "RISOTTO")
x3                = input(defval = 0.2      , title = "RISOTTO Percent"         , type = input.float  , minval = 0  ,step = 0.05    , group = "RISOTTO")

//Signals
showsignalsc      = input( defval=false     , title = "Show RSI/OTT Crossing Signals?", type=input.bool)

OTT_Func(src,length, percent)=>
    valpha        = 2/(length+1)
    vud1          = src>src[1] ? src-src[1] : 0
    vdd1          = src<src[1] ? src[1]-src : 0
    vUD           = sum(vud1,9)
    vDD           = sum(vdd1,9)
    vCMO          = nz((vUD-vDD)/(vUD+vDD))
    VAR           = 0.0
    VAR          := nz(valpha*abs(vCMO)*src)+(1-valpha*abs(vCMO))*nz(VAR[1])
    fark          = VAR*percent*0.01//multi*atr //
    longStop      = VAR - fark
    longStopPrev  = nz(longStop[1], longStop)
    longStop     := VAR > longStopPrev ? max(longStop, longStopPrev) : longStop
    shortStop     = VAR + fark
    shortStopPrev = nz(shortStop[1], shortStop)
    shortStop    := VAR < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop
    dir           = 1
    dir          := nz(dir[1], dir)
    dir          := dir == -1 and VAR > shortStopPrev ? 1 : dir == 1 and VAR < longStopPrev ? -1 : dir
    MT            = dir==1 ? longStop: shortStop
    OTT           = VAR>MT ? MT*(200+percent)/200 : MT*(200-percent)/200
    [VAR,OTT]

rsi               = rsi(src,x1)

[VRSI,_]          = OTT_Func(rsi, x2, 1)
[_,RISOTTO]       = OTT_Func(VRSI+1000, 2, x3)

buySignalc        = crossover(VRSI+1000, RISOTTO[2])
sellSignallc      = crossunder(VRSI+1000, RISOTTO[2])

plot(VRSI+1000         , color=#0585E1     , linewidth=2, title="VAR RSI" , display = display.all)
plot(nz(RISOTTO[2])    , color=#B800D9     , linewidth=2, title="RISOTTO" , display = display.all)


plotshape(buySignalc    and showsignalsc ? RISOTTO*0.995 : na, title="Buy"  , text="Buy"    , location=location.absolute, style=shape.labelup   , size=size.tiny, color=color.green , textcolor=color.white)
plotshape(sellSignallc  and showsignalsc ? RISOTTO*1.005 : na, title="Sell" , text="Sell"   , location=location.absolute, style=shape.labeldown , size=size.tiny, color=color.red   , textcolor=color.white)

//alertcondition(cross(src, OTT[2]), title="Price Cross Alert", message="OTT - Price Crossing!")
//alertcondition(crossover(src, OTT[2]), title="Price Crossover Alarm", message="PRICE OVER OTT - BUY SIGNAL!")
//alertcondition(crossunder(src, OTT[2]), title="Price Crossunder Alarm", message="PRICE UNDER OTT - SELL SIGNAL!")

  
  
Image
Yeah the OTT part looks like it may be a Vidya Rsi, maybe a fast rsi vidya crossing a slow rsi vidya, but not sure.

Re: Already Converted TradingView Indicators to MT4 Indicators

69
RSI-Signals-by-HB converted from Pine Script language

buys only (exits are sells)

good signals I think.
in a good trading setup can be killer

Code: Select all

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © HamidBox

//@version=4
study("RSI Signals", overlay=true, shorttitle="Advanced RSI")

//Inputs
rsiL = input(title="RSI Length", type=input.integer, defval=7)
rsiOBI = input(title="RSI Overbought", type=input.integer, defval=70)
rsiOSI = input(title="RSI Oversold", type=input.integer, defval=30)
fibLevel = input(title="Hammer Body Size", type=input.float, defval=0.333, step=0.01)
BullBearEngulf = input(title="Bullish Bearish Engulfing", type=input.bool, defval=true)
hammerShooting = input(title="Hammer Shooting Bar", type=input.bool, defval=false)
twoBullBearBar = input(title="Two Bull Bear Bar", type=input.bool, defval=false)

//RSI VALUE
myRsi = rsi(close , rsiL)

//RSI OVERBOUGHT / OVERSOLD
rsiOB = myRsi >= rsiOBI
rsiOS = myRsi <= rsiOSI

///////////=Hammer & Shooting star=/////////////

bullFib = (low - high) * fibLevel + high
bearFib = (high - low) * fibLevel + low

// Determine which price source closses or open highest/lowest
bearCandle = close < open ? close : open
bullCandle = close > open ? close : open 

// Determine if we have a valid hammer or shooting star
hammer = (bearCandle >= bullFib) and rsiOS
shooting = (bullCandle <= bearFib) and rsiOB

twoGreenBars = (close > open and close[1] > open[1]) and rsiOS
twoRedBars = (close < open and close[1] < open[1]) and rsiOB

/////////////////////////////////////////////

// Engulfing candles
bullE = (close > open[1] and close[1] < open[1])
 //or hammer or twoGreenBars 
 
bearE = close < open[1] and close[1] > open[1]
 //or shooting or twoRedBars 

///////////////////////////////////////////


// ((x) y) farmula defination is: X is gona be executed before Y,
TradeSignal = ((rsiOS or rsiOS[1]) and bullE) or ((rsiOB or rsiOB[1]) and bearE)

if (TradeSignal and bearE and BullBearEngulf)
    label.new(x= bar_index, y= na, text="Exit", yloc= yloc.abovebar,color= color.maroon, textcolor= color.white, style= label.style_label_down, size=size.normal)
plotshape(TradeSignal and bearE and BullBearEngulf, title="Overbought", location=location.abovebar, color=color.orange, style=shape.triangleup, size=size.auto, text="")

if (TradeSignal and bullE and BullBearEngulf)
    label.new(x= bar_index, y= na, text="Buy", yloc= yloc.belowbar,color= color.green, textcolor= color.white, style= label.style_label_up, size=size.normal)
plotshape(TradeSignal and bullE and BullBearEngulf, title="Oversold", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.auto, text="")

//////////////////////////////

if (shooting and hammerShooting)
    label.new(x= bar_index, y= na, text="SS", yloc= yloc.abovebar,color= color.purple, textcolor= color.white, style= label.style_label_down, size=size.normal)
plotshape(shooting and hammerShooting, title="Overbought + hammer/shooting", location=location.abovebar, color=color.purple, style=shape.triangledown, size=size.auto, text="")

if (hammer and hammerShooting)
    label.new(x= bar_index, y= na, text="HMR", yloc= yloc.belowbar,color= color.blue, textcolor= color.white, style= label.style_label_up, size=size.normal)
plotshape(hammer and hammerShooting, title="Oversold + hammer/shooting", location=location.belowbar, color=color.lime, style=shape.triangledown, size=size.auto, text="")

///////////////////////////

if (twoGreenBars and twoBullBearBar)
    label.new(x= bar_index, y= na, text="2Bull", yloc= yloc.belowbar,color= color.olive, textcolor= color.white, style= label.style_label_up, size=size.normal)
plotshape(twoGreenBars and twoBullBearBar, title="Oversold + 2bulls", location=location.belowbar, color=color.lime, style=shape.triangledown, size=size.auto, text="")

if (twoRedBars and twoBullBearBar)
    label.new(x= bar_index, y= na, text="2Bear", yloc= yloc.abovebar,color= color.red, textcolor= color.white, style= label.style_label_down, size=size.normal)
plotshape(twoRedBars and twoBullBearBar, title="Overbought + 2bears", location=location.abovebar, color=color.blue, style=shape.triangledown, size=size.auto, text="")


// Send Alert if Candle meets our condition
alertcondition(TradeSignal, title="RSI SIGNAL", message="RSI Signal Detected fot {{ticker}}")
These users thanked the author ionone for the post:
RodrigoRT7

HSRL - Historical Support Resistance Lines

70
converted from TradingView : HSRL - Historical Support Resistance Lines

might be usefull to ya

Code: Select all

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © spiritualhealer117

//@version=4
study("HSRL")
length = input(title="Length", type=input.integer, defval=150)
resistanceChange = (highest(close,length)-highest(close,length)[length])/highest(close,length)[length]
supportChange = (lowest(close,length)-lowest(close,length)[length])/lowest(close,length)[length]
HSRL = resistanceChange-supportChange

line1=plot(resistanceChange,color=color.green)
line2=plot(supportChange,color=color.red)
fill(line1,line2,color=resistanceChange>supportChange?(resistanceChange>0?color.new(color.green,50):color.new(color.red,50)):(resistanceChange>0?color.new(color.yellow,25):color.new(color.yellow,50)))



These users thanked the author ionone for the post:
Borshchov A.N.


Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], ChatGPT [Bot], cheer4u, SEMrush [Bot], SijjiN, Sogou [Bot], Trendiction [Bot] and 85 guests