Attachments forums

List of attachments posted on this forum.


All files on forums: 135975

Re: Already Converted TradingView Indicators to MT4 Indicators

ionone, Tue Jun 01, 2021 7:31 pm

another unconventional indi from TradingView
converted from this code:
https://fr.tradingview.com/script/IonBACU2-GJ-IFRSI/

Code: Select all

smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(5, minval=1)
lengthStoch = input(5, minval=1)
lengthWMA = input(9, minval=1)
src4 = input(close, title="RSI Source")
rsi1 = rsi(src4, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)

rsi = .1*(k-50)
wa = wma(rsi, lengthWMA)
ifish = (pow(2*wa,math.e)-1)/(pow(2*wa,math.e)+1)
plot(0.5, color=color.lime)
plot(-0.5, color=color.red)
plot(ifish)

if you want the exact same code as the TV page, then enable "original code" variable
but know that not all bars will have data. As a workaround, I checked if values are infinite or not, and if so, it will use previous bar value.

as you can see, sometimes the indi doesn't have value, so It will draw a line from previous valid value...
Jeff
All files in topic