OPEN-SOURCE SCRIPT
Trend Flow Trail [AlgoAlpha]

OVERVIEW
This script overlays a custom hybrid indicator called the Money Flow Trail which combines a volatility-based trend-following trail with a volume-weighted momentum oscillator. It’s built around two core components: the AlphaTrail—a dynamic band system influenced by Hull MA and volatility—and a smoothed Money Flow Index (MFI) that provides insights into buying or selling pressure. Together, these tools are used to color bars, generate potential reversal markers, and assist traders in identifying trend continuation or exhaustion phases in any market or timeframe.
CONCEPTS
The AlphaTrail calculates a volatility-adjusted channel around price using the Hull Moving Average as the base and an EMA of range as the spread. It adaptively shifts based on price interaction to capture trend reversals while avoiding whipsaws. The direction (bullish or bearish) determines both the band being tracked and how the trail locks in. The Money Flow Index (MFI) is derived from hlc3 and volume, measuring buying vs selling pressure, and is further smoothed with a short Hull MA to reduce noise while preserving structure. These two systems work in tandem: AlphaTrail governs directional context, while MFI refines the timing.
FEATURES
USAGE
Add the indicator to any chart. Use the AlphaTrail plot to define trend context: bullish (trailing below price) or bearish (trailing above). MFI values give supporting confirmation—favor long setups when MFI is rising and above 50 in a bullish regime, and shorts when MFI is falling and below 50 in a bearish regime. The colored fills help visually track strength; sharp changes in MFI crossing 80/20 or 90/10 zones often precede pullbacks or reversals. Use the plotted circles as optional take-profit signals when MFI and trend are extended. Adjust AlphaTrail length/multiplier and MFI smoothing to better match the asset’s volatility profile.
This script overlays a custom hybrid indicator called the Money Flow Trail which combines a volatility-based trend-following trail with a volume-weighted momentum oscillator. It’s built around two core components: the AlphaTrail—a dynamic band system influenced by Hull MA and volatility—and a smoothed Money Flow Index (MFI) that provides insights into buying or selling pressure. Together, these tools are used to color bars, generate potential reversal markers, and assist traders in identifying trend continuation or exhaustion phases in any market or timeframe.
CONCEPTS
The AlphaTrail calculates a volatility-adjusted channel around price using the Hull Moving Average as the base and an EMA of range as the spread. It adaptively shifts based on price interaction to capture trend reversals while avoiding whipsaws. The direction (bullish or bearish) determines both the band being tracked and how the trail locks in. The Money Flow Index (MFI) is derived from hlc3 and volume, measuring buying vs selling pressure, and is further smoothed with a short Hull MA to reduce noise while preserving structure. These two systems work in tandem: AlphaTrail governs directional context, while MFI refines the timing.
FEATURES
- Dynamic AlphaTrail line with regime switching logic that controls directional bias and bar coloring.
- Smoothed MFI with gradient coloring to visually communicate pressure and exhaustion levels.
- Overbought/oversold thresholds (80/20), mid-level (50), and custom extreme zones (90/10) for deeper signal granularity.
- Built-in take-profit signal logic: crossover of MFI into overbought with bullish AlphaTrail, or into oversold with bearish AlphaTrail.
- Visual fills between price and AlphaTrail for clearer confirmation during trend phases.
- Alerts for regime shifts, MFI crossovers, trail interactions, and bar color regime changes.
USAGE
Add the indicator to any chart. Use the AlphaTrail plot to define trend context: bullish (trailing below price) or bearish (trailing above). MFI values give supporting confirmation—favor long setups when MFI is rising and above 50 in a bullish regime, and shorts when MFI is falling and below 50 in a bearish regime. The colored fills help visually track strength; sharp changes in MFI crossing 80/20 or 90/10 zones often precede pullbacks or reversals. Use the plotted circles as optional take-profit signals when MFI and trend are extended. Adjust AlphaTrail length/multiplier and MFI smoothing to better match the asset’s volatility profile.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
🔱Get 50% off ALL PLANS!🔱(Ends soon!)
Code: HFD25
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Code: HFD25
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
🔱Get 50% off ALL PLANS!🔱(Ends soon!)
Code: HFD25
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Code: HFD25
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
❓Do you have feedback or indicator ideas? Join our server to tell us about it!
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.