I based my indicator from code by everget so you should go follow him if you aren't already!
I had issues with the default version of this indicator using different lengths so this is my fix for those issues. This follows the price very closely especially when the stock is falling. I have color coded so go long when it is green and short when it is red.
Let me know if you would like me to write any other scripts for indicators out there!