1. Added a Smoothed Rate of Change Transition Hard Exit Option. It takes the logarithmic percentage difference between the current bar and X bars ago and is smoothed by a EMA. Then it looks for rising or falling values. If you are in a long position and the values have been rising for X amount of bars and then they stop rising, the exit will occur. The opposite is true for short positions.
2. I removed some, but not all of the unused variables. The pine compiler seems to be running into compilation issues when I try to add in more features, so I seem to be hitting an unknown limit. I will continue to prune things and improve the efficiency.
3. I improved the table coloring function, by using the new built-in color.from_gradient function