# Smart Error Detection

## Smart Error Detection & Correction

Don't let syntax errors slow you down. HorizonAI comes equipped with an intelligent debugging system that catches and resolves issues in your Pine Script code, acting as your expert coding partner.

### Key Features:

* **Proactive Error Detection:**
  * As you or the AI writes code, HorizonAI automatically scans for syntax errors, compilation issues, and common Pine Script mistakes. Forget hunting for that missing comma or mismatched parenthesis.
* **Intelligent Auto-Fixing:**
  * When an error is found, HorizonAI doesn't just point it out. It understands the context of the problem and will often automatically correct the code for you, streamlining the development process.
* **Expert Pine Script Knowledge:**
  * This powerful debugging is possible because HorizonAI has been deeply trained on the official Pine Script v5 manual. It knows the ins and outs of the language, from simple functions to complex strategies, ensuring the code it produces is accurate and follows best practices.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://horizon-trading.gitbook.io/horizon-trading/smart-error-detection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
