OPEN-SOURCE SCRIPT
更新済 Ultimate Gold & FX K-NN Master V95

A sophisticated market analysis tool powered by K-NN.
Users have full control over MACD, STC, and SMC configurations. With integrated Elliott Wave analysis, this tool offers high-level functionality for professional trading.
Users have full control over MACD, STC, and SMC configurations. With integrated Elliott Wave analysis, this tool offers high-level functionality for professional trading.
リリースノート
A sophisticated market analysis tool powered by K-NN.Users have full control over MACD, STC, and SMC configurations. With integrated Elliott Wave analysis, this tool offers high-level functionality for professional trading.
リリースノート
A sophisticated market analysis tool powered by K-NN.Users have full control over MACD, STC, and SMC configurations. With integrated Elliott Wave analysis, this tool offers high-level functionality for professional trading.
リリースノート
A sophisticated market analysis tool powered by K-NN.Users have full control over MACD, STC, and SMC configurations. With integrated Elliott Wave analysis, this tool offers high-level functionality for professional trading.
リリースノート
A sophisticated market analysis tool featuring K-NN and dynamic Support/Resistance mapping.It offers full flexibility to adjust MACD, STC, and SMC parameters. The inclusion of Elliott Wave displays makes it a powerful, high-performance solution for traders.
A high-performance market analysis tool powered by K-NN and dynamic S/R mapping.
Enhanced MTF Analysis: Greatly improved multi-timeframe capabilities for deeper market insight.
Triple Target System: Now optimized with TP 1, 2, and 3 for better trade management.
Full Customization: Adjust MACD, STC, and SMC parameters to fit your strategy.
Elliott Wave Theory: Integrated visual analysis for professional-grade forecasting.
リリースノート
A sophisticated market analysis tool featuring K-NN and dynamic Support/Resistance mapping.It offers full flexibility to adjust MACD, STC, and SMC parameters. The inclusion of Elliott Wave displays makes it a powerful, high-performance solution for traders.
A high-performance market analysis tool powered by K-NN and dynamic S/R mapping.
Enhanced MTF Analysis: Greatly improved multi-timeframe capabilities for deeper market insight.
Triple Target System: Now optimized with TP 1, 2, and 3 for better trade management.
Full Customization: Adjust MACD, STC, and SMC parameters to fit your strategy.
リリースノート
A sophisticated market analysis tool featuring K-NN and dynamic Support/Resistance mapping.It offers full flexibility to adjust MACD, STC, and SMC parameters. The inclusion of Elliott Wave displays makes it a powerful, high-performance solution for traders.
A high-performance market analysis tool powered by K-NN and dynamic S/R mapping.
Enhanced MTF Analysis: Greatly improved multi-timeframe capabilities for deeper market insight.
Triple Target System: Now optimized with TP 1, 2, and 3 for better trade management.
Full Customization: Adjust MACD, STC, and SMC parameters to fit your strategy.
リリースノート
[V209] Ultimate Gold & FX - AI MasterThis indicator is an all-in-one Trend Following and Breakout system meticulously designed for Gold (XAUUSD) and major FX pairs. It integrates trend analysis via Moving Averages, range detection using ADX, Multi-Timeframe (MTF) Support/Resistance, and automated spread adjustment based on account types into a single, high-performance interface.
1. Basic Specifications
Trading Style: Trend Following & Range Breakout
Core Logic: MA Cross (EMA20/SMA80) with MACD filtering
Recommended Assets: XAUUSD (Gold) and major Forex pairs
Timeframes: Supports all timeframes (Scalping to Swing Trading)
Visuals: Main chart overlay
2. Key Features
① Dual MA Ribbons
Ribbon 1 (Core 4-Line): Primary trend indicators (Periods: 5, 20, 80, 200). Fully customizable types (SMA/EMA) and colors.
Ribbon 2 (Deca-Ribbon): A 10-line visualizer (Periods: 10–100) to gauge trend strength. Version 209 now allows independent color customization for all 10 lines.
② Smart Support & Resistance (Auto-Cleaning)
MTF S/R: Automatically displays key levels from higher timeframes (defaults to 2 timeframes higher or manual setting).
Current TF S/R: Plots structural points of the current timeframe.
Auto-Cleaning: Lines are automatically removed once the price breaks them with a candle body, keeping your chart clutter-free.
③ ADX Range Breakout
Range Detection: When ADX falls below the threshold (default 20), the system identifies the period as a "Range" and draws a box.
Breakout Alerts: Triggers a "BREAK" signal the moment price breaks the box high/low. This is optimized to filter out false breakouts by validating the established range width.
④ Smart Spread & Slippage Management
Asset Detection: Automatically distinguishes between Gold and Forex to apply appropriate slippage logic.
Account Optimization: Adjusts SL/TP lines based on your account type (Standard vs. Raw/Zero spread).
TP Adjustment: Shortens the target by the spread to ensure guaranteed profit-taking.
SL Adjustment: Widens the stop by the spread to prevent unnecessary "stop hunting."
⑤ Integrated Dashboard & Analytics
On-Chart Markers: Optional visual markers for MACD crosses, STC reversals, and SMC (Smart Money Concepts) Highs/Lows.
Analysis Box: Real-time MTF trend status monitor (MACD, MA, SMC).
Win Rate Box: Aggregates and displays the recent hit rate for TP1.
3. Changelog
v209 (Current Version)
Ribbon Grouping: Organized settings into "Ribbon 1" (4-line) and "Ribbon 2" (10-line).
Ribbon 2 Expansion: Replaced automatic gradients with individual color pickers for all 10 lines (Periods 10-100).
Pine Script v6 Optimization: Updated color constants and syntax to ensure full compatibility with the latest compiler.
v200 - v208
Range Logic Overhaul: Switched from volatility-based detection to ADX-based detection for more precise breakout signals.
Dynamic S/R: Added the auto-deletion feature for breached support/resistance boxes.
Spread Compensation: Implemented auto-detection for Gold and specific account pips.
Target Lines: Added automatic drawing/deletion of SL/TP lines upon entry and exit.
Performance Optimization: Removed heavy Elliott Wave logic and implemented calculation skipping for hidden features to maximize speed.
UI/UX: Added a master toggle to manage visibility for all features from the top of the settings menu.
[V209] Ultimate Gold & FX - AI Master
このインジケーターは、ゴールド(XAUUSD)およびFXメジャー通貨ペア向けに設計された、オールインワンのトレンドフォロー&ブレイクアウトシステムです。 移動平均線によるトレンド判断、ADXを用いたレンジ検知、MTFレジサポ、そして口座タイプに応じたスプレッド調整機能を1つのチャートに統合しています。
■ 基本仕様 (Basic Specifications)
トレードスタイル: トレンドフォロー & レンジブレイクアウト
メインシグナルロジック: MA(EMA20/SMA80)のクロス + MACDフィルター
推奨市場: XAUUSD (Gold), 各種FX通貨ペア
推奨時間足: 全時間足対応(スキャルピングからスイングまで)
チャート表示: オーバーレイ(メインチャート表示)
■ 主な特徴 (Features)
1. デュアル・MAリボン (Dual MA Ribbons)
Ribbon ① (基本4本): トレンドの方向性を決定する主要な4本(5, 20, 80, 200)。種類(SMA/EMA等)や色は個別に設定可能。
Ribbon ② (多重10本): トレンドの強さを視覚化する10本のライン(期間10~100)。V209より、10本すべての色を個別にカスタマイズ可能になりました。
2. 高機能レジサポ & 自動削除 (Smart Support & Resistance)
MTFレジサポ: 上位足(自動で2つ上の時間足、または手動設定)の重要ラインを表示。
現在足レジサポ: 現在の時間足の構造点を表示。
自動クリーニング機能: 価格が実体でブレイクし、機能しなくなったラインはチャートから自動的に削除されます。これによりチャートが散らかりません。
3. ADXレンジ・ブレイクアウト (ADX Range Breakout)
レンジ検知: ADXが閾値(デフォルト20)を下回ると、その期間を「レンジ」と判断しボックスを描画します。
ブレイクアウト: レンジボックスの高値・安値を実体で抜けた瞬間に「BREAK」サインとアラートを出します。ダマシを減らすため、確定したレンジ幅に対するブレイクのみを判定します。
4. スマート・スプレッド調整 (Smart Slippage Management)
XM/SM機能: スプレッドの広い「Gold」と「為替」を自動判別し、口座タイプ(Standard / Kiwami・Zero)に合わせてSL/TPラインを自動補正します。
TP: スプレッド分だけ手前に設定し、確実に利確。
SL: スプレッド分だけ遠くに設定し、狩りを回避。
5. チャート上インジケーター & ダッシュボード
オンチャート表示: MACDクロス、STC反転、SMC(High/Low)のサインをメインチャート上にマークとして表示可能。
分析BOX: マルチタイムフレームでのトレンド状況(MACD, MA, SMC等)を一目で確認。
勝率BOX: 直近のTP1到達率を集計して表示。
■ 変更履歴 (Changelog)
v209 (Current Version)
MAリボンのグループ化と拡張:
基本4本を「Ribbon ①」、多重10本を「Ribbon ②」として設定グループを整理。
Ribbon ② (10-100) の色設定を、自動グラデーションから10本すべて個別に色指定可能な仕様に変更。
Pine Script v6対応修正: 一部カラー定数(cyan, dodgerblue)の指定方法を修正し、コンパイルエラーを解消。
v200 - v208
レンジロジックの刷新: 変動幅判定からADX判定へ変更。ブレイクアウト判定を厳格化し、レンジ形成中の誤点灯を排除。
レジサポ機能強化: ブレイクされた(役割を終えた)レジサポBOXを自動で消去する機能を追加。
スプレッド補正: 通貨ペア名からGoldを自動判別し、口座タイプに応じたpips数を自動適用するロジックを実装。
ターゲットライン: エントリー時にSL/TPラインを描画し、決済完了時に自動削除する機能を追加。
軽量化: 不要なエリオット波動ロジックを削除し、表示オフの機能は計算をスキップするように最適化。
UI改善: 全機能の表示/非表示をトップ設定で一括管理できるように変更。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。