[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"indicator-findfirstindex-es":3},"# Find First Index (FINDFIRSTINDEX)\n\n> StratCraft indicator page for first-match index logic.\n\n**Route**: `\u002Findicators\u002Ffindfirstindex\u002F`\n\n## What It Does\n\nFINDFIRSTINDEX returns the first index in a lookback window that satisfies a chosen condition. It is a utility for event detection.\n\n## Formula\n\nReturn the earliest bar index that matches the selected condition within the lookback period.\n\n## Parameters\n\n- `period` - default `14`\n- `_evalfunc` - default `close_gt_open`\n\n## C++23 API\n\n```cpp\n#include \u003Cnonabt\u002Findicators\u002Ffindfirstindex.hpp>\nauto firstIndex = std::make_unique\u003Cnonabt::FINDFIRSTINDEX>(data(), 14, \"close_gt_open\");\n```\n\n## Common Usage\n\n- Use it to detect the first qualifying event in a window.\n- Combine with pattern recognition logic.\n- Useful in rule engines and signal timing helpers.\n\n## Practical Pattern\n\nFINDFIRSTINDEX is helpful when the first occurrence of an event matters more than the latest one.\n"]