OPEN-SOURCE SCRIPT
1 Trendline Strategy

🌟 1 Trendline Strategy: Liquidity Pool Breakout + HTF Trend Filter (Neon Edition)
Description:
This strategy is based on "Smart Money" concepts and trendline technical analysis. The core logic relies on identifying dynamic liquidity pools and trading their breakouts (liquidity sweeps), but strictly in the direction of the global trend.
The script is fully automated, features built-in ATR-based risk management, and includes custom neon visualization designed for maximum chart readability.
⚙️ How it Works?
1. Dynamic Liquidity Pools (Liquidity Zones)
The algorithm calculates significant highs and lows (Pivot High / Pivot Low) and projects dynamic channel zones forward in time.
When the price breaks the upper pool boundary (resistance), the strategy looks for a Short entry (bounce/liquidity sweep).
When the price breaks the lower pool boundary (support), a Long signal is generated.
2. HTF Trend Filter (Higher Timeframe Filter)
To avoid false entries against strong momentum, the strategy incorporates an advanced Higher Timeframe (HTF) filter. By default, it uses a 250 EMA on the 4-hour chart. Trades are opened only when two factors align:
For Long: Price is above the HTF EMA, and the moving average slope is pointing upwards.
For Short: Price is below the HTF EMA, and the moving average slope is pointing downwards.
(The trend filter can be easily disabled in the settings if you prefer to trade all pool breakouts).
3. Risk Management (ATR Stops & Targets)
Stop Loss and Take Profit levels are not arbitrary—they are dynamically calculated based on asset volatility (ATR indicator) at the exact moment a signal occurs. These fixed levels are held on the chart until the position is fully closed.
🎨 Visuals (Neon Colors)
The script's UI has been redesigned for a comfortable trading experience on a dark theme:
Lower Pools (Long zones): Highlighted in neon cyan (#00bcd4).
Upper Pools (Short zones): Highlighted in neon orange-yellow (#ff9800).
HTF Trend Indicator: The global trend line turns blue during an uptrend and white during a downtrend.
Position Levels: During an active trade, clean lines are drawn on the chart: Blue — Entry Price, Red — Stop Loss (SL), Green — Take Profit (TP). The lines break when the trade is closed, keeping your chart clean.
🎛 Main Settings (Inputs)
Period (Core Settings): Lookback period for finding Pivot points (default is 6).
Padding (Core Settings): The width of the liquidity pool channel.
Use Trend Filter: Toggle the higher timeframe filter on or off.
Trend Higher Timeframe & EMA Length: Set the timeframe and length of the trend-defining EMA (default is 240 min / 250 EMA).
ATR Length / SL Mult / TP Mult: Risk management settings (ATR multipliers for SL and TP calculations).
Disclaimer: This strategy is provided "as is" for educational purposes. It is highly recommended to backtest it on your preferred trading pairs and timeframes to find the optimal ATR multipliers and Pivot periods before risking real capital.
#SmartMoneyConcepts #SMC #Liquidity #LiquidityPools #BreakoutStrategy #TrendFilter #TradingStrategy #PineScript #ATR #RiskManagement #CryptoTrading #Forex
Description:
This strategy is based on "Smart Money" concepts and trendline technical analysis. The core logic relies on identifying dynamic liquidity pools and trading their breakouts (liquidity sweeps), but strictly in the direction of the global trend.
The script is fully automated, features built-in ATR-based risk management, and includes custom neon visualization designed for maximum chart readability.
⚙️ How it Works?
1. Dynamic Liquidity Pools (Liquidity Zones)
The algorithm calculates significant highs and lows (Pivot High / Pivot Low) and projects dynamic channel zones forward in time.
When the price breaks the upper pool boundary (resistance), the strategy looks for a Short entry (bounce/liquidity sweep).
When the price breaks the lower pool boundary (support), a Long signal is generated.
2. HTF Trend Filter (Higher Timeframe Filter)
To avoid false entries against strong momentum, the strategy incorporates an advanced Higher Timeframe (HTF) filter. By default, it uses a 250 EMA on the 4-hour chart. Trades are opened only when two factors align:
For Long: Price is above the HTF EMA, and the moving average slope is pointing upwards.
For Short: Price is below the HTF EMA, and the moving average slope is pointing downwards.
(The trend filter can be easily disabled in the settings if you prefer to trade all pool breakouts).
3. Risk Management (ATR Stops & Targets)
Stop Loss and Take Profit levels are not arbitrary—they are dynamically calculated based on asset volatility (ATR indicator) at the exact moment a signal occurs. These fixed levels are held on the chart until the position is fully closed.
🎨 Visuals (Neon Colors)
The script's UI has been redesigned for a comfortable trading experience on a dark theme:
Lower Pools (Long zones): Highlighted in neon cyan (#00bcd4).
Upper Pools (Short zones): Highlighted in neon orange-yellow (#ff9800).
HTF Trend Indicator: The global trend line turns blue during an uptrend and white during a downtrend.
Position Levels: During an active trade, clean lines are drawn on the chart: Blue — Entry Price, Red — Stop Loss (SL), Green — Take Profit (TP). The lines break when the trade is closed, keeping your chart clean.
🎛 Main Settings (Inputs)
Period (Core Settings): Lookback period for finding Pivot points (default is 6).
Padding (Core Settings): The width of the liquidity pool channel.
Use Trend Filter: Toggle the higher timeframe filter on or off.
Trend Higher Timeframe & EMA Length: Set the timeframe and length of the trend-defining EMA (default is 240 min / 250 EMA).
ATR Length / SL Mult / TP Mult: Risk management settings (ATR multipliers for SL and TP calculations).
Disclaimer: This strategy is provided "as is" for educational purposes. It is highly recommended to backtest it on your preferred trading pairs and timeframes to find the optimal ATR multipliers and Pivot periods before risking real capital.
#SmartMoneyConcepts #SMC #Liquidity #LiquidityPools #BreakoutStrategy #TrendFilter #TradingStrategy #PineScript #ATR #RiskManagement #CryptoTrading #Forex
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Professional Trader
Capital Management
Capital Management
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Professional Trader
Capital Management
Capital Management
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.