OPEN-SOURCE SCRIPT
Strategy [High-Low Cloud Trend] (v6, perf-safe)

Description
High-Low Cloud Trend Strategy (Performance-Safe Edition)
Version 6 • RezzoRedPriest (based on the original logic by rottor29)
How it works
Dynamic range ― The script tracks the highest high / lowest low over a look-back of N bars (len). When price tags one extreme, a “pivot” flips to the opposite extreme, forming the core of the cloud.
Trend filter ― If the candle closes above the pivot, trend = bullish; below it, trend = bearish. The optional “Trade only with trend” switch forces longs in bullish mode and shorts in bearish mode.
Signals
Cloud Retest – price pulls back to the inner edge (band1) and rejects it.
Cloud Cross – price breaks through the outer edge (band).
Mean Reversion – spikes beyond the inner edge and snap back (optional).
Execution model – trades are processed once per bar (process_orders_on_close = true), capped at maxTradesPerDay.
Performance guardrails
Only the most-recent visBars bars are calculated and painted.
Object limits: max_labels_count = 400, max_lines_count = 30.
Inputs
Group Name Purpose
Display Drawings: show last N bars Hard cap for calculations & drawings (default = 500).
Display Show markers / labels Toggle all arrows / diamonds.
Display Show cloud fill & background Toggle the colored cloud & background.
Strategy Look-back period (len) Width of the cloud; larger = smoother trend.
Strategy Enable trading Completely turn trade logic on/off.
Strategy Take cloud-retest / cross / mean-reversion signals Select which setups feed the engine.
Strategy Trade only with trend Filter counter-trend signals.
Risk Max trades per day Hard daily cap.
Recommended use
Works on any timeframe; common sweet spots are 5 m & 15 m for liquid futures / FX.
Increase len for higher timeframes (e.g. 55–100 on 1 H) to avoid noise.
If your chart still lags, either:
Lower Drawings: show last N bars, or
Turn Show cloud fill off – the fill is the heaviest operation.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Always test on demo data first and use proper risk management.
High-Low Cloud Trend Strategy (Performance-Safe Edition)
Version 6 • RezzoRedPriest (based on the original logic by rottor29)
How it works
Dynamic range ― The script tracks the highest high / lowest low over a look-back of N bars (len). When price tags one extreme, a “pivot” flips to the opposite extreme, forming the core of the cloud.
Trend filter ― If the candle closes above the pivot, trend = bullish; below it, trend = bearish. The optional “Trade only with trend” switch forces longs in bullish mode and shorts in bearish mode.
Signals
Cloud Retest – price pulls back to the inner edge (band1) and rejects it.
Cloud Cross – price breaks through the outer edge (band).
Mean Reversion – spikes beyond the inner edge and snap back (optional).
Execution model – trades are processed once per bar (process_orders_on_close = true), capped at maxTradesPerDay.
Performance guardrails
Only the most-recent visBars bars are calculated and painted.
Object limits: max_labels_count = 400, max_lines_count = 30.
Inputs
Group Name Purpose
Display Drawings: show last N bars Hard cap for calculations & drawings (default = 500).
Display Show markers / labels Toggle all arrows / diamonds.
Display Show cloud fill & background Toggle the colored cloud & background.
Strategy Look-back period (len) Width of the cloud; larger = smoother trend.
Strategy Enable trading Completely turn trade logic on/off.
Strategy Take cloud-retest / cross / mean-reversion signals Select which setups feed the engine.
Strategy Trade only with trend Filter counter-trend signals.
Risk Max trades per day Hard daily cap.
Recommended use
Works on any timeframe; common sweet spots are 5 m & 15 m for liquid futures / FX.
Increase len for higher timeframes (e.g. 55–100 on 1 H) to avoid noise.
If your chart still lags, either:
Lower Drawings: show last N bars, or
Turn Show cloud fill off – the fill is the heaviest operation.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Always test on demo data first and use proper risk management.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.