S2O Gold Ai (H4)

**Regime-Aware TLX.** The TLX line uses an Adaptive Multiplier driven by a volatility/efficiency proxy (VR z-score). It tightens during quiet markets and relaxes during volatile regimes, reducing whipsaws without sacrificing major trend participation.
**HTF Confirmation (optional).** Signals can be confirmed by a higher timeframe (default: 4H) to filter entries that run counter to the prevailing trend.
**BSZ Adaptive Threshold.** BSZ crosses are validated only when the signal strength (|lead − trail|) exceeds a user-defined z-score of its recent distribution, suppressing “weak taps” in borderline conditions.
**Cooldown & Session Control.** Entry frequency can be throttled (cooldown) and trading windows restricted to specific sessions to avoid low-liquidity periods or news spikes.
---
### How It Differs from Classic Implementations
* **Systematic input & entry framework.** Core logic is wrapped with regime, HTF, z-score, session, and cooldown filters, producing measurably different outcomes once activated.
* **Designed to be non-repainting for live use.** Signals are confirmed on closed bars via `barstate.isconfirmed` when “Enter on Bar Close” is selected.
### About the Inputs & Defaults (H4 preset)
The inputs ship with **pre-tuned starter presets** intended for H4 swing trading (tested primarily on XAUUSD and spot FX majors). These values were **numerically calibrated** to balance trend participation vs. whipsaw control under typical H4 volatility:
* **TLX ATR Window / Multiplier** – chosen to keep the directional band responsive to regime shifts while avoiding excessive flip-flops in low-noise segments.
* **BSZ Smooth Length** – set to stabilize the oscillator’s lead/trail pair so that crosses reflect meaningful momentum turns rather than minor jitters.
* **Adaptive Multiplier (optional)** – defaults off for full backward compatibility; when enabled, its lookback/floor/cap are configured to make adaptations gradual, not jumpy.
* **HTF Confirm (optional)** – default HTF = 4H so that confirmations reflect the dominant swing; the confirm length/multiplier mirror TLX’s base profile.
* **BSZ Adaptive Threshold (optional)** – z-score lookback/level are prefilled to filter only weak, borderline crosses while preserving strong impulses.
* **Cooldown / Session** – conservative defaults to reduce clustering of signals and avoid low-liquidity windows.
> **Important:** These numbers are **presets, not promises**. Markets evolve across symbols, brokers and sessions. For best results, treat them as a robust starting point and **validate or fine-tune per your instrument** (e.g., adjust TLX Multiplier ±11, BSZ length 8–14, z-score 0.25–0.50). Always forward-test and confirm on closed bars to avoid repaint-related bias.
## Order/Signal Execution Principles (H4)
**Signal Direction**
* **BUY** when:
1. The TLX directional state is **up** (price above the adaptive lower band); and
2. The BSZ oscillator’s **lead crosses above** the trail (valid cross).
* **SELL** when:
1. The TLX directional state is **down** (price below the adaptive upper band); and
2. The BSZ oscillator’s **lead crosses below** the trail.
**Optional Confirmations & Filters**
* **HTF Confirmation (optional):** The higher-timeframe (default 4H) TLX state must match the trade direction (up for BUY, down for SELL).
* **BSZ Adaptive Threshold (optional):** A cross is valid only if the absolute gap $|lead−trail|$ is statistically elevated (z-score ≥ user level).
* **Session Filter (optional):** Signals are allowed only during the user-defined trading session window.
* **Cooldown (optional):** After any signal, new signals are blocked for *N* bars to prevent clustering.
**Bar-Close Confirmation (non-repaint)**
* When **Confirm on Bar Close** is enabled, signals are accepted **only at bar close** (no intrabar repainting).
**One-at-a-time Logic (recommended for strategies)**
* Enter only when **flat**; ignore new signals until the open position is closed (either stop or target).
**Exit Logic (if used as a strategy)**
* **Stop-Loss:** Fixed distance in ticks from entry (user input).
* **Take-Profit:** Fixed distance in ticks from entry (user input, optional).
* If TP or SL is hit, the position closes and the cooldown timer (if enabled) starts.
**Sizing (strategy context)**
* Use fixed size or broker-style MT4 lots as per inputs. Buying-power checks and leverage are optional and user-controlled.
**Signal Generation vs. Execution**
* The published **indicator** generates **alerts only** (BUY/SELL) based on the rules above.
* Converting to a **strategy** applies the same entry conditions, with exits (SL/TP), position-sizing, and flat-only execution layered on top.
**Robustness Notes**
* Defaults are pre-tuned for H4 swing behavior; however, symbols differ. Validate and fine-tune (TLX Multiplier, BSZ length, z-score level, session window) to your instrument and broker conditions.
This strategy is a **process**, not a promise. It blends a directional band (TLX) with a momentum cross (BSZ) and optional regime/HTF/session filters to structure decisions on H4. The goal is consistency and clarity—**not** curve-fitted perfection. Markets evolve; so should your parameters, expectations, and risk controls.
Trading involves **substantial risk**. Backtests are simulations that can differ from live results due to spreads, commissions, slippage, data vendor differences, partial fills, and execution latency. Signals confirmed on bar close reduce repainting but do **not** eliminate market uncertainty. Past performance does **not** guarantee future results.
Use **position sizing, stop-losses, and realistic profit targets**. Start small, forward-test, and validate on your own symbols and broker conditions. Nothing herein is investment advice; you are responsible for your own decisions. Trade carefully—and let discipline be your edge.
For more information, please contact me **directly on TradingView**—send me a private message from my profile (click my username on this script’s page) or leave a comment under the script.
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement XKR_AI.
TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.
Instructions de l'auteur
Clause de non-responsabilité
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement XKR_AI.
TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.