OPEN-SOURCE SCRIPT
DarkPool Flow

DarkPool Flow is a professional-grade technical analysis tool designed to align retail traders with the dominant "smart money" flow. Unlike standard moving average crossovers that often generate false signals during consolidation, this script employs a multi-layered filtering engine to isolate high-probability trends.
The core philosophy of this indicator is that Trends are fractal. A sustainable move on a lower timeframe must be supported by momentum on a higher timeframe. By comparing a "Fast Signal Trend" against a "Slow Anchor Trend" (e.g., Daily vs. Weekly), the script identifies the market bias used by institutional algorithms.
This edition features a Smart Recovery Engine, ensuring that valid trends are not missed simply because momentum started slowly, and a Dynamic Cloud that visually represents the strength of the trend spread.
Key Features
1. Auto-Adaptive Timeframe Logic
The script eliminates the guesswork of Multi-Timeframe (MTF) selection. By enabling "Auto-Adapt," the indicator detects your current chart timeframe and automatically maps it to the mathematically correct institutional pairings:
Scalping (<15m): Uses 15-Minute Trend vs. 1-Hour Anchor.
Day Trading (15m - 1H): Uses 4-Hour Trend vs. Daily Anchor.
Swing Trading (4H - Daily): Uses Daily Trend vs. Weekly Anchor (The classic "Golden" setup).
Investing (Weekly): Uses 21-Week EMA vs. 50-Week SMA (Bull Market Support Band logic).
2. Smart Recovery Signal Engine
Standard crossover scripts often miss major moves if the specific breakout candle has low volume or weak ADX. This script utilizes a state-machine logic that "remembers" the trend direction. If a trend begins during low volatility (gray candles), the script waits. The moment volatility and momentum confirm the move, a Smart Recovery Signal is triggered, allowing you to enter an existing trend safely.
3. Chop Protection (Gray Candles)
Preservation of capital is the priority. The script analyzes the Average Directional Index (ADX) and Volatility (ATR).
Colored Candles (Green/Red): The market is trending with sufficient strength. Trading is permitted.
Gray Candles: The market is in a low-energy chop or consolidation (ADX < 20). Trading is discouraged.
4. Dynamic Trend Cloud
The space between the Fast and Slow trends is filled with a dynamic cloud.
Darker/Opaque Cloud: Indicates a widening spread, suggesting accelerating momentum.
Lighter/Transparent Cloud: Indicates a narrowing spread, suggesting the trend may be weakening or consolidating.
5. Pullback & Retest Signals (+)
While triangles mark the start of a trend, the Plus (+) signs mark low-risk opportunities to add to a position. These appear when price dips into the cloud, finds support at the "Fair Value" zone, and closes back in the direction of the trend with confirmed momentum.
User Guide & Strategy
Setup
Add the indicator to your chart.
For Beginners: Enable "Auto-Adaptive Timeframes" in the settings.
For Advanced Users: Disable Auto-Adapt and manually configure your Fast/Slow pairings (Default is Daily 50 EMA / Weekly 50 EMA).
Signal Mode: Choose "First Breakout Only" for a cleaner chart, or "All Signals" if you wish to see re-entry points during choppy starts.
Long Entry Criteria (Buy)
Trend: The Cloud must be Green (Fast Trend > Slow Trend).
Signal: A Green Triangle appears below the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Green (+) sign appears, indicating a successful test of the cloud support.
Short Entry Criteria (Sell)
Trend: The Cloud must be Red (Fast Trend < Slow Trend).
Signal: A Red Triangle appears above the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Red (+) sign appears, indicating a successful test of the cloud resistance.
Stop Loss & Risk Management
Stop Loss: A standard institutional stop loss is placed just beyond the Slow Trend Line (the outer edge of the cloud). If price closes beyond the Slow Trend, the macro thesis is invalid.
Take Profit: Target liquidity pools or use a trailing stop based on the Fast Trend line.
Settings Overview
Mode Selection: Toggle between Auto-Adaptive logic or Manual control.
Manual Configuration: Define the specific Timeframe, Length, and Type (EMA, SMA, WMA) for both Fast and Slow trends.
Signal Logic: Toggle "Show Pullback Signals" on/off. Switch between "First Breakout" or "All Signals."
Quality Filters: Toggle individual filters (ATR, RSI, ADX) to adjust sensitivity. Turning these off makes the script more responsive but increases false signals.
Visual Style: Customize colors for Bullish, Bearish, and Neutral (Gray) states. Adjust cloud transparency.
Disclaimer
Risk Warning: Trading financial markets involves a high degree of risk and is not suitable for all investors. You could lose some or all of your initial investment.
Educational Use Only: This script and the information provided herein are for educational and informational purposes only. They do not constitute financial advice, investment advice, trading advice, or any other recommendation.
No Guarantee: Past performance of any trading system or methodology is not necessarily indicative of future results. The "Institutional Trend" indicator is a tool to assist in technical analysis, not a crystal ball. The creators of this script assume no responsibility or liability for any trading losses or damages incurred as a result of using this tool. Always perform your own due diligence and consult with a qualified financial advisor before making investment decisions.
The core philosophy of this indicator is that Trends are fractal. A sustainable move on a lower timeframe must be supported by momentum on a higher timeframe. By comparing a "Fast Signal Trend" against a "Slow Anchor Trend" (e.g., Daily vs. Weekly), the script identifies the market bias used by institutional algorithms.
This edition features a Smart Recovery Engine, ensuring that valid trends are not missed simply because momentum started slowly, and a Dynamic Cloud that visually represents the strength of the trend spread.
Key Features
1. Auto-Adaptive Timeframe Logic
The script eliminates the guesswork of Multi-Timeframe (MTF) selection. By enabling "Auto-Adapt," the indicator detects your current chart timeframe and automatically maps it to the mathematically correct institutional pairings:
Scalping (<15m): Uses 15-Minute Trend vs. 1-Hour Anchor.
Day Trading (15m - 1H): Uses 4-Hour Trend vs. Daily Anchor.
Swing Trading (4H - Daily): Uses Daily Trend vs. Weekly Anchor (The classic "Golden" setup).
Investing (Weekly): Uses 21-Week EMA vs. 50-Week SMA (Bull Market Support Band logic).
2. Smart Recovery Signal Engine
Standard crossover scripts often miss major moves if the specific breakout candle has low volume or weak ADX. This script utilizes a state-machine logic that "remembers" the trend direction. If a trend begins during low volatility (gray candles), the script waits. The moment volatility and momentum confirm the move, a Smart Recovery Signal is triggered, allowing you to enter an existing trend safely.
3. Chop Protection (Gray Candles)
Preservation of capital is the priority. The script analyzes the Average Directional Index (ADX) and Volatility (ATR).
Colored Candles (Green/Red): The market is trending with sufficient strength. Trading is permitted.
Gray Candles: The market is in a low-energy chop or consolidation (ADX < 20). Trading is discouraged.
4. Dynamic Trend Cloud
The space between the Fast and Slow trends is filled with a dynamic cloud.
Darker/Opaque Cloud: Indicates a widening spread, suggesting accelerating momentum.
Lighter/Transparent Cloud: Indicates a narrowing spread, suggesting the trend may be weakening or consolidating.
5. Pullback & Retest Signals (+)
While triangles mark the start of a trend, the Plus (+) signs mark low-risk opportunities to add to a position. These appear when price dips into the cloud, finds support at the "Fair Value" zone, and closes back in the direction of the trend with confirmed momentum.
User Guide & Strategy
Setup
Add the indicator to your chart.
For Beginners: Enable "Auto-Adaptive Timeframes" in the settings.
For Advanced Users: Disable Auto-Adapt and manually configure your Fast/Slow pairings (Default is Daily 50 EMA / Weekly 50 EMA).
Signal Mode: Choose "First Breakout Only" for a cleaner chart, or "All Signals" if you wish to see re-entry points during choppy starts.
Long Entry Criteria (Buy)
Trend: The Cloud must be Green (Fast Trend > Slow Trend).
Signal: A Green Triangle appears below the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Green (+) sign appears, indicating a successful test of the cloud support.
Short Entry Criteria (Sell)
Trend: The Cloud must be Red (Fast Trend < Slow Trend).
Signal: A Red Triangle appears above the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Red (+) sign appears, indicating a successful test of the cloud resistance.
Stop Loss & Risk Management
Stop Loss: A standard institutional stop loss is placed just beyond the Slow Trend Line (the outer edge of the cloud). If price closes beyond the Slow Trend, the macro thesis is invalid.
Take Profit: Target liquidity pools or use a trailing stop based on the Fast Trend line.
Settings Overview
Mode Selection: Toggle between Auto-Adaptive logic or Manual control.
Manual Configuration: Define the specific Timeframe, Length, and Type (EMA, SMA, WMA) for both Fast and Slow trends.
Signal Logic: Toggle "Show Pullback Signals" on/off. Switch between "First Breakout" or "All Signals."
Quality Filters: Toggle individual filters (ATR, RSI, ADX) to adjust sensitivity. Turning these off makes the script more responsive but increases false signals.
Visual Style: Customize colors for Bullish, Bearish, and Neutral (Gray) states. Adjust cloud transparency.
Disclaimer
Risk Warning: Trading financial markets involves a high degree of risk and is not suitable for all investors. You could lose some or all of your initial investment.
Educational Use Only: This script and the information provided herein are for educational and informational purposes only. They do not constitute financial advice, investment advice, trading advice, or any other recommendation.
No Guarantee: Past performance of any trading system or methodology is not necessarily indicative of future results. The "Institutional Trend" indicator is a tool to assist in technical analysis, not a crystal ball. The creators of this script assume no responsibility or liability for any trading losses or damages incurred as a result of using this tool. Always perform your own due diligence and consult with a qualified financial advisor before making investment decisions.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.