This script has been written to eliminate the period variable.(Integer)
Thus, it can be used comfortably in adaptive period scripts ! (For example : , , FAMA .. etc. )
All efforts goes to ChaosTrader (https://www.tradingview.com/script/I6rPL...) ,
RicardoSantos (https://tradingview.com/script/32ohT5SQ-...) ,
Hpotter for barcolor codes (iff) (https://www.tradingview.com/script/8cuqB...)
I hope it will help your new ideas . Best regards ! Noldo .