RafaelZioni

lsi (study about length and MTF)

Here in this example I took lazy bear famous momentum squeeze indicator . the problem that there is lagging in the indicator so the buy and sell will be late . So instead the KC length that the original script had we put
int1=input(30)
int2=input(60)
lengthKC=isintraday and interval >= int1 ? int2/interval * 7 : isintraday and interval < 60 ? 60/interval * 24 * 7 : 7

this allow us to create a time and length related function to indicator and result in better output with no lagging
The second and most important thing is the ability to create indicator with time function as MTF without the security function that create repaint

all you need to do is to change int2 (to the time min of your choice ) and you can create an indicator with MTF function without the security function .And by this hopefully avoid the repainting issue

when you use this indicator change the setting of int1 and int 2 according to time frame that you use
lets say 15 min graph
make the int1 <15 min and the int2 at 15 min. if you want to see it as MTF just increase the int2 to the time set of your choice and play little with int1 to best setting
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?