OPEN-SOURCE SCRIPT

lsi (study about length and MTF)

1 545
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

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.