OPEN-SOURCE SCRIPT
MTF Multi EMA - Intraday

MTF Multi EMA – Intraday
Purpose:
To quickly analyze trend direction and alignment across multiple timeframes (1m, 3m, 5m, 15m, 30m, and 60m) using fast and slow EMAs for each timeframe — and combine them into a simple “stack score” for easy visual decision-making. The script is tuned for Intraday Trading indicator by default.
Concept
Each timeframe (TF) — like 1m, 3m, 5m, etc. — has two EMAs:
A fast EMA (shorter length)
A slow EMA (longer length)
When the fast EMA > slow EMA, that timeframe is bullish.
When the fast EMA < slow EMA, that timeframe is bearish.
By combining multiple timeframes together, the indicator helps you:
Identify when all trends align bullishly (strong buy bias)
Identify when all trends align bearishly (strong sell bias)
Stay out during mixed or sideways phases
Inputs Explained
Setting Description
1m / 3m / 5m / 15m / 30m / 60m EMA Lengths Controls the EMA period for each timeframe’s fast and slow EMAs.
Fast EMA Color Color for all fast EMAs plotted on chart.
Slow EMA Color Color for all slow EMAs plotted on chart.
Use Smooth Interpolation Ensures smoother plots when merging higher TF data into a smaller chart (recommended ON).
Show [Timeframe] Toggle visibility of each timeframe’s EMAs.
Table Position Lets you move the mini dashboard to any chart corner.
Stack Score
The Stack Score measures how many timeframes are bullish vs bearish:
Stack Score Meaning
+6 All timeframes bullish → Strong Uptrend
+3 to +5 Majority bullish → Bullish Bias
0 Neutral / Mixed → Sideways Market
−3 to −5 Majority bearish → Bearish Bias
−6 All timeframes bearish → Strong Downtrend
Table Display
At the chosen chart corner, you’ll see:
TF Direction
1m 🟢 B (Bullish) / 🔴 S (Bearish)
3m 🟢 B (Bullish) / 🔴 S (Bearish)
5m 🟢 B (Bullish) / 🔴 S (Bearish)
15m 🟢 B (Bullish) / 🔴 S (Bearish)
30m 🟢 B (Bullish) / 🔴 S (Bearish)
60m 🟢 B (Bullish) / 🔴 S (Bearish)
Score Final alignment score (color-coded)
Color meanings:
🟢 Green cell = bullish for that TF
🔴 Red cell = bearish for that TF
The Score cell background color changes with strength:
Bright green → strong bull
Yellow → neutral
Red / Maroon → strong bear
How to Use for Trading (Intraday NIFTY 5m)
Recommended Chart: 5-minute timeframe on NIFTY Futures or major index stocks.
🔹 1. Identify Trend Alignment
When Score ≥ +3 → Market bias is bullish.
→ Look for long entries (buy breakouts or EMA retests).
When Score ≤ −3 → Market bias is bearish.
→ Look for short entries (sell breakdowns or retests).
When Score is between −2 and +2 → Trend is mixed.
→ Best to wait — avoid trading in choppy conditions.
🔹 2. Combine with Price Action
Use it with:
Trendline breaks or retests
Candle confirmation (e.g. bullish engulfing or rejection)
Volume surge
Example:
On NIFTY 5m — if score = +5, price breaks above a descending trendline, and 1m–15m EMAs are all rising → strong long signal.
🔹 3. Avoid Conflicts
If lower timeframes (1m/3m/5m) are bullish but higher ones (30m/60m) are bearish,
→ Trend is short-term bullish but larger bias is down — scalps only, not swings.
Optional Alerts
If you add alert conditions (as suggested earlier):
“Strong Bullish Alignment” triggers when score ≥ +5
“Strong Bearish Alignment” triggers when score ≤ −5
This gives you early alerts when full trend alignment occurs — ideal for breakout setups.
Some more Tips
Use 5m or 15m chart as your main view.
Use Stack Score as a trend filter — trade with it, not against it.
Combine with Breakout + Retest strategy or Trendline color-coded system you’re building.
In sideways days (score near 0), reduce risk or skip trades.
Purpose:
To quickly analyze trend direction and alignment across multiple timeframes (1m, 3m, 5m, 15m, 30m, and 60m) using fast and slow EMAs for each timeframe — and combine them into a simple “stack score” for easy visual decision-making. The script is tuned for Intraday Trading indicator by default.
Concept
Each timeframe (TF) — like 1m, 3m, 5m, etc. — has two EMAs:
A fast EMA (shorter length)
A slow EMA (longer length)
When the fast EMA > slow EMA, that timeframe is bullish.
When the fast EMA < slow EMA, that timeframe is bearish.
By combining multiple timeframes together, the indicator helps you:
Identify when all trends align bullishly (strong buy bias)
Identify when all trends align bearishly (strong sell bias)
Stay out during mixed or sideways phases
Inputs Explained
Setting Description
1m / 3m / 5m / 15m / 30m / 60m EMA Lengths Controls the EMA period for each timeframe’s fast and slow EMAs.
Fast EMA Color Color for all fast EMAs plotted on chart.
Slow EMA Color Color for all slow EMAs plotted on chart.
Use Smooth Interpolation Ensures smoother plots when merging higher TF data into a smaller chart (recommended ON).
Show [Timeframe] Toggle visibility of each timeframe’s EMAs.
Table Position Lets you move the mini dashboard to any chart corner.
Stack Score
The Stack Score measures how many timeframes are bullish vs bearish:
Stack Score Meaning
+6 All timeframes bullish → Strong Uptrend
+3 to +5 Majority bullish → Bullish Bias
0 Neutral / Mixed → Sideways Market
−3 to −5 Majority bearish → Bearish Bias
−6 All timeframes bearish → Strong Downtrend
Table Display
At the chosen chart corner, you’ll see:
TF Direction
1m 🟢 B (Bullish) / 🔴 S (Bearish)
3m 🟢 B (Bullish) / 🔴 S (Bearish)
5m 🟢 B (Bullish) / 🔴 S (Bearish)
15m 🟢 B (Bullish) / 🔴 S (Bearish)
30m 🟢 B (Bullish) / 🔴 S (Bearish)
60m 🟢 B (Bullish) / 🔴 S (Bearish)
Score Final alignment score (color-coded)
Color meanings:
🟢 Green cell = bullish for that TF
🔴 Red cell = bearish for that TF
The Score cell background color changes with strength:
Bright green → strong bull
Yellow → neutral
Red / Maroon → strong bear
How to Use for Trading (Intraday NIFTY 5m)
Recommended Chart: 5-minute timeframe on NIFTY Futures or major index stocks.
🔹 1. Identify Trend Alignment
When Score ≥ +3 → Market bias is bullish.
→ Look for long entries (buy breakouts or EMA retests).
When Score ≤ −3 → Market bias is bearish.
→ Look for short entries (sell breakdowns or retests).
When Score is between −2 and +2 → Trend is mixed.
→ Best to wait — avoid trading in choppy conditions.
🔹 2. Combine with Price Action
Use it with:
Trendline breaks or retests
Candle confirmation (e.g. bullish engulfing or rejection)
Volume surge
Example:
On NIFTY 5m — if score = +5, price breaks above a descending trendline, and 1m–15m EMAs are all rising → strong long signal.
🔹 3. Avoid Conflicts
If lower timeframes (1m/3m/5m) are bullish but higher ones (30m/60m) are bearish,
→ Trend is short-term bullish but larger bias is down — scalps only, not swings.
Optional Alerts
If you add alert conditions (as suggested earlier):
“Strong Bullish Alignment” triggers when score ≥ +5
“Strong Bearish Alignment” triggers when score ≤ −5
This gives you early alerts when full trend alignment occurs — ideal for breakout setups.
Some more Tips
Use 5m or 15m chart as your main view.
Use Stack Score as a trend filter — trade with it, not against it.
Combine with Breakout + Retest strategy or Trendline color-coded system you’re building.
In sideways days (score near 0), reduce risk or skip trades.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.