OPEN-SOURCE SCRIPT
STOC - EMA Trend Matrix + MTF Regime

STOC - EMA Trend Matrix + MTF Regime — Initial Release
STOC - EMA Trend Matrix + MTF Regime brings current-chart EMA relationships and multi-timeframe trend alignment into one dashboard.
Use it to identify bullish, bearish and mixed conditions across different trading horizons.
EMA Trend Matrix
Tracks seven EMA pairs on the current chart timeframe:
• 5 / 8
• 8 / 13
• 10 / 20
• 9 / 21
• 13 / 21
• 21 / 30
• 30 / 50
Each pair displays its EMA values and trend status. The relationship is bullish when the fast EMA is above the slow EMA, bearish when below, and neutral when equal.
Multi-Timeframe Regimes
Four predefined structures provide a broader view of trend alignment:
• Intraday: 5-minute chart — EMA 5 / 8 / 13
• Swing: 1-hour chart — EMA 9 / 14 / 21
• Positional: Daily chart — EMA 10 / 20 / 30
• Long Term: Weekly chart — EMA 30 / 50 / 200
A regime is bullish when the EMAs are ordered from fastest to slowest in descending value. The reverse arrangement is bearish. Other arrangements are neutral.
Trend Scores
The dashboard displays bullish, bearish and neutral counts, with separate net scores for the EMA Matrix and MTF Regimes.
Net Score = 100 × (Bullish Count − Bearish Count) ÷ Total Count
Scores range from −100 to +100. Positive readings indicate bullish dominance; negative readings indicate bearish dominance. Zero can represent balanced opposing votes or entirely neutral conditions.
Overall Market Bias
The overall bias uses the four MTF regimes:
• Strong Bullish: Four bullish regimes.
• Bullish: Three bullish regimes.
• Neutral / Mixed: Neither direction has three aligned regimes.
• Bearish: Three bearish regimes.
• Strong Bearish: Four bearish regimes.
Dashboard Customization
• Auto, Light and Dark themes.
• Small, Normal and Large text sizes, with Normal as default.
• Six dashboard positions.
• Optional EMA value display.
• Dashboard visibility toggle.
Usage Notes
The indicator provides trend context and alignment—not standalone entry or exit signals. Scores measure EMA agreement, not trend magnitude or the probability of a profitable trade.
Values update live and may change until their respective timeframe candles close. Requests below the chart timeframe sample lower-timeframe data rather than summarize every intrabar.
For educational and analytical purposes only. No indicator guarantees future performance.
STOC - EMA Trend Matrix + MTF Regime brings current-chart EMA relationships and multi-timeframe trend alignment into one dashboard.
Use it to identify bullish, bearish and mixed conditions across different trading horizons.
EMA Trend Matrix
Tracks seven EMA pairs on the current chart timeframe:
• 5 / 8
• 8 / 13
• 10 / 20
• 9 / 21
• 13 / 21
• 21 / 30
• 30 / 50
Each pair displays its EMA values and trend status. The relationship is bullish when the fast EMA is above the slow EMA, bearish when below, and neutral when equal.
Multi-Timeframe Regimes
Four predefined structures provide a broader view of trend alignment:
• Intraday: 5-minute chart — EMA 5 / 8 / 13
• Swing: 1-hour chart — EMA 9 / 14 / 21
• Positional: Daily chart — EMA 10 / 20 / 30
• Long Term: Weekly chart — EMA 30 / 50 / 200
A regime is bullish when the EMAs are ordered from fastest to slowest in descending value. The reverse arrangement is bearish. Other arrangements are neutral.
Trend Scores
The dashboard displays bullish, bearish and neutral counts, with separate net scores for the EMA Matrix and MTF Regimes.
Net Score = 100 × (Bullish Count − Bearish Count) ÷ Total Count
Scores range from −100 to +100. Positive readings indicate bullish dominance; negative readings indicate bearish dominance. Zero can represent balanced opposing votes or entirely neutral conditions.
Overall Market Bias
The overall bias uses the four MTF regimes:
• Strong Bullish: Four bullish regimes.
• Bullish: Three bullish regimes.
• Neutral / Mixed: Neither direction has three aligned regimes.
• Bearish: Three bearish regimes.
• Strong Bearish: Four bearish regimes.
Dashboard Customization
• Auto, Light and Dark themes.
• Small, Normal and Large text sizes, with Normal as default.
• Six dashboard positions.
• Optional EMA value display.
• Dashboard visibility toggle.
Usage Notes
The indicator provides trend context and alignment—not standalone entry or exit signals. Scores measure EMA agreement, not trend magnitude or the probability of a profitable trade.
Values update live and may change until their respective timeframe candles close. Requests below the chart timeframe sample lower-timeframe data rather than summarize every intrabar.
For educational and analytical purposes only. No indicator guarantees future 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.
Building STOC: Systematic and Rule Based Trading - Crypto, Commodities, India & Global Investments.
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.
Building STOC: Systematic and Rule Based Trading - Crypto, Commodities, India & Global Investments.
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.