Skip to content

Count Match Since Signal Function

By Optuma Team · Updated 2019-01-30

The COUNTMATCHSINCESIGNAL() scripting function requires two true/false Boolean scripts, and counts the number of times X occurred since Y.

This example counts how many times RSI(14) has crossed above 70 since it last crossed below 30:

//Create 2 Boolean conditions
V1 = RSI(BARS=14) CrossesAbove 70;
V2 = RSI(BARS=14) CrossesBelow 30;
//Count the number of times V1 occurred since V2
COUNTMATCHSINCESIGNAL(V1,V2)

In a watchlist and a Show View the script would look as follows, with CME’s RSI(14) having crossed 70 on 14 occasions since it last crossed below 30:

COUNTMATCHSINCESIGNAL

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.