Skip to content

DIFFPCT() Function

By Optuma Team · Updated 2021-06-16

Available from Optuma 2.0 and onward the DIFFPCT() scripting function allows you to plot the difference (as a percentage) between two different plot values.

For example, the difference in value between 2 moving averages, or the Closing Price and Upper Bollinger band plot.

V1 = MA(BARS=25);
V2 = MA(BARS=150);
DIFFPCT(V1,V2)

DiffPct

Show View using the above script to display the difference between a 25SMA and 150SMA (as a percentage).

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.