Navigation: Realtest Script Language > Syntax Element Details > ROC or PctChg Category Multi-Bar Functions Description %gain/loss Syntax ROC(expr, count) or PctChg(expr, count) Parameters expr - data series formula count - lookback period Notes Either ROC or PctChg can be used as the name of this function. Return value is equivalent to 100 * (expr / expr[count] - 1). Copyright © 2020-2025 Systematic Solutions, LLC