Count Match Since Signal Function

Author: Optuma Team Last updated: Jan 30, 2019 21:29

Overview

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