Bullish Scan
# RSI_IFT (smoothed Inverse Fisher Transform RSI)
# Change Log
# 2021.01.29 v1.0
@cos251 - Intial Script; takes smoothed 5 period RSI and puts it # through Inverse arctanh(x) forumla
#
#CREDITS
# -
https://www.mesasoftware.com/papers/TheInverseFisherTransform.pdf
# -
https://www.mql5.com/en/articles/303
declare lower;
#--- Inputs
input length = 5;
def over_Bought = .5;
def over_Sold = -.5;
input paintbars = no;
input showVerticalLines = yes;
#--- End Inputs
#--- RSI and Smoothed Inverse RSI Calculation
def R = reference RSI(length, close) - 50;
def AvgRSI = MovingAverage(AverageType.Exponential,R,9);
def iRSI = (Power(Double.E, 2 * AvgRSI) - 1) / (Power(Double.E, 2 * AvgRSI) + 1);
#plot Inverse_RSI = iRSI;
#--- Add VerticalLine
def sqzAlert = reference TTM_Squeeze().SqueezeAlert; #Hint -Used for candle price color
AddVerticalLine(showVerticalLines and (iRSI > 0) and (iRSI[1] < 0), "Entry BUY", Color.GRAY);
AddVerticalLine(showVerticalLines and (iRSI[1] > 0) and (iRSI < 0), "Entry SELL", Color.YELLOW);
AssignPriceColor(if paintbars and iRSI > 0 and sqzAlert == 1 then Color.GREEN else if paintbars and iRSI < 0 and sqzAlert == 1 then Color.RED else if paintbars and sqzAlert == 0 then Color.GRAY else Color.Current);
plot scan = (iRSI > 0) and (iRSI[1] < 0);