# LLM Market Detector - AI-Powered Market State Analysis

**Last Updated**: 2026-03-17
**Version**: 1.0.0

## How It Works

### Open LLM Market Detector

Navigate to the LLM Market Detector page from the strategy builder menu. This module uses large language models to classify current market conditions as trending, ranging, or volatile based on multi-timeframe price action analysis.

### Select a Configuration Preset

Choose from three built-in presets: Conservative (higher confidence thresholds, fewer but more reliable signals), Balanced (moderate sensitivity for general use), or Aggressive (lower thresholds for maximum signal frequency). Each preset adjusts batch size, warmup period, and lookback bars automatically.

### Fine-Tune Advanced Parameters

Expand the Advanced Configuration panel to manually adjust prediction batch size (how many bars the LLM processes per cycle), warmup period (minimum bars before first prediction), lookback bars (historical context window), and analysis interval (frequency of re-evaluation).

### Customize the Analysis Prompt

Edit the Analysis Prompt section to refine how the LLM interprets market conditions. You can instruct the model to weight specific indicators, prioritize certain timeframes, or focus on particular market microstructure signals for more targeted detection.

### Set the Default Fallback State

Configure the fallback market state (TREND, RANGE, or UNDEFINED) that the system uses when the LLM analysis is unavailable or returns inconclusive results. This ensures your downstream strategy always receives a valid market state signal.

### Generate Market Detection Strategy

Click the Generate Strategy button to compile your configuration into executable market detection code. The system sends your parameters and prompt to the LLM provider, which returns a structured detection algorithm tailored to your specifications.

### Review and Integrate the Output

Examine the generated detection code in the output panel. Verify the logic matches your expectations, then integrate it into your trading workflow. The market state output (TREND/RANGE) feeds directly into the Entry Signal Builder and Exit Strategy Builder for regime-adaptive strategies.

> The LLM Market Detector uses artificial intelligence to classify market conditions in real time. Detection accuracy depends on the quality of your prompt configuration and the underlying LLM model selected in your account settings.

## Tips & Best Practices

## Frequently Asked Questions

## Important Notes

> LLM-based market detection is probabilistic and not guaranteed to be accurate. AI predictions depend on model quality, prompt design, and market data availability. Each LLM API call consumes credits from your account. Always validate detection results through backtesting before using in live trading.

---

Source: https://stratcraft.ai/help/llm-market-detector/