I had to unroll the for loops and array because TV is missing crucial data structures and data conversions (Arrays and series to integer conversion for values).
I'm in the process of releasing some scripts. This is a very old script I had. This contains volatility ranges and can be used as trading signals. You can also see how the EF moves up or down, the direction, when price is sideways, and use price breaks up and down as signals from the line.
Have fun, because I didn't making this script hahaha
NOTE: There is an issue with the script where at certain time frames it positions itself below or above. I think its due to calculations. If anyone knows the fix before I get the chance to take a look at it, please let me know.