Basic Polychromatic Momentum Indicator with alerts
PMI involves taking the difference between the current price and the price n periods ago, and then subtracting from it the difference between the current price and the price n periods ago, divided by n. This gives a smoothed version of the momentum indicator.
The user can also specify a smoothing factor using the "smoothing" input, which applies a simple moving average to the PMI. The resulting smoothed PMI is plotted on the chart in blue, with a dotted gray line at the zero level.