INVITE-ONLY SCRIPT
S2O Gold Ai (H4)

### S2O Gold Ai (H4) — What’s Unique
**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.
**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.
僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡XKR_AI。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
- Start with the **default H4** settings for 2–4 weeks.
- Keep **Confirm on Bar Close** ON to avoid intrabar noise.
- Set **BUY/SELL alerts** as “Once Per Bar Close.”
Questions? DM me on TradingView anytime.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
僅限邀請腳本
只有經作者批准的使用者才能訪問此腳本。您需要申請並獲得使用權限。該權限通常在付款後授予。如欲了解更多詳情,請依照以下作者的說明操作,或直接聯絡XKR_AI。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
- Start with the **default H4** settings for 2–4 weeks.
- Keep **Confirm on Bar Close** ON to avoid intrabar noise.
- Set **BUY/SELL alerts** as “Once Per Bar Close.”
Questions? DM me on TradingView anytime.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。