RafaelZioni

Inverse Fisher RSI-MTF2

I wish this results were true . but it seems to be nice
Remove from Favorite Scripts Add to Favorite Scripts
dose it Repaints ?
Reply
RafaelZioni Vikrantshah
Reply
Without lookahead, with version 3, results become +-0


strategy(title = "Inverse Fisher RSI-MTF2 without Lookahead", shorttitle="INRSIM2N",overlay=true)
//Inputs
//@version=3
RSI_pm = input(5, title="RSI Main Period",minval=2)
RSI_ps = input(1, title="RSI Smooth Period",minval=0)

//Functions
IF(input)=>(exp(2*input)-1)/(exp(2*input)+1)
bton(b)=>b ? 1 : 0

//RSI Calculation
raw_RSI=0.1*(rsi(close,RSI_pm)-50)
wma_RSI=wma(raw_RSI,RSI_ps)*100
IF_RSI = IF(wma_RSI)

resCustom = input(title="Timeframe", type=resolution, defval="1440" )
v=security(tickerid, resCustom,IF_RSI, lookahead=barmerge.lookahead_off)

a=v>0.8
b=v<-0.8

z=0.8
buy = crossover(v,bton(z))
sell=crossunder(v,bton(b))

plotshape(sell, title="sell", style=shape.triangledown,location=location.abovebar, color=red, transp=0, size=size.small)
plotshape(buy, title="buy", style=shape.triangleup,location=location.belowbar, color=green, transp=0, size=size.small)


//Strategy
golong = crossover(v,z)
goshort = crossunder(v,bton(b))

strategy.entry("Buy",strategy.long,when = golong)
strategy.entry("Sell",strategy.short,when = goshort)
+1 Reply
RafaelZioni mark-sch
sadly it repaint so i am not surprise
Reply
i think this aslo repaint after refresh....many other indicator also this types of repaint after refresh... i dont test in live market but others tested as per this experience tell this....
Reply
i have to back off from my statements at sadly after testing it repaint
Reply
Hey man, pine script version 2 has a bug in security function which returns future data, that's why it's so accurate in backtesting
Reply
RafaelZioni renato_shira
thats true for MTF period above 6 hour . if you use time frame of MTF 180 min, with 30 min graph it will not repaint (in my testing) and still you have very good model
Reply
renato_shira RafaelZioni
@RafaelZioni, just convert to v3 and compare results
Reply
RafaelZioni renato_shira
the problem with V3 that it sometime it like to fall from the other side of the horse as it move the bar too much and signal will not be correct . so by using 3 hours MTF on 30 min I get better results with no repaint (this is the theory behind this) most of my indicators run on V3 , but this one I decide due to the calculation to run it differently
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Pine Wizards Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out