Trender is a popular trailing stop indicator on the Bloomberg system and since I didn't have source code to work with, this is a close approximation of that indicator. Let me know if you spot any discrepancies and I will adjust accordingly.
This indicator is a trailing stop system along with a trend confirmation. When the blue line falls below the black line, that is a confirmation of a down trend and when it rises above the black line, it is a confirmation of an up trend. When the trender line is above the price, then that means the stock is in a general down trend and vice versa. I have color coded the trender line to show you when to buy or sell that stock to keep it easy.
This was a special request so let me know if you want to see more scripts from me or if you want something custom!