OPEN-SOURCE SCRIPT
Atualizado

Multi-Timeframe MACD with Color Mix (Nikko)

536
Multi-Timeframe MACD with Color Mix (Nikko) Indicator
This documentation explains the benefits of the "Multi-Timeframe MACD with Color Mix (Nikko)" indicator for traders and provides easy-to-follow steps on how to use it. Written as of 05:06 AM +07 on Saturday, October 04, 2025, this guide focuses on helping you, as a trader, get the most out of this tool with clear, practical advice before diving into the technical details.
Benefits for Traders

1. Multi-Timeframe Insight
This indicator lets you see momentum trends across 15-minute, 1-hour, 1-day, and 1-week timeframes all on one chart. This big-picture view helps you catch both quick market moves and long-term trends without flipping between charts, saving you time and giving you a fuller understanding of the market.

2. Visual Momentum Representation
The background changes from red to green based on short-term (15m) momentum, giving you a quick, easy-to-see signal—red means bearish (prices might drop), and green means bullish (prices might rise). The histogram uses a mix of red, green, and blue colors to show the combined strength of the 1-hour, 1-day, and 1-week timeframes, helping you spot strong trends at a glance (e.g., a bright mix for strong momentum, darker for weaker).

3. Enhanced Decision-Making
The background and histogram colors work together to confirm trends across different timeframes, making it less likely you’ll act on a false signal. This helps you feel more confident when deciding when to buy, sell, or hold.

4. Proactive Alert System
You can set alerts to notify you when the percentage of bullish timeframes hits your chosen levels (e.g., below 10% for bearish, above 90% for bullish). This keeps you in the loop on big momentum shifts without needing to watch the chart all day—perfect for when you’re busy.

5. Flexibility and Efficiency
You can turn timeframes on or off, adjust settings like speed of the moving averages, and tweak transparency to fit your trading style—whether you’re a fast scalper or a patient swing trader. Everything is shown on one chart, saving you effort, and the colors make it simple to read, even if you’re new to trading.
How to Use It
Getting Started

Add the Indicator: Load the "Multi-Timeframe MACD with Color Mix (Nikko)" onto your TradingView chart using the Pine Script editor or indicator library.
Pick Your Timeframes: Turn on the timeframes that match your trading—use 15m and 1h for quick trades, or 1d and 1w for longer holds—using the enable_15m, enable_1h, enable_1d, enable_1w, and enable_background options.

Reading the Colors

Background Gradient: Watch for red to signal bearish 15m momentum and green for bullish momentum. Adjust the Background_transparency (default 75%, or 25% opacity) if the chart feels too busy—try lowering it to 50 for clearer candlesticks in fast markets.
Histogram and EMA Colors:

The histogram and its Exponential Moving Average (EMA) line show a mix of red (1-week), green (1-day), and blue (1-hour) based on how strong the momentum is in each timeframe.
Brighter colors mean stronger momentum—white (all bright) shows all timeframes are pushing up hard, while darker shades (like gray or black) mean weaker or mixed momentum.
Turn off a timeframe (e.g., enable_1h = false) to see how it changes the color mix and focus on what matters to you.



Setting Alerts

Set Your Levels: Choose a threshold_low (default 10%) and threshold_high (default 90%) based on your comfort zone or past market patterns to catch big turns.
Get Notifications: Use TradingView alerts to get pings when the market hits your set levels, so you can act without staring at the screen.

Practical Tips

Pair with Other Tools: Use it with support/resistance lines or the RSI to double-check your moves and build a solid plan.
Tweak Settings: Adjust fast_length, slow_length, and signal_smoothing to match your asset’s speed, and bump up the lookback (default 50) for steadier trends in wild markets.
Practice First: Test different timeframe combos on a demo account to find what works best for you.

Understanding the Colors (Simple Explanation)
How Colors Work
The histogram and its EMA line use a color mix based on a simple idea from color theory, like mixing paints with red, green, and blue (RGB):

Red comes from the 1-week timeframe, green from 1-day, and blue from 1-hour.
When all three timeframes show strong upward momentum, they blend into bright white—the brightest color, like a super-bright light telling you the market’s roaring up.
If some timeframes are weak or pulling down, the mix gets darker (like gray or black), warning you the momentum might not be solid.

Brighter is Better

Bright Colors = Strong Opportunity: The brighter the histogram and EMA (closer to white), the more all your chosen timeframes are in agreement that prices are rising. This is your signal to think about buying or holding, as it points to a powerful trend you can ride.
Dark Colors = Caution: A darker mix (toward black) means some timeframes are lagging or bearish, suggesting you might wait or consider selling. It’s like a dim light saying, “Hold on, check again.”
Benefit in Practice: Watching the brightness helps you jump on the best trades fast. For example, a bright white histogram on a green background is like a green traffic light—go for it! A dark gray on red is like a red light—pause and rethink. This quick color check can save you from bad moves and boost your profits when the trend is strong.

Why It Helps
These colors are your fast friend in trading. A bright histogram means all your timeframes are cheering for an uptrend, giving you the confidence to act. A dull one tells you to be careful, helping you avoid traps. It’s like having a color-coded guide to pick the hottest market moments!
Technical Details
Input Parameters

Fast Length (default: 12): Short-term moving average speed.
Slow Length (default: 26): Long-term moving average speed.
Source (default: close): Price data used.
Signal Smoothing (default: 9): Smooths the signal line.
MA Type (default: EMA): Choose EMA or SMA.

Timeframe and Scaling

Timeframes: 15m, 1h, 1d, 1w, with on/off switches.
Lookback Period (default: 50): Sets the data window for trends.
Background Transparency (default: 75%): Controls background see-through level.

MACD Calculation

Per Timeframe: Uses request.security():

MACD Line: ta.ema(src, fast_length) - ta.ema(src, slow_length).
Signal Line: ta.ema(MACD, signal_length).
Histogram: (macd - signal) / 3.0.



Background Gradient

15m Normalization: norm_value = (hist_15m - hist_15m_min) / max(hist_15m_range, 1e-10), limited to 0-1.
RGB Mix: Red drops from 255 to 0, green rises from 0 to 255, blue stays 0.
Apply: color.new(color.rgb(r_val, g_val, b_val), Background_transparency).

Histogram and EMA Colors

Color Assignment:

1h: Blue (#0000FF) if hist_1h >= 0, else black.
1d: Green (#00FF00) if hist_1d >= 0, else black.
1w: Red (#FF0000) if hist_1w >= 0, else black.


Final Color: final_color = color.rgb(min(r, 255), min(g, 255), min(b, 255)).
Plotting: Histogram and EMA use final_color; MACD (#2962FF), signal (#FF6D00).

Alerts

Bullish Percentage: bullish_pct = (bullish_count / bullish_total) * 100, counting hist >= 0.
Triggers: Below threshold_low or above threshold_high.

--------------------------------------------------------------------
Conclusion
The "Multi-Timeframe MACD with Color Mix (Nikko)" is your all-in-one tool to spot trends, confirm moves, and trade smarter with its bright, easy-to-read colors. By using it wisely, you can sharpen your market edge and trade with more confidence.

This README is tailored for traders and reflects the indicator's practical value as of 05:06 AM +07 on October 04, 2025.
Notas de Lançamento
Update Description

In the previous version, the script used binary color logic for each histogram (hist_1h, hist_1d, hist_1w).
That meant the color was either fully ON (blue/green/red) if the value was ≥ 0, or OFF (black) if the value was < 0.
This produced a hard switch between colors, with no smooth progression relative to the histogram’s strength.

What’s New in This Update

✅ Gradient Coloring:
Each histogram now uses a progressive gradient instead of a binary color.

For example, the 1h histogram (hist_1h) now uses a blue gradient (#0000FF) that increases in intensity as hist_1h rises from 0 up to its maximum observed value.

Similarly, the 1d histogram (hist_1d) scales in green, and the 1w histogram (hist_1w) scales in red.

✅ Dynamic Scaling:
The script automatically detects the highest value seen so far for each histogram and normalizes the current histogram against that maximum. This ensures the gradient always reflects relative strength in the current chart context.

✅ Better Visual Feedback:
Instead of “just on or off,” traders can now visually measure how strong or weak the momentum is directly from the color intensity.

Why This is Useful

Traders can instantly assess momentum strength across different timeframes by simply looking at color intensity.

Stronger histogram values → brighter color, weaker values → darker color.

This makes it easier to spot trend acceleration or weakening momentum without needing to read exact values.

Example

If hist_1h is small but positive → color is dark blue.

If hist_1h grows larger → color becomes bright blue, signaling stronger momentum.

If hist_1h goes negative → color turns black, showing weakness.
Notas de Lançamento
- Fixed the alert system.
- Display alerts visually on the main chart with tiny bubbles.
Notas de Lançamento
Many Bug Fixes and Improvements:

First, my apologies — the latest version was mistakenly published as an overlay. This has now been corrected.

Added an overlay for the buy/sell signals, colored according to the multi-timeframe EMA, with a distance from the chart to prevent overlap.

Removed the clamp on positive values only. While it was a test, I now prefer the classic MACD display. For convenience, values are clamped between -100 and +100. Normal MACD values vary widely across assets, but I like a clear range from -100 to 100.

Added customization options for all new parameters.
Notas de Lançamento
Updated the default offset that was 10.5 by error to the normal value 1.5, sorry about that.
Notas de Lançamento
Lot of updates in this script.
The biggest change is the buy boxes, which are now tied specifically to EMA crosses above the average.
A new buy signal has been added so you can test entries, while exits can be managed manually.
These green boxes have shown a high success rate in past signals.
The gain % is also displayed in the center of the box.
You can enable or disable them anytime from the options menu.
Notas de Lançamento
Added a lot of new functionalities:

  • Background is now set to false by default for better visualization, but you can enable it again in the settings.
  • Optional trendlines (© Zeiierman) have been added — fully toggleable in the settings.
  • Each trend box now shows % gain or loss, both on the overlay and in the main panel.
  • Trend boxes are colored green/red to reflect gain or loss.

Overall, this is now a very powerful indicator that I use every day. I plan to make a detailed video explaining how it works, but currently I have a microphone issue with Chrome. Once fixed, I will stream a full walkthrough.

Basic usage: By analyzing multiple timeframes simultaneously, the script can give buy suggestions when multiple MACD indicators are bullish. When combined with the EMA, it can also identify strong entry and exit points — though manual confirmation is still recommended.

By observing the color of all timeframes, yellow indicates extremely bullish conditions on both the EMA line and the histogram.

I integrated the excellent work of © Zeiierman into the script to help distinguish between a real bullish move and a consolidation phase.

All together, this provides solid entries with a low failure rate.

Note on © Zeiierman: I provide full attribution and the source of the script. It is disabled by default, but you can enable it in the settings. If there are any concerns, I can remove it to remain compliant with the Attribution-NonCommercial-ShareAlike license if I missunderstood it.
Notas de Lançamento
Added a threshold adjustment for exit conditions, allowing you to fine-tune the EMA exit point above or below the zero midpoint.
This helps optimize profit box calculations and prevents trades from closing automatically right at the zero line.

For example:

Setting the threshold to -20 will trigger an exit when the EMA (scaled 0–100) drops to +20, closing earlier and securing more profit.

Setting it to +30 will delay the exit until the EMA falls 30 points below zero, allowing trades to run longer before closing.

This feature gives you more control over trade timing and box accuracy.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.