The Coppock Indicator is a long-term price momentum oscillator which is used primarily to pinpoint major bottoms in the stock market. Crosses above the zero line indicate buying pressure, crosses below the center (zero) line indicate selling pressure.
This script generates a long entry signal when the Coppock value crosses over a signal line, and/or generates a short entry signal when the value crosses under a signal line.
Also it generates a long exit signal when the Coppock value crosses under a signal line, and/or generates a short exit signal when the value crosses over a signal line.
Signals can be filtered out by volatility, volume or both. To minimize repainting use higher percentage values of Time Threshold parameter.