Re: 👨โ€🔬 Cagliostro's MT5 Laboratory

271
Cagliostro wrote: Fri Jan 02, 2026 9:30 am No - there is proprietary logic integrated. Why do you need the code, do you need changes?

PS: for the future please stick to the rules. If a coder wants to share code, he/she will do it.
I understand !
Yes, just some simple things, for instance, i would love the option of multi timeframe in that indicator, that would be really awsome.
And when i change colors and width of the band for exemple, everytime i change timeframes everything comes back to default so i can't save my changes.


Amazing job with the indicators :Fire:


Re: 👨โ€🔬 Cagliostro's MT5 Laboratory

272
k0udek wrote: Sat Jan 03, 2026 12:34 am I understand !
Yes, just some simple things, for instance, i would love the option of multi timeframe in that indicator, that would be really awsome.
And when i change colors and width of the band for exemple, everytime i change timeframes everything comes back to default so i can't save my changes.


Amazing job with the indicators :Fire:
MTF is not simple at all, as the logic is recursive so requires some efforts.
Colors should work if the template is set to none.

I will take a look when have spare time.
These users thanked the author Cagliostro for the post:
k0udek
Rating: 0.6%
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: 👨โ€🔬 Cagliostro's MT5 Laboratory

273
Cagliostro wrote: Fri Jan 02, 2026 12:00 am TwinSmooth ATR Bands

Happy New Year folks. Here you can find my MT5 port of QuantEdgeB's TradingView indicator: TwinSmooth ATR Bands.

image_2026-01-01_135841588.png

---
๐Ÿ“Š What Is It?

TwinSmooth ATR Bands combines two powerful smoothing techniques - SMMA (Smoothed Moving Average) and TEMA (Triple Exponential Moving Average) - to create a responsive yet stable trend baseline. ATR-based bands then define dynamic support/resistance zones that adapt to market volatility.

The result? Clear trend signals with minimal noise and whipsaws.

---
๐Ÿ”ฌ How It Works

1. SMMA (24) - Provides stability and filters out noise
2. TEMA (8) - Adds responsiveness to price changes
3. Base Line - Average of SMMA + TEMA
4. Trend Base - EMA(14) smoothing of the base line
5. ATR Bands - Trend Base ยฑ ATR ร— Multiplier

Signal Logic:
- ๐ŸŸข LONG: Close breaks above upper band
- ๐Ÿ”ด SHORT: Close breaks below lower band
- Signal persists until opposite breakout occurs

---
โœจ Key Features

โœ… Mathematically Verified - Exact port of the original Pine Script formulas
โœ… 18 Color Themes - Including Alpha, Premium, Classic, Ice, Blood Moon, and more
โœ… Colored Candles - Instant visual trend identification
โœ… Dynamic Cloud Fill - Shows distance between price and active band
โœ… Signal Arrows - Confirmed reversal markers
โœ… Full Alert System - Popup, Sound, Push Notification, Email
โœ… Chart Background Themes - Optional dark/light backgrounds per theme
โœ… Clean Code - Follows MQL5 best practices, no repainting

---
๐Ÿ’ก Trading Applications

- Trend Following: Stay in trades while price remains on the correct side of the band
- Volatility Filter: ATR bands automatically widen in volatile markets, tighten in calm periods
- Trailing Stop Loss: ATR bands are good to trail open trades and exit the trade before a trend reverse
Hi Cagliostro, thanks for the great indicator. It doesn't seem to be updating on every candle; could you please check it?
These users thanked the author asgariHoo for the post:
stond
Rating: 0.6%

Re: 👨โ€🔬 Cagliostro's MT5 Laboratory

274
Dear all, as the thread is getting bigger, please use PM to ask for support // modifications.

Keep the thread clean from support request.

If there is something still not solved on your side PM.
These users thanked the author Cagliostro for the post (total 3):
k0udek, kudrpenk, davidpont
Rating: 1.8%
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: 👨โ€🔬 Cagliostro's MT5 Laboratory

275
PULSAR Volume Oscillator

A Volume-Weighted Regime Detection Oscillator

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Introduction
Traditional oscillators treat all price movements equally, ignoring the fundamental truth that volume validates price action. A 50-pip move on thin volume means something very different from the same move on heavy institutional flow.
Pulsar addresses this by weighting price deviation from the mean by volume intensity, then normalizing the result to produce a bounded oscillator that identifies market regime: trending vs mean-reverting conditions.
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Signal Processing Pipeline
Price โ†’ MA(50) โ†’ Deviation โ†’ Volume Weight โ†’ RSI(Volume, 14) โ†’ ฯƒ Normalization โ†’ [-1, +1]

Stage 1: Basis Calculation
Standard moving average of the selected price source:
Basis = MA(Price, 50)
Supported types: SMA, EMA, VWMA, HULL.

Stage 2: Volume Weighting
Volume intensity modulates the deviation using RSI of volume:
vol_rsi = RSI(Volume, 14)
vol_factor = 1 + (vol_rsi/50 - 1) ร— Impact
Where Impact (default 0.5) controls sensitivity. High volume bars get amplified, low volume bars get dampened.

Stage 3: Normalized Deviation
Price deviation scaled by rolling standard deviation:
deviation = Price - Basis
vol_adjusted = deviation ร— vol_factor
normalized = vol_adjusted / (ฯƒ ร— Multiplier)
Output oscillates roughly between -1 and +1, where zero represents fair value.
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Regime Zones
> +0.5 Strong Bull (trending up)
0 to +0.5 Weak Bull (mean-reversion zone)
-0.5 to 0 Weak Bear (mean-reversion zone)
< -0.5 Strong Bear (trending down)

Arrows fire only on regime flips (Strong Bull โ†” Strong Bear), not on every threshold cross. This eliminates signal spam during choppy conditions.
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Visual Output
4-Color Histogram: Bright colors for Strong zones, muted for Weak zones
Smoothed Line: EMA of normalized value for trend confirmation
Gradient Fill: Cloud between histogram and smoothed line
Reference Lines: Zero line + threshold levels (ยฑ0.5 default)

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Technical Features
โœ… No Repaint: Calculations on confirmed bars only
โœ… O(1) Rolling StdDev: Welford's algorithm for efficiency
โœ… 18 Color Themes: Via QuantumColorThemes integration
โœ… 8 Arrow Styles: Heavy/Light barbs, blocks, 3D, shapes
โœ… Alert System: Popup, sound, push, email
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Recommended Settings
MA Period: 50 (structure)
MA Type: EMA or SMA
Volume RSI: 14 (standard)
Volume Impact: 0.5 (moderate) or 1.0 (aggressive)
StdDev Period: 20 (normalization)
StdDev Mult: 2.0 (scaling)
Thresholds: ยฑ0.5 (regime boundaries)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Original concept from my Pulsar indicator on tradingview, enhanced with volume weighting and regime detection logic.

Enjoy!
+C+
These users thanked the author Cagliostro for the post (total 2):
Akela, ismasevi23
Rating: 1.2%
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro