# Automatic Settings Selection

This page shows how LuxSignals finds strong settings—fast. You can **let the optimizer pick** (recommended) or **lock values manually** once you know what you want.

***

### Before you optimize (1 minute)

Set these first so results reflect *your* risk:

* **Risk Management → Mode**: *Fixed Drawdown*, *Fixed Percent*, or *Fixed Amount*
* **Account Balance** and **Fees %** (if any)

> Why first? The optimizer converts backtest results into **money terms** using your risk mode, balance, and fees—so the “best” combo depends on these.

***

### Automatic mode (recommended)

**Where:** `General Settings → Settings Selection = Automatic`

1. **Choose an objective**

* *Total Profit* (money made, after fees)
* *Win Rate* (% of winning trades)
* *Profit Factor* (wins ÷ losses; >1.0 is good)
* *Min Drawdown* (prefers smoother equity)

2. **Define the search space**

* **Signal Length between** *(min … max)*\
  Lower = more signals; higher = cleaner signals.
* **ATR (SL/TP) mode**:\
  \&#xNAN;*Stop Loss between* (×ATR), *Risk-Reward between*
* **Pure Signals mode**:\
  \&#xNAN;*Length Smoothness between* (higher = fewer flips)

3. **Set resolution**

* **Signal Length Resolution** × **Risk Resolution**

  > Keep the product **≤ 1000** to avoid slow loads.

4. **Run it**

* The indicator **tests all combinations**, then **auto-selects the winner** on the **second-last candle**.
* Results appear in the **Dashboard** (bottom-right).
* Turn on **Heatmap** in `Visuals → Tables shown`.

> Tip: Start with *narrow* ranges and *modest* resolution. Widen only if you need more exploration.

***

### Reading the Heatmap (Automatic)

* **Color:** Green = better, Red = worse (relative to your objective).
* **Cells:** Each cell is a settings combo tested in the training window.
* **Headers:**
  * **ATR (SL/TP)**: Top rows show **RR** and **SL×ATR**; left column shows **Signal Length (L…)**.
  * **Pure Signals:** Columns are different **Smoothness** candidates; rows are **Signal Lengths (L…)**.
* **Numbers:**
  * *Profit Factor* → shown as `0.00`
  * *Total Profit / Min Drawdown* → % of **Account Balance**
  * *Win Rate* → % (higher is better)

> The indicator already **uses the best cell**. Use the heatmap to *understand* why it chose that combo or to pick a different style when switching to Manual.

***

### Manual mode (full control)

**Where:** `General Settings → Settings Selection = Manual`

* **ATR (SL/TP) mode:** set **Signal Length**, **Stop Loss (×ATR)**, **Risk-Reward**.
* **Pure Signals:** set **Signal Length**, **Length Smoothness**, and optionally adjust **Signals Lengths Ratio** under *Advanced Settings*.

**When to use Manual**

* You want a **consistent style** across markets/timeframes.
* You’ve learned from Automatic and want to **lock the feel**.

> Pro move: Run Automatic, note the **Signal Length**, **SL×ATR**, **RR** (or **Smoothness**) shown in the Dashboard “Settings” section, then copy those values into Manual.

***

### The Selection Window (how the optimizer “sees” history)

To keep things fair and avoid look-ahead:

* LuxSignals **trains** on bars **from \~100 bars after start** up to the **second-last bar**.
* It **selects the best combo** on the **second-last bar**, then paints the live bar with that choice.
* The first **100 bars** are a warm-up (stabilizes indicators).

**Why your winner changes**

* Different **symbols/timeframes** → different volatility.
* Changing **Risk mode / Balance / Fees** reshapes the money maths.
* Market **regime shifts** (trend ↔ chop) favor different settings.

> Re-optimize when switching assets/timeframes, or after major volatility shifts.

***

### Quick recipes

* **Fast scan (ATR mode):**\
  Length 6–60, SL 1.0–2.5, RR 1.5–3.0, Resolutions 8×8 (≤1000 total)
* **Swing scan (Pure):**\
  Length 10–80, Smoothness 1.0–6.0, Resolutions 8×8 (≤1000)

***

### Troubleshooting & tips

* **Loads slowly / no output:** Reduce ranges or lower resolutions; ensure product ≤ **1000**.
* **Too many trades:** Raise **Signal Length** or **Smoothness**; add **RSI Bias** or **Minimum candles between signals** (ATR mode).
* **Great backtest, poor forward feel:** Tighten ranges around realistic values and prefer **Profit Factor** or **Min Drawdown** over raw profit.

> Keep it simple: Start Automatic → read Heatmap/Dashboard → lock with Manual when you like the behavior.


---

# 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://luxsignals.gitbook.io/luxsignals/focus/automatic-settings-selection.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.
