Skip to content

A slow momentum line built to show when a long fall turns.

Coppock is a weighted moving average of the sum of two rates of change, one longer and one shorter.

Traders, originally on monthly index charts, read a turn up from below zero as the start of a recovery. On hourly bars it is just a smoothed momentum line.

Coppock = WMA(ROC(firstRoCPeriods) + ROC(secondRoCPeriods), wmaPeriods)

Call: coppock(firstRoCPeriods, wmaPeriods, secondRoCPeriods)

Setting Chart default
firstRoCPeriods: First ROC Periods 14
wmaPeriods: WMA Periods 10
secondRoCPeriods: Second ROC Periods 11

What you get: a number.

Warm-up: with coppock(14, 10, 11), it asks for 15 bars of history and a run-up of 10, and its first value came on bar 25 of the example data.

Coppock Curve drawn by its own code on example prices

The prices are made up, hourly, and the same on every page, so the chart shows how the indicator behaves, not how a market behaved.

let previous;
function onIntervalClose() {
const value = coppock(14, 10, 11);
if (OPEN_POSITIONS_COUNT === 0 && previous !== undefined && value < 0 && value > previous) {
openPosition("BUY", { quantity: 10000, stopLossPips: 30, takeProfitPips: 60 });
}
previous = value;
}