PROTECTED SOURCE SCRIPT
POWER STRATEGY - Perfect for Meme Coins by OeZkAN

📈 POWER STRATEGY - PRO EXTENDED FILTER (NO FIB ATR, TUNABLE)
This is a comprehensive, multi-layered trend-following strategy designed for Pine Script v5. It is built around a core EMA Re-Test entry logic, significantly enhanced by multiple, optional filters for Conviction, Volatility, Multi-Timeframe (MTF) Alignment, and Price Action Context (like FVAG, Divergence, Mobility, and LSOB), making it highly customizable and robust.
🌟 Core Logic & Trend Filtering
The strategy aims to trade pullbacks/re-tests toward a primary Exponential Moving Average (EMA).
Primary Trend Filter (EMA): An adjustable EMA (default 50) determines the dominant trend.
Long Condition: Price is above the EMA.
Short Condition: Price is below the EMA.
Re-Test Entry: An entry signal is generated when the price briefly touches or crosses the EMA (the "Re-Test") but immediately rejects it and closes back on the trend side (e.g., a candle's low hits the EMA, but it closes bullishly above it).
Confirmation (Optional): The useConfirmation setting enforces a waiting period (confirmationBars) after the initial re-test to ensure the price moves a minimum distance (confirmationThreshold, measured in multiples of ATR) away from the re-test low/high, confirming the bounce strength.
🎯 Advanced Filter Stack (The 'Extended Filter')
This strategy integrates multiple optional filters, providing a high degree of control over trade quality. All filters use the ATR (Average True Range) for dynamic, volatility-adjusted calculations.
Volatility Filter: Ensures the market is neither too calm (minVolatility) nor too excessively volatile (maxVolatility) by comparing the current ATR to a long-term SMA of the ATR.
Conviction Score & MTF Alignment:
Conviction Score: A weighted score (max 6 points) combining the primary EMA trend (2 points) and alignment across three user-defined Multi-Timeframes (MTF TF1, TF2, TF3, 1 point each).
MTF Agreement: Requires a minimum number of timeframes (minTFAgreement) to agree with the entry direction. The Entry Conviction Level (minConvictionEntry) then acts as the final quality gate.
FVAG Filter (Fair Value Area Gap): Uses an SMA and ATR-based bands to identify when the price is pulling back into a 'Fair Value Area' (similar to Mean Reversion context) to align entries with high-probability reversal zones.
Pro Mobility Score (Optional): Measures the size of the current bar range relative to the average bar range over a mobilityLength period. Used to ensure sufficient current market movement for an effective trade.
LSOB Filter (Last Stagnant Order Block - simplified): Tries to detect if the price is near a recent low-volatility consolidation zone, filtering for potential breakout/continuation trades from these areas.
Divergence Filter (Optional): Uses RSI to check for Bullish or Bearish Divergence, aiming to align entries with underlying momentum shifts.
🛡️ Risk Management & Controllers
Dynamic TP/SL: Take Profit (TP1, TP2, TP3) and Stop Loss (SL) levels are dynamically calculated as multiples of the current ATR value.
Minimum R:R Ratio: The strategy blocks entries where the calculated Risk-to-Reward ratio (based on SL to TP1) is below a user-defined threshold (minRiskReward).
Trailing Stop: When activated (useTrailing), the stop-loss is moved to Breakeven after TP1 is hit, with an additional buffer (beBuffer x ATR). The stop then trails the price by a defined trailingDistance x ATR.
Auto-Fix Controllers: A unique feature designed to increase stability. The controllers monitor for core anomalies (errorMonitor) and calculation issues (calcIntegrity). In auto_fix mode, they apply non-intrusive fixes (e.g., temporarily relaxing the minConvictionEntry or disabling trailing stop if errors are detected) and can block entries for severe issues (safetyBlock).
🛠️ Customization and Use
This strategy is highly tunable. Users can selectively enable/disable filters to adapt the logic to different market conditions or assets.
Grouped Inputs: Inputs are logically grouped for easy adjustment of Trend, Volatility, Confirmation, Entry, TP/SL, Trailing, and various Filter settings.
Debug Mode: Enables detailed on-chart labels for internal variables (Conviction Score, Volatility, etc.) to aid in backtesting and optimization.
📢 Check Out My Other Work!
If you find this strategy valuable, please take a moment to explore my profile on TradingView. I have developed several other unique and robust Pine Script strategies and indicators focused on combining multiple data layers (price action, volume, volatility, and order flow concepts) into high-probability trading models.
They are definitely worth a look for any serious trader!
Disclaimer
This script is for educational and testing purposes only. Trading involves significant risk, and past performance is not indicative of future results.
This is a comprehensive, multi-layered trend-following strategy designed for Pine Script v5. It is built around a core EMA Re-Test entry logic, significantly enhanced by multiple, optional filters for Conviction, Volatility, Multi-Timeframe (MTF) Alignment, and Price Action Context (like FVAG, Divergence, Mobility, and LSOB), making it highly customizable and robust.
🌟 Core Logic & Trend Filtering
The strategy aims to trade pullbacks/re-tests toward a primary Exponential Moving Average (EMA).
Primary Trend Filter (EMA): An adjustable EMA (default 50) determines the dominant trend.
Long Condition: Price is above the EMA.
Short Condition: Price is below the EMA.
Re-Test Entry: An entry signal is generated when the price briefly touches or crosses the EMA (the "Re-Test") but immediately rejects it and closes back on the trend side (e.g., a candle's low hits the EMA, but it closes bullishly above it).
Confirmation (Optional): The useConfirmation setting enforces a waiting period (confirmationBars) after the initial re-test to ensure the price moves a minimum distance (confirmationThreshold, measured in multiples of ATR) away from the re-test low/high, confirming the bounce strength.
🎯 Advanced Filter Stack (The 'Extended Filter')
This strategy integrates multiple optional filters, providing a high degree of control over trade quality. All filters use the ATR (Average True Range) for dynamic, volatility-adjusted calculations.
Volatility Filter: Ensures the market is neither too calm (minVolatility) nor too excessively volatile (maxVolatility) by comparing the current ATR to a long-term SMA of the ATR.
Conviction Score & MTF Alignment:
Conviction Score: A weighted score (max 6 points) combining the primary EMA trend (2 points) and alignment across three user-defined Multi-Timeframes (MTF TF1, TF2, TF3, 1 point each).
MTF Agreement: Requires a minimum number of timeframes (minTFAgreement) to agree with the entry direction. The Entry Conviction Level (minConvictionEntry) then acts as the final quality gate.
FVAG Filter (Fair Value Area Gap): Uses an SMA and ATR-based bands to identify when the price is pulling back into a 'Fair Value Area' (similar to Mean Reversion context) to align entries with high-probability reversal zones.
Pro Mobility Score (Optional): Measures the size of the current bar range relative to the average bar range over a mobilityLength period. Used to ensure sufficient current market movement for an effective trade.
LSOB Filter (Last Stagnant Order Block - simplified): Tries to detect if the price is near a recent low-volatility consolidation zone, filtering for potential breakout/continuation trades from these areas.
Divergence Filter (Optional): Uses RSI to check for Bullish or Bearish Divergence, aiming to align entries with underlying momentum shifts.
🛡️ Risk Management & Controllers
Dynamic TP/SL: Take Profit (TP1, TP2, TP3) and Stop Loss (SL) levels are dynamically calculated as multiples of the current ATR value.
Minimum R:R Ratio: The strategy blocks entries where the calculated Risk-to-Reward ratio (based on SL to TP1) is below a user-defined threshold (minRiskReward).
Trailing Stop: When activated (useTrailing), the stop-loss is moved to Breakeven after TP1 is hit, with an additional buffer (beBuffer x ATR). The stop then trails the price by a defined trailingDistance x ATR.
Auto-Fix Controllers: A unique feature designed to increase stability. The controllers monitor for core anomalies (errorMonitor) and calculation issues (calcIntegrity). In auto_fix mode, they apply non-intrusive fixes (e.g., temporarily relaxing the minConvictionEntry or disabling trailing stop if errors are detected) and can block entries for severe issues (safetyBlock).
🛠️ Customization and Use
This strategy is highly tunable. Users can selectively enable/disable filters to adapt the logic to different market conditions or assets.
Grouped Inputs: Inputs are logically grouped for easy adjustment of Trend, Volatility, Confirmation, Entry, TP/SL, Trailing, and various Filter settings.
Debug Mode: Enables detailed on-chart labels for internal variables (Conviction Score, Volatility, etc.) to aid in backtesting and optimization.
📢 Check Out My Other Work!
If you find this strategy valuable, please take a moment to explore my profile on TradingView. I have developed several other unique and robust Pine Script strategies and indicators focused on combining multiple data layers (price action, volume, volatility, and order flow concepts) into high-probability trading models.
They are definitely worth a look for any serious trader!
Disclaimer
This script is for educational and testing purposes only. Trading involves significant risk, and past performance is not indicative of future results.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.