OPEN-SOURCE SCRIPT
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
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
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。