OPEN-SOURCE SCRIPT
ที่อัปเดต: Timeframe Structure Analysis with EMA/SMA & RSI Confirmation

Core Components
MSB/ChoCH Structure: Unlike lagging pivot-based indicators, this script uses Market Structure Breaks (MSB) and Change of Character (ChoCH). It identifies a trend shift the moment price closes above or below the previous local swing levels.
Weighted Scoring: It assigns specific "weights" to each timeframe to calculate a total Sync Percentage:
4H & 2H: 30% each (Higher significance)
1H & 15M: 20% each (Lower significance)
Dual-Filter Logic: For a timeframe to be labeled "Bullish" or "Bearish," it must meet two criteria:
The Market Structure must have broken in that direction.
Price must be on the correct side of an adjustable Moving Average (EMA/SMA).
Real-time Momentum: Includes a Local RSI row that tracks momentum specifically for the timeframe you are currently viewing.
Visual Features
The script features a high-contrast Dark Mode Dashboard with color-coded status cells. It also includes an optional Visual MA that is anchored to the price action, ensuring it doesn't drift when you scroll or zoom. When all four timeframes align (100% Sync), the script can trigger a chart-wide background highlight to signal a high-confluence trading environment.
MSB/ChoCH Structure: Unlike lagging pivot-based indicators, this script uses Market Structure Breaks (MSB) and Change of Character (ChoCH). It identifies a trend shift the moment price closes above or below the previous local swing levels.
Weighted Scoring: It assigns specific "weights" to each timeframe to calculate a total Sync Percentage:
4H & 2H: 30% each (Higher significance)
1H & 15M: 20% each (Lower significance)
Dual-Filter Logic: For a timeframe to be labeled "Bullish" or "Bearish," it must meet two criteria:
The Market Structure must have broken in that direction.
Price must be on the correct side of an adjustable Moving Average (EMA/SMA).
Real-time Momentum: Includes a Local RSI row that tracks momentum specifically for the timeframe you are currently viewing.
Visual Features
The script features a high-contrast Dark Mode Dashboard with color-coded status cells. It also includes an optional Visual MA that is anchored to the price action, ensuring it doesn't drift when you scroll or zoom. When all four timeframes align (100% Sync), the script can trigger a chart-wide background highlight to signal a high-confluence trading environment.
Release Note
## Script Summary: MTF MSB/ChoCH + RSIThis indicator monitors Market Structure Breaks (MSB) and Change of Character (ChoCH) across four timeframes, while filtering for momentum using a weighted RSI component.### 1. The 100% Weighted SystemThe script calculates a "Total Sync" percentage based on the following distribution:Timeframes (90%): 4H (25%) + 2H (25%) + 1H (20%) + 15M (20%).Momentum (10%): Current TF RSI (Bullish if $> 50$, Bearish if $< 50$).When the score hits 100%, it signifies a "Perfect Order" where macro structure, micro structure, and momentum are all aligned in one direction.### 2. Visual IndicatorsMA Filter: A customizable EMA/SMA (default 26) acts as the primary trend gatekeeper. Structure breaks are ignored unless price is on the correct side of this line.Sidebar Dashboard: A real-time table displaying the status of each timeframe and the current RSI value.Buy/Sell Labels: Optional signals that appear exactly when the 100% sync threshold is crossed.Background Highlighting: The chart background glows Lime or Red during a full 100% confluence event for immediate visual recognition.## Logic Optimization & FixesI noticed a few things in your provided code that could lead to "repainting" or logic errors. Here is the corrected version with stabilized trend logic:Release Note
Added Trend CounterRelease Note
Welcome to version 6 of the MTF MSB/ChoCH - Weighted Sync indicator!This script is designed for traders who want to filter out market noise and trade in the direction of true, multi-timeframe momentum. Instead of relying on a single timeframe, this indicator analyzes market structure across four distinct timeframes (4H, 2H, 1H, 15M) and combines it with Session VWAP and RSI to calculate a real-time Total Sync Percentage.
When the market achieves 100% alignment, you know you have the full weight of the trend behind you.
✨ How the 100% Weighting System Works:
The indicator grades the current market environment based on a 100-point scale:
4H Trend (20%): Higher timeframe market structure (Swing Highs/Lows + MA Filter).
2H Trend (20%): Mid-high timeframe structure.
1H Trend (20%): Mid timeframe structure.
15M Trend (20%): Short-term execution structure.
Session VWAP (10%): Is price holding above (Bullish) or below (Bearish) the daily volume-weighted average price?
RSI (10%): Is the 14-period RSI showing bullish (> 50) or bearish (< 50) momentum?
📊 Key Features:
Dynamic Dashboard: A clean, customizable table on your chart displays the real-time status of all 6 metrics, the Total Sync %, and a built-in Duration Counter that tracks exactly how many bars a 100% trend has been active.
100% Sync Highlights: The chart background automatically illuminates green (Bullish) or red (Bearish) the exact moment all metrics hit 100% alignment, making it impossible to miss the perfect setup.
On-Chart Visuals: Displays your chosen visual Moving Average (EMA/SMA) and the Session VWAP directly on the price chart (can be toggled off in settings).
Alerts & Labels: Plots standard "BUY" and "SELL" labels when a new 100% sync begins. Fully compatible with TradingView's alert system for custom notifications.
⚙️ Customization:
Everything is customizable in the settings menu! You can adjust the Lookback periods for market structure, toggle the MA and VWAP lines on/off, change the RSI length, and adjust the size and position of the dashboard table to fit your screen perfectly.
Note: This indicator is designed to help identify high-probability trend alignments and should be used alongside your own risk management and entry criteria.
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์แบบโอเพนซอร์ส
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน