OPEN-SOURCE SCRIPT
Roy Gravity Matrix AI V2

ROY GRAVITY MATRIX AI V2
Roy Gravity Matrix AI V2 is an advanced adaptive multi-timeframe trading engine designed to analyze market gravity, trend structure, momentum transition, and EMA alignment using a mathematical matrix-based system.
This indicator combines:
• Multi-Timeframe EMA Analysis
• Adaptive Main Timeframe Logic
• Trend Gravity Detection
• Momentum Transition Matrix
• EMA Cross Heat Alerts
• AI Market Phase Detection
• Mathematical Trend Scoring
into a single smart trading dashboard optimized for both desktop and mobile TradingView users.
━━━━━━━━━━━━━━━━━━
CORE CONCEPT
━━━━━━━━━━━━━━━━━━
Roy Gravity Matrix AI V2 is built around the concept that:
“Higher timeframe trend acts like gravity and influences lower timeframe movement.”
Higher timeframe structure such as H4 and Daily carries stronger influence over lower timeframes like M1 and M5.
The indicator transforms bullish and bearish market conditions into weighted mathematical scores to help traders identify:
• Dominant Trend Direction
• Pullbacks Against Trend
• Momentum Expansion
• Market Transition
• Early Reversal Pressure
• Smart Entry Timing
━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━
• Adaptive Main Timeframe System
• EMA 10 / 20 / 50 / 100 / 200 Matrix
• Multi-Timeframe Heatmap
• Gravity Trend Engine
• AI Trend Score
• AI Confidence Level
• Market Phase Detection
• Smart Buy & Sell Signals
• EMA Cross Heat Alert System
• Momentum Transition Detection
• Mobile-Friendly Dashboard
━━━━━━━━━━━━━━━━━━
EMA CROSS HEAT ALERT SYSTEM
━━━━━━━━━━━━━━━━━━
The indicator introduces a dynamic EMA Cross Heat Alert system directly inside the matrix.
Each EMA box can change color individually when fresh EMA cross momentum occurs.
COLORS:
🟩 Green
= Normal Bullish Condition
🟥 Red
= Normal Bearish Condition
🟨 Yellow
= Fresh Bullish EMA Cross
🟧 Orange
= Fresh Bearish EMA Cross
This allows traders to instantly detect:
• Fresh momentum shifts
• New bullish expansion
• New bearish expansion
• EMA transition zones
• Early reversal signals
without cluttering the chart with excessive labels.
━━━━━━━━━━━━━━━━━━
ADAPTIVE MAIN TIMEFRAME
━━━━━━━━━━━━━━━━━━
Users can select their preferred trading timeframe:
• M1
• M5
• M15
• M30
• H1
• H4
• Daily
The AI engine automatically adjusts:
• Gravity Timeframes
• Momentum Structure
• Trigger Logic
• Signal Timing
based on the selected trading style.
Example:
If Main TF = M15:
• Gravity = H1 + H4
• Momentum = M15
• Trigger = M5 + M1
If Main TF = H1:
• Gravity = H4 + Daily
• Momentum = H1
• Trigger = M15 + M30
━━━━━━━━━━━━━━━━━━
MARKET PHASES
━━━━━━━━━━━━━━━━━━
BULL EXP
= Strong bullish expansion
BULL PULL
= Bullish pullback inside bullish gravity
BEAR EXP
= Strong bearish expansion
BEAR PULL
= Bearish pullback inside bearish gravity
MIXED
= Mixed or conflicting market structure
━━━━━━━━━━━━━━━━━━
HOW TO READ THE MATRIX
━━━━━━━━━━━━━━━━━━
The matrix displays EMA structure across multiple timeframes.
Each row represents timeframe.
Each column represents EMA level.
• EMA10 = Fast Momentum
• EMA20 = Short Momentum
• EMA50 = Medium Trend
• EMA100 = Strong Trend Structure
• EMA200 = Institutional Trend
━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━
BUY SETUP
Look for:
• Score positive
• Bias bullish
• Gravity aligned bullish
• Main timeframe bullish
• Multiple yellow boxes appearing from lower TF upward
This often indicates momentum expansion is spreading upward.
━━━━━━━━━━━━━━━━━━
SELL SETUP
Look for:
• Score negative
• Bias bearish
• Gravity aligned bearish
• Main timeframe bearish
• Multiple orange boxes appearing from lower TF upward
This often indicates bearish pressure spreading downward.
━━━━━━━━━━━━━━━━━━
MOMENTUM TRANSITION CONCEPT
━━━━━━━━━━━━━━━━━━
One of the most powerful concepts in this indicator is momentum spreading.
Example:
M1 yellow → M5 yellow → M15 yellow
This may indicate bullish momentum is expanding through multiple timeframes.
The same concept applies for bearish momentum using orange heat boxes.
━━━━━━━━━━━━━━━━━━
BEST USED FOR
━━━━━━━━━━━━━━━━━━
• Scalping
• Intraday Trading
• Swing Trading
• Trend Following
• Momentum Trading
• Gold (XAUUSD)
• Forex
• Crypto
• Indices
━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━
This indicator is designed as a trend and momentum analysis engine.
It should be used together with:
• Market structure
• Support & resistance
• Risk management
• Proper trade confirmation
for best trading performance.
Roy Gravity Matrix AI V2 is an advanced adaptive multi-timeframe trading engine designed to analyze market gravity, trend structure, momentum transition, and EMA alignment using a mathematical matrix-based system.
This indicator combines:
• Multi-Timeframe EMA Analysis
• Adaptive Main Timeframe Logic
• Trend Gravity Detection
• Momentum Transition Matrix
• EMA Cross Heat Alerts
• AI Market Phase Detection
• Mathematical Trend Scoring
into a single smart trading dashboard optimized for both desktop and mobile TradingView users.
━━━━━━━━━━━━━━━━━━
CORE CONCEPT
━━━━━━━━━━━━━━━━━━
Roy Gravity Matrix AI V2 is built around the concept that:
“Higher timeframe trend acts like gravity and influences lower timeframe movement.”
Higher timeframe structure such as H4 and Daily carries stronger influence over lower timeframes like M1 and M5.
The indicator transforms bullish and bearish market conditions into weighted mathematical scores to help traders identify:
• Dominant Trend Direction
• Pullbacks Against Trend
• Momentum Expansion
• Market Transition
• Early Reversal Pressure
• Smart Entry Timing
━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━
• Adaptive Main Timeframe System
• EMA 10 / 20 / 50 / 100 / 200 Matrix
• Multi-Timeframe Heatmap
• Gravity Trend Engine
• AI Trend Score
• AI Confidence Level
• Market Phase Detection
• Smart Buy & Sell Signals
• EMA Cross Heat Alert System
• Momentum Transition Detection
• Mobile-Friendly Dashboard
━━━━━━━━━━━━━━━━━━
EMA CROSS HEAT ALERT SYSTEM
━━━━━━━━━━━━━━━━━━
The indicator introduces a dynamic EMA Cross Heat Alert system directly inside the matrix.
Each EMA box can change color individually when fresh EMA cross momentum occurs.
COLORS:
🟩 Green
= Normal Bullish Condition
🟥 Red
= Normal Bearish Condition
🟨 Yellow
= Fresh Bullish EMA Cross
🟧 Orange
= Fresh Bearish EMA Cross
This allows traders to instantly detect:
• Fresh momentum shifts
• New bullish expansion
• New bearish expansion
• EMA transition zones
• Early reversal signals
without cluttering the chart with excessive labels.
━━━━━━━━━━━━━━━━━━
ADAPTIVE MAIN TIMEFRAME
━━━━━━━━━━━━━━━━━━
Users can select their preferred trading timeframe:
• M1
• M5
• M15
• M30
• H1
• H4
• Daily
The AI engine automatically adjusts:
• Gravity Timeframes
• Momentum Structure
• Trigger Logic
• Signal Timing
based on the selected trading style.
Example:
If Main TF = M15:
• Gravity = H1 + H4
• Momentum = M15
• Trigger = M5 + M1
If Main TF = H1:
• Gravity = H4 + Daily
• Momentum = H1
• Trigger = M15 + M30
━━━━━━━━━━━━━━━━━━
MARKET PHASES
━━━━━━━━━━━━━━━━━━
BULL EXP
= Strong bullish expansion
BULL PULL
= Bullish pullback inside bullish gravity
BEAR EXP
= Strong bearish expansion
BEAR PULL
= Bearish pullback inside bearish gravity
MIXED
= Mixed or conflicting market structure
━━━━━━━━━━━━━━━━━━
HOW TO READ THE MATRIX
━━━━━━━━━━━━━━━━━━
The matrix displays EMA structure across multiple timeframes.
Each row represents timeframe.
Each column represents EMA level.
• EMA10 = Fast Momentum
• EMA20 = Short Momentum
• EMA50 = Medium Trend
• EMA100 = Strong Trend Structure
• EMA200 = Institutional Trend
━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━
BUY SETUP
Look for:
• Score positive
• Bias bullish
• Gravity aligned bullish
• Main timeframe bullish
• Multiple yellow boxes appearing from lower TF upward
This often indicates momentum expansion is spreading upward.
━━━━━━━━━━━━━━━━━━
SELL SETUP
Look for:
• Score negative
• Bias bearish
• Gravity aligned bearish
• Main timeframe bearish
• Multiple orange boxes appearing from lower TF upward
This often indicates bearish pressure spreading downward.
━━━━━━━━━━━━━━━━━━
MOMENTUM TRANSITION CONCEPT
━━━━━━━━━━━━━━━━━━
One of the most powerful concepts in this indicator is momentum spreading.
Example:
M1 yellow → M5 yellow → M15 yellow
This may indicate bullish momentum is expanding through multiple timeframes.
The same concept applies for bearish momentum using orange heat boxes.
━━━━━━━━━━━━━━━━━━
BEST USED FOR
━━━━━━━━━━━━━━━━━━
• Scalping
• Intraday Trading
• Swing Trading
• Trend Following
• Momentum Trading
• Gold (XAUUSD)
• Forex
• Crypto
• Indices
━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━
This indicator is designed as a trend and momentum analysis engine.
It should be used together with:
• Market structure
• Support & resistance
• Risk management
• Proper trade confirmation
for best trading performance.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
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 open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.