Skip to content

Scans with non Boolean Scripts

By Optuma Team · Updated 2019-09-19

In the majority of cases the Optuma scanning manager requires a script which produces a Boolean result (1 for True, 0 for False). However from Optuma version 1.5 and later there are some specific instances where this is no longer required.

In cases where an IF(),or multiple IF functions have been setup to produce values greater than 1.

V1 = CLOSE() > OPEN() ;
V2 = CLOSE() > CLOSE(1) ;
V3 = VOLUME() > VOLUME(1) ;
V4 = CLOSE() > MA(BARS=50) ;
V5 = IF(V1 == 1 and V2 == 1 and V3 == 0 and V4 == 0,5,0) ;
V5

The above script produces a value of 5 when the criteria passes. In Optuma v1.5 and later this same script will produce a pass result in a scan.

ScanExampleAbove1

This same principle applies for cases where multiple Boolean variables are added up to produce a custom rank value.

For example:

V1 = CLOSE() > OPEN() ;
V2 = CLOSE() > CLOSE(1) ;
V3 = VOLUME() > VOLUME(1) ;
V4 = CLOSE() > MA(BARS=50) ;
V1 + V2 + V3 + V4

ScanExampleAbove2

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.