MOD() Function

Author: Optuma Team Last updated: Jan 31, 2023 15:01

Overview

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)