Re: Already Converted TradingView Indicators to MT4 Indicators

82
Hi,

Could this indicator be converted to MT4?

Thank you.

https://www.tradingview.com/script/KGYE ... me-Signal/

Image

Code: Select all

//@version=4
study(shorttitle="BBSR Extreme", title="Bollinger Bands Stochastic RSI Extreme Signal", overlay=true, resolution="")

//General Inputs
src = input(close, title="Source")
offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)

//Bollinger Inputs
length = input(20, title="Bollinger Band Length", minval=1)
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")

//Bollinger Code
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
plot(basis, "BB Basis", color=#872323, offset = offset)
p1 = plot(upper, "BB Upper", color=color.teal, offset = offset)
p2 = plot(lower, "BB Lower", color=color.teal, offset = offset)
fill(p1, p2, title = "BB Background", color=#198787, transp=95)


//Stoch Inputs
smoothK = input(3, "K", minval=1)
smoothD = input(3, "D", minval=1)
lengthRSI = input(14, "RSI Length", minval=1)
lengthStoch = input(14, "Stochastic Length", minval=1)

upperlimit = input(90, "Upper Limit", minval=0.01)
lowerlimit = input(10, "Upper Limit", minval=0.01)

//Stochastic Code
rsi1 = rsi(src, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)

//Evaluation
Bear = close[1] > upper[1] and close < upper
     and k[1] > upperlimit and d[1] > upperlimit
Bull = close[1] < lower[1] and close > lower
     and k[1] < lowerlimit and d[1] < lowerlimit


//Plots
plotshape(Bear, style=shape.triangledown, location=location.abovebar, 
     color=color.red, size=size.tiny)
plotshape(Bull, style=shape.triangleup, location=location.belowbar, 
     color=color.green, size=size.tiny)
 
// Alert Functionality
alertcondition(Bear or Bull, title="Any Signal", message="{{exchange}}:{{ticker}}" + " {{interval}}" + " BB Stochastic Extreme!")
alertcondition(Bear, title="Bearish Signal", message="{{exchange}}:{{ticker}}" + " {{interval}}" + " Bearish BB Stochastic Extreme!")
alertcondition(Bull, title="Bullish Signal", message="{{exchange}}:{{ticker}}" + " {{interval}}" + " Bullish BB Stochastic Extreme!")
These users thanked the author oskar656 for the post (total 2):
Banzai, Chickenspicy

Re: Already Converted TradingView Indicators to MT4 Indicators

84
Hi Coders, I would be very grateful if this TrandingView Volume indicator could be converted to MT4 & MT5 if possible. As far I can tell, currently available MT4 Volume indicator differ from this TrandingView version. A choice of averages and prices would be an advantage.
Thanks


//@version=5
indicator(title="Volume", shorttitle="Vol", format=format.volume, timeframe="", timeframe_gaps=true)
showMA = input(true)
barColorsOnPrevClose = input(title="Color bars based on previous close", defval=false)
palette = barColorsOnPrevClose ? close[1] > close ? color.red : color.green : open > close ? color.red : color.green
plot(volume, color = color.new(palette,65), style=plot.style_columns, title="Volume")
plot(showMA ? ta.sma(volume,20) : na, style=plot.style_area, color=color.new(color.blue,65), title="Volume MA")




Who is online

Users browsing this forum: Amazon [Bot], baka.85, Banzai, Bing [Bot], domi8262, DotNetDotCom [Bot], Grapeshot [Bot], IBM oBot [Bot], Nanyuki, Sogou [Bot], tradeforesee and 47 guests