Trend and Volatility Cloud

Trend and Volatility Cloud

Expanded Cloud (by LuxAlgo) wraps a classic Highest/Lowest channel with two “adaptive” bounds that expand/contract based on recent range dynamics. It highlights the active trend regime (bullish/bearish), paints a context cloud, and plots the relevant expanded boundary so you can filter trades, trail stops, and time continuations or regime flips with less noise.

What is the Expanded Cloud?

The Expanded Cloud is a dynamic envelope built on top of a rolling Highest/Lowest channel. Two internally computed lines — Expanded Upper (maxExp) and Expanded Lower (minExp) — react to changes in the channel with a configurable reactivity. The indicator shades the relevant side of price according to trend regime:

  • Uptrend: the lower cloud (between minExp and lower) is filled.
  • Downtrend: the upper cloud (between upper and maxExp) is filled.

This structure provides at-a-glance regime identification, adaptive support/resistance, and practical anchor levels for risk management.

How it works

  1. Rolling Channel
    The base channel is computed over lengthInput periods on a chosen source:

    • upper = HIGHEST[length](source)
    • lower = LOWEST[length](source)
  2. Expanded Bounds (adaptive lines)
    Two stateful series evolve with the channel:

    • maxExp reacts to rises in upper and is dampened by falls in lower scaled by reactivity.
    • minExp reacts to falls in lower and is dampened by rises in upper scaled by reactivity.

    Intuition: as the channel stretches in one direction, the corresponding expanded bound follows, while opposing moves are partially absorbed according to reactivity (0–100%).

  3. Trend Detection (regime flips)
    • Flip to bullish (trend = 1) when minExp detaches from lower after having been aligned with it.
    • Flip to bearish (trend = -1) when maxExp detaches from upper after previous alignment.
    • Otherwise, the last regime persists.
  4. Visual Logic (cloud + lines)
    • In uptrends: the lower cloud is shaded; the Expanded Upper line is emphasized.
    • In downtrends: the upper cloud is shaded; the Expanded Lower line is emphasized.

Inputs & configuration

  • lengthInput (default: 20)
    Lookback for the Highest/Lowest channel.

    • Shorter ⇒ more responsive channel, tighter clouds, more flips.
    • Longer ⇒ smoother channel, wider clouds, fewer flips.
  • reactivityInput (default: 50, range 0–100)
    Converts to reactivity = reactivityInput / 100. Controls how strongly the expanded bounds respond to opposing channel moves.

    • Higher ⇒ more sensitive/elastic expanded lines, closer to price.
    • Lower ⇒ steadier/forgiving expanded lines, better for trends with noise.
  • source (default: close)
    Reference price for the channel. Alternatives like medianprice or typicalprice can smooth the channel if desired.
  • alpha (default: 100, range 0–255)
    Cloud transparency control.

    • Governs the fill opacity of the active cloud (0 transparent → 100 fully opaque within the indicator’s scale).
    • The plotted expanded line uses a scaled opacity min(255, alpha*2) to keep it readable against the cloud.

Tip: Start with length = 20reactivity = 40–60alpha = 60–100. Increase reactivity if you want earlier cues; decrease it if you want sturdier levels.

How to read the cloud

  • Bullish regime (trend = 1)
    Price typically respects the lower cloud as dynamic support. Continuations often occur on rebounds within or above this zone. A decisive break below the lower cloud warns of weakening momentum or a potential regime change.
  • Bearish regime (trend = -1)
    Price often respects the upper cloud as dynamic resistance. Continuations often occur on pullbacks into/under this zone. A strong break above the upper cloud warns of bearish fatigue or a possible flip.
  • Transitions (flips)
    The flip condition is designed to confirm that the expanded bound has stopped hugging the channel boundary and started to “lead” in the opposite direction — a robust signal that regime may have changed.

Trading playbook (practical use-cases)

The following are usage ideas, not trade advice. Always validate on your markets/timeframes.

  1. Trend Filter (directional bias)
    • Take longs only when the regime is bullish and price is above or rebounding from the lower cloud.
    • Take shorts only when the regime is bearish and price is below or rejecting the upper cloud.
  2. Continuation Entries (buy dips / sell rallies)
    • Bullish: look for pullbacks that hold within or just above the lower cloud, then re-acceleration.
    • Bearish: look for rallies that stall within or just below the upper cloud, then roll over.
  3. Breakout/Invalidation Logic
    • Bullish: an impulsive close below the lower cloud = momentum deterioration; consider trims or protective actions.
    • Bearish: an impulsive close above the upper cloud = bearish invalidation risk.
  4. Stops & Trailing
    • In bullish regimes, a practical trailing stop can be set a few ticks below minExp.
    • In bearish regimes, trail a few ticks above maxExp.
    • Tighten/loosen distance by instrument volatility.

Tips, limitations & good practices

  • Sideways markets: Clouds may alternate frequently. Use a secondary filter (e.g., higher-timeframe regime agreement or a simple range filter) to avoid overtrading.
  • Parameter sensitivity: reactivityInput changes character materially. Forward-test multiple presets; don’t assume one-size-fits-all.
  • Context over signals: Treat flips as context first, signals second. Add your entry trigger of choice (momentum kick, pattern break, etc.).
  • Display hygiene: The indicator already uses fill + line emphasis. Keep overlapping tools minimal to maintain readability.
  • Performance: Lightweight; scales well even on lower timeframes.

ProBuilder Code

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or
Related users ' posts
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
2 years ago
B-Xtrender
B-Xtrender
8
Indicators
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...
JS
2 years ago
Trendilo
Trendilo
1
Indicators
Coded1 very interesting indicator, thanks JS
Nicolas
2 years ago
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
manfeber Buenos dias,alguien me podria decir como se descargar el archivo o el indicador Q-Trend??,ya...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
2 years ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
mortezaali14 Salut Nicholas, comment exécuter ce fichier dans les métadonnées
Leduc71 Bravo ! Cet indicateur est un suiveur de tendance, type “stop and reverse”, inspiré des cana...
Nicolas Yes, Magic if the variable that contains the value of the line, you can test if it goes up o...
dadah1987 Bonjour Nicolas, merci pour cet indicateur. Utilisant pour l'instant la création simplifié p...
Nicolas Merci d'ouvrir un sujet sur le forum avec une description complète du système.
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
xpe74 Utilitaire vraiment top, d'autant qu'ajouter des filtres de seuil peux aider a limiter le no...
Jiacky
3 years ago
Kalman Filter
Kalman Filter
0
Indicators
AndPar Buongiorno Nicolas, vorrei provare questo indicatore, ma quando lo inserisco in PRT mi vengo...
Nicolas Basta aggiungerlo al prezzo https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-i...
Aragorna hello Nicolas, this indicator works with the last Beta version of PRT? Ive seen tha many in...
SnorreDK Works extremely well - How? How do u implement this in a startegy? Breakoutstrategy?
Keyeming Thanks, but yes same question as above, some explanations on how to read it would be appreci...
Bateson Bonjour. Merci beaucoup ! J'ai installé l'indicateur sur PRT 11 mais pour des raisons qui ...
Stenozar Hi Sever, how can I visualize the coloured areas?
Sever Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set ...
CederTrader Hi Denis, does this indicator add to the chart as panel, or on the candles. Thanks
Nicolas Add it on the price chart as described in this video: https://www.prorealcode.com/blog/video...
Denis Hello Nicolas and Ceder Trader, Sorry, I only just saw your replies. The indicator is alre...

Top