# Find First Index (FINDFIRSTINDEX)

> QuantNexus indicator page for first-match index logic.

**Route**: `/quantnexus/indicators/findfirstindex/`

## What It Does

FINDFIRSTINDEX returns the first index in a lookback window that satisfies a chosen condition. It is a utility for event detection.

## Formula

Return the earliest bar index that matches the selected condition within the lookback period.

## Parameters

- `period` - default `14`
- `_evalfunc` - default `close_gt_open`

## C++23 API

```cpp
#include <nonabt/indicators/findfirstindex.hpp>
auto firstIndex = std::make_unique<nonabt::FINDFIRSTINDEX>(data(), 14, "close_gt_open");
```

## Common Usage

- Use it to detect the first qualifying event in a window.
- Combine with pattern recognition logic.
- Useful in rule engines and signal timing helpers.

## Practical Pattern

FINDFIRSTINDEX is helpful when the first occurrence of an event matters more than the latest one.
