OPEN-SOURCE SCRIPT
Updated Clouds and Diamonds

════════════════════════════════════════════════════════════════════════════════
CLOUDS AND DIAMONDS INDICATOR
════════════════════════════════════════════════════════════════════════════════
OVERVIEW
--------
A visual trend analysis tool displaying four moving average "clouds" on your
chart, each representing a different time horizon. Helps identify trend
direction and current trend state at a glance.
THE CLOUDS
----------
Each cloud is formed by the space between an EMA and SMA of the same period.
Color-coded by "metal" for quick timeframe identification:
Cloud | Default | Color | Purpose
------------|---------|--------|----------------------
Period 1 | 21 | Pink | Short-term trends
Period 2 | 50 | Bronze | Medium-term trends
Period 3 | 100 | Silver | Longer-term trends
Period 4 | 200 | Gold | Major long-term trends
Cloud border colors indicate trend direction:
- Green border = Bullish (EMA above SMA)
- Red border = Bearish (EMA below SMA)
THE SIGNALS
-----------
At the end of the chart, each cloud displays its current trend state:
Signal | Shape | Meaning
----------|-------|----------------------------------------
Diamond | * | Currently bullish (EMA above SMA)
X-Cross | X | Currently bearish (EMA below SMA)
Note: Markers appear only on the last bar, providing a clean summary of current
trend conditions across all timeframes. Signal sizes increase with period
length — larger signals represent longer-term trends.
HOW TO USE IT
-------------
1. Identify the trend — Look at cloud border colors. Multiple green = strong
uptrend; multiple red = downtrend.
2. Check the end-of-chart signals — Diamonds = bullish, X = bearish. Multiple
diamonds across timeframes = strong bullish alignment.
3. Weigh by timeframe — A diamond on Gold (200) carries more weight than
Pink (21). Look for multi-timeframe confirmation.
4. Gauge trend strength — Price above all clouds = strong trend. Clouds
converging or price entering them = momentum slowing.
QUICK REFERENCE
---------------
Green cloud borders Bullish trend for that timeframe
Red cloud borders Bearish trend for that timeframe
Diamond (at end) Currently bullish
X-Cross (at end) Currently bearish
Larger marker Longer-term timeframe
All diamonds Strong bullish alignment
All X-crosses Strong bearish alignment
Mixed signals Consolidation or transition
════════════════════════════════════════════════════════════════════════════════
CLOUDS AND DIAMONDS INDICATOR
════════════════════════════════════════════════════════════════════════════════
OVERVIEW
--------
A visual trend analysis tool displaying four moving average "clouds" on your
chart, each representing a different time horizon. Helps identify trend
direction and current trend state at a glance.
THE CLOUDS
----------
Each cloud is formed by the space between an EMA and SMA of the same period.
Color-coded by "metal" for quick timeframe identification:
Cloud | Default | Color | Purpose
------------|---------|--------|----------------------
Period 1 | 21 | Pink | Short-term trends
Period 2 | 50 | Bronze | Medium-term trends
Period 3 | 100 | Silver | Longer-term trends
Period 4 | 200 | Gold | Major long-term trends
Cloud border colors indicate trend direction:
- Green border = Bullish (EMA above SMA)
- Red border = Bearish (EMA below SMA)
THE SIGNALS
-----------
At the end of the chart, each cloud displays its current trend state:
Signal | Shape | Meaning
----------|-------|----------------------------------------
Diamond | * | Currently bullish (EMA above SMA)
X-Cross | X | Currently bearish (EMA below SMA)
Note: Markers appear only on the last bar, providing a clean summary of current
trend conditions across all timeframes. Signal sizes increase with period
length — larger signals represent longer-term trends.
HOW TO USE IT
-------------
1. Identify the trend — Look at cloud border colors. Multiple green = strong
uptrend; multiple red = downtrend.
2. Check the end-of-chart signals — Diamonds = bullish, X = bearish. Multiple
diamonds across timeframes = strong bullish alignment.
3. Weigh by timeframe — A diamond on Gold (200) carries more weight than
Pink (21). Look for multi-timeframe confirmation.
4. Gauge trend strength — Price above all clouds = strong trend. Clouds
converging or price entering them = momentum slowing.
QUICK REFERENCE
---------------
Green cloud borders Bullish trend for that timeframe
Red cloud borders Bearish trend for that timeframe
Diamond (at end) Currently bullish
X-Cross (at end) Currently bearish
Larger marker Longer-term timeframe
All diamonds Strong bullish alignment
All X-crosses Strong bearish alignment
Mixed signals Consolidation or transition
════════════════════════════════════════════════════════════════════════════════
Release Notes
Added option to move diamonds to the actual crossover bar.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.