PROTECTED SOURCE SCRIPT
Aggiornato Dashboard Trend based MA Multi-TF

This Pine Script builds a multi-symbol, multi-timeframe Moving Average dashboard with automatic trend alignment detection and alerts. It displays the results in a neatly formatted table on the chart.
1. Inputs and Configuration
Moving Average Settings
The script allows the user to choose:
MA type: SMA, EMA, WMA, or VWMA
Two MA lengths: MA1 (default 89) and MA2 (default 200)
These moving averages are applied to all selected symbols and timeframes.
Symbol List
The script accepts 10 user-defined symbols, such as forex pairs, crypto, commodities, etc.
Example defaults: XAUUSD, XAGUSD, USOIL, BTCUSD, ETHUSD, etc.
Timeframes
It allows 4 configurable timeframes per symbol, such as:
1H
4H
Daily
Weekly
2. Core Calculation Logic
getMA()
A helper function that calculates the selected MA type for a price series.
calcStatus(price, MA1, MA2)
For each symbol and timeframe:
Returns 1 (bullish) if price > MA1 and price > MA2
Returns –1 (bearish) if price < MA1 and price < MA2
Returns 0 (neutral) otherwise
getSymbolStatus(symbol, timeframe)
Loads each symbol’s trend status using request.security() so that every symbol is checked across all timeframes.
The script gathers:
stXX_1 = status on timeframe 1
stXX_2 = status on timeframe 2
stXX_3 = status on timeframe 3
stXX_4 = status on timeframe 4
for all 10 symbols.
3. Trend Alignment (Multi-Timeframe Agreement)
The function:
checkAlignment(s1, s2, s3, s4)
Determines whether all 4 timeframes agree:
isBull = true if all statuses = +1
isBear = true if all statuses = –1
This identifies:
Strong Buy signals (full bullish alignment)
Strong Sell signals (full bearish alignment)
4. Alerts
Two alerts are created:
alert_bull
Triggered when any symbol has full bullish alignment.
alert_bear
Triggered when any symbol has full bearish alignment.
The alert message automatically lists the symbols that triggered the alignment.
Example:
ĐỒNG PHA TĂNG: XAUUSD BTCUSD ETHUSD
Alerts fire once per bar.
5. Dashboard Table Drawing
A table is drawn in the top-right corner of the chart.
Header row
Shows:
Symbol
Timeframe 1
Timeframe 2
Timeframe 3
Timeframe 4
Consensus
Row for each symbol
The dashboard shows:
▲ for bullish (status = 1)
▼ for bearish (status = –1)
– for neutral (status = 0)
Color System
Entire row turns green for full bullish alignment
Entire row turns red for full bearish alignment
Mixed states show softer colors per cell
Consensus column
Displays:
STRONG BUY (full bullish)
STRONG SELL (full bearish)
MIXED (anything else)
This makes it a clean trend scanner across many assets and timeframes.
Summary of What the Script Does
✔ Tracks 10 symbols across 4 timeframes
✔ Computes MA-based trend direction
✔ Detects multi-timeframe trend alignment
✔ Triggers alerts on strong bullish/bearish alignment
✔ Displays everything in a color-coded table dashboard
It is essentially a customizable trend dashboard + scanner + alert system for multiple instruments.
1. Inputs and Configuration
Moving Average Settings
The script allows the user to choose:
MA type: SMA, EMA, WMA, or VWMA
Two MA lengths: MA1 (default 89) and MA2 (default 200)
These moving averages are applied to all selected symbols and timeframes.
Symbol List
The script accepts 10 user-defined symbols, such as forex pairs, crypto, commodities, etc.
Example defaults: XAUUSD, XAGUSD, USOIL, BTCUSD, ETHUSD, etc.
Timeframes
It allows 4 configurable timeframes per symbol, such as:
1H
4H
Daily
Weekly
2. Core Calculation Logic
getMA()
A helper function that calculates the selected MA type for a price series.
calcStatus(price, MA1, MA2)
For each symbol and timeframe:
Returns 1 (bullish) if price > MA1 and price > MA2
Returns –1 (bearish) if price < MA1 and price < MA2
Returns 0 (neutral) otherwise
getSymbolStatus(symbol, timeframe)
Loads each symbol’s trend status using request.security() so that every symbol is checked across all timeframes.
The script gathers:
stXX_1 = status on timeframe 1
stXX_2 = status on timeframe 2
stXX_3 = status on timeframe 3
stXX_4 = status on timeframe 4
for all 10 symbols.
3. Trend Alignment (Multi-Timeframe Agreement)
The function:
checkAlignment(s1, s2, s3, s4)
Determines whether all 4 timeframes agree:
isBull = true if all statuses = +1
isBear = true if all statuses = –1
This identifies:
Strong Buy signals (full bullish alignment)
Strong Sell signals (full bearish alignment)
4. Alerts
Two alerts are created:
alert_bull
Triggered when any symbol has full bullish alignment.
alert_bear
Triggered when any symbol has full bearish alignment.
The alert message automatically lists the symbols that triggered the alignment.
Example:
ĐỒNG PHA TĂNG: XAUUSD BTCUSD ETHUSD
Alerts fire once per bar.
5. Dashboard Table Drawing
A table is drawn in the top-right corner of the chart.
Header row
Shows:
Symbol
Timeframe 1
Timeframe 2
Timeframe 3
Timeframe 4
Consensus
Row for each symbol
The dashboard shows:
▲ for bullish (status = 1)
▼ for bearish (status = –1)
– for neutral (status = 0)
Color System
Entire row turns green for full bullish alignment
Entire row turns red for full bearish alignment
Mixed states show softer colors per cell
Consensus column
Displays:
STRONG BUY (full bullish)
STRONG SELL (full bearish)
MIXED (anything else)
This makes it a clean trend scanner across many assets and timeframes.
Summary of What the Script Does
✔ Tracks 10 symbols across 4 timeframes
✔ Computes MA-based trend direction
✔ Detects multi-timeframe trend alignment
✔ Triggers alerts on strong bullish/bearish alignment
✔ Displays everything in a color-coded table dashboard
It is essentially a customizable trend dashboard + scanner + alert system for multiple instruments.
Note di rilascio
This Pine Script v5 indicator is a multi-symbol, multi-timeframe Moving Average Dashboard designed for professional trading workflows. It supports 10 customizable symbols, flexible MA types, four timeframes, and includes automatic alignment alerts when multiple timeframes show synchronized bullish or bearish trends. The indicator also renders a clean visual dashboard directly on the chart.1. Overview
The script builds a customizable dashboard showing bullish / bearish / neutral trend conditions for up to 10 instruments, based on two moving averages (MA89 and MA200 by default). Each symbol is analyzed across H1, H4, D1, and W1 timeframes (or user-selected TFs).
The dashboard highlights:
Full Bullish alignment (all 4 TFs = bullish)
Full Bearish alignment (all TFs = bearish)
Mixed signals (not fully aligned)
Real-time alerts are triggered when any symbol becomes fully aligned.
2. User Inputs
Moving Average Settings
Users can choose:
MA type: SMA, EMA, WMA, VWMA
Two MA lengths: default 89 and 200
Symbol Settings
There are 10 configurable symbols, including:
Gold (XAUUSD)
Silver (XAGUSD)
Oil (USOIL)
Crypto (BTCUSD, ETHUSD, XRPUSD)
Forex pairs (EURUSD, GBPUSD, AUDUSD, USDJPY)
Timeframe Settings
Four timeframes can be selected, default:
60m (H1)
240m (H4)
Daily (D1)
Weekly (W1)
Dashboard Position
Users can choose the table position:
Top/Middle/Bottom × Left/Center/Right
3. Internal Logic
MA Calculation Function
A helper function computes the chosen MA type:
getMA(src, len, type)
Supports: SMA, EMA, WMA, VWMA.
Trend Status Function
For each symbol the script determines:
1 → Price > MA89 & Price > MA200 → Bullish
–1 → Price < both MAs → Bearish
0 → Mixed or invalid
Multi-Timeframe Analysis
The script uses request.security() to fetch status for:
TF1, TF2, TF3, TF4 for each symbol
This creates 40 data points (10 symbols × 4 TFs).
4. Trend Alignment Check
A function checks full alignment:
checkAlignment(s1, s2, s3, s4)
It returns two booleans:
isBull → all timeframes bullish
isBear → all timeframes bearish
This is computed for all 10 symbols.
5. Alert System
The code creates two global alert conditions:
Bullish Alignment Alert
Triggered if any symbol has all TFs = bullish.
Bearish Alignment Alert
Triggered if any symbol has all TFs = bearish.
Alerts display:
Which symbols are aligned
Alert only once per bar
6. Dashboard Table Rendering
A dynamic table is drawn with:
Columns
Symbol name
TF1 signal
TF2 signal
TF3 signal
TF4 signal
Consensus (Strong Buy / Strong Sell / Mixed)
Cell coloring
Full green → Strong Buy (all bullish)
Full red → Strong Sell (all bearish)
Gray tones → Mixed
Signal Icons
▲ = Bullish
▼ = Bearish
– = Neutral
7. Table Update (Final Bar Only)
On the last bar of the chart:
Header row is drawn
All 10 rows are populated with live data
8. Summary of Features
✔ Supports 10 configurable market symbols
✔ Multi-timeframe trend evaluation
✔ Customizable MA types and lengths
✔ Automatic bull/bear alignment alerts
✔ Fully dynamic trend dashboard
✔ Professional visual formatting
✔ Optimized for speed using request.security()
✔ Easy to drop directly into TradingView
Note di rilascio
This Pine Script v5 indicator creates an optimized multi-symbol, multi-timeframe Moving Average dashboard with automatic trend alignment alerts.It displays the trend direction of up to 10 symbols across 4 timeframes, using customizable MA types (SMA/EMA/WMA/VWMA) and two MA lengths (default 89/200).
The script also generates Strong Buy / Strong Sell signals when all timeframes align.
1. Indicator Setup
indicator("Dashboard Custom MA optimized with Alerts", overlay=true)
The indicator is drawn on the chart (overlay).
All upcoming settings are grouped visually inside the settings panel.
2. User Inputs
Moving Average Settings
User chooses MA type: SMA / EMA / WMA / VWMA
User enters MA lengths (default 89 and 200)
Symbol Configuration
User chooses how many symbols to show (1 → 10)
Each symbol is selected individually (XAUUSD, XAGUSD, Oil, BTC, ETH, etc.)
Timeframe Configuration
Four timeframes: H1, H4, Daily, Weekly
Dashboard Position
User chooses vertical & horizontal placement
(top/middle/bottom + left/center/right)
3. MA Calculation Functions
getMA()
A function that returns the selected MA type:
getMA(src, len, type)
calcStatus()
Determines trend status based on price relative to both MAs:
1 → price above both MAs (bullish)
-1 → price below both MAs (bearish)
0 → price between MAs (neutral)
getSymbolStatus()
Fetches the MA trend status from a different symbol/timeframe using request.security.
4. Retrieve Trend Status for Every Symbol & Timeframe
For each symbol (1–10) and each timeframe (1–4), the script calculates:
+1 bullish
-1 bearish
0 neutral
Example:
st01_1 = getSymbolStatus(symbol 01, timeframe 1)
st01_2 = getSymbolStatus(symbol 01, timeframe 2)
st01_3 = getSymbolStatus(symbol 01, timeframe 3)
st01_4 = getSymbolStatus(symbol 01, timeframe 4)
This is repeated for up to 10 symbols.
5. Trend Alignment Check
Function:
checkAlignment(s1, s2, s3, s4)
Returns:
true if all 4 timeframes = bullish
true if all 4 timeframes = bearish
Stored as:
bullXX = Strong Buy alignment
bearXX = Strong Sell alignment
6. Alert System
Two global alerts:
🔔 alert_bull
Triggered if ANY symbol has all 4 timeframes bullish.
🔔 alert_bear
Triggered if ANY symbol has all 4 timeframes bearish.
Alert messages list all symbols matching alignment.
Example:
ĐỒNG PHA TĂNG: XAUUSD BTCUSD ETHUSD ...
Alerts fire once per bar.
7. Dashboard Table Drawing
A table is created with:
1 header row
1 row per symbol
6 columns:
Symbol name
TF1 trend
TF2 trend
TF3 trend
TF4 trend
Consensus text
Consensus:
STRONG BUY → all bullish (green)
STRONG SELL → all bearish (red)
MIXED → not fully aligned (gray)
Trend Icons
▲ for bullish
▼ for bearish
- for neutral
Row Color Logic
Entire row green → all TF bullish
Entire row red → all TF bearish
Mixed → individual cells colored
8. Table Header
Displayed on the last bar:
“Symbol”
The 4 selected timeframes
“Consensus”
9. Drawing Rows
Rows are drawn only if the symbol count includes them (1 → 10).
Each row contains:
Symbol name
Trend status on each timeframe
Strong Buy / Strong Sell / Mixed
✔ Final Summary (English)
This Pine Script indicator is a multi-timeframe MA trend dashboard with:
Features
Customizable Moving Averages (SMA/EMA/WMA/VWMA)
Two MA lengths used to classify trend direction
Up to 10 symbols
4 selectable timeframes per symbol
Colored dashboard table
Automatic Strong Buy / Strong Sell alert system
Real-time trend alignment detection
Adjustable dashboard position
Purpose
The script helps traders:
Quickly scan many markets
Identify synchronized multi-timeframe trends
Detect strong bullish/bearish momentum
Receive alerts when symbols line up in trend direction
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.