- Desktop
- Scripting
- Formulas and Scripting Functions
- Count Match Since Signal Function
Count Match Since Signal Function
Overview
Section titled “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 conditionsV1 = RSI(BARS=14) CrossesAbove 70;V2 = RSI(BARS=14) CrossesBelow 30;
//Count the number of times V1 occurred since V2COUNTMATCHSINCESIGNAL(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:

Your privacy choices
We use cookies and similar technologies to make the site work, see how it's used, and improve it. Analytics and advertising cookies only run with your consent — see our Privacy Policy for details.