# Counting occurrences of events

## Intro

If you want to calculate, and highlight on your chart, like this blue line below, the number of occurrences a certain event took place, you can do so by using a formula language.

In our example we will calculate how many times the S&P 500 Volatility Index (VIX) has been lower than 10 in history.

Step 1 (expendable paragraph)

Step 2 (expendable paragraph)

To the see exact construction of the document, you can download the file here.

To learn more about Formulas in Macrobond have a look at these articles: Formula.