OPEN-SOURCE SCRIPT
מעודכן 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
════════════════════════════════════════════════════════════════════════════════
הערות שחרור
Added option to move diamonds to the actual crossover bar.הערות שחרור
Tweak the colors.הערות שחרור
Add an optional Status Tableסקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.