Skip to content

MOD() Function

By Optuma Team · Updated 2023-01-31

The modulo function MOD(x,y) returns the remainder after x has been divided by y. For example, MOD(23,5) will return a value of 3, where 23 ÷ 5 is 4 remainder 3.

In Optuma, you can use a price in the MOD function, eg close:

MOD(CLOSE(),VALUE=5)

or technical value, eg 50 period MA:

MOD(MA(BARS=50),VALUE=10)

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.