Planète_finance Day Trading 5m - Signal Achat/Vente EMA
Keep the original logic (EMA 8 & EMA 15 crossover on 5m).
Filter with the EMA200 trend on 1h (to stay in the direction of the market).
Add a simple relative volume filter to avoid false signals.
Display BUY when bullish conditions are met and SELL when bearish conditions are met.
No over-complexity (RSI, cooldown, etc.) → that can be added later if you want to refine.
Recherche dans les scripts pour "机械革命无界15+时不时闪屏"
Tzotchev Trend Measure [EdgeTools]Are you still measuring trend strength with moving averages? Here is a better variant at scientific level:
Tzotchev Trend Measure: A Statistical Approach to Trend Following
The Tzotchev Trend Measure represents a sophisticated advancement in quantitative trend analysis, moving beyond traditional moving average-based indicators toward a statistically rigorous framework for measuring trend strength. This indicator implements the methodology developed by Tzotchev et al. (2015) in their seminal J.P. Morgan research paper "Designing robust trend-following system: Behind the scenes of trend-following," which introduced a probabilistic approach to trend measurement that has since become a cornerstone of institutional trading strategies.
Mathematical Foundation and Statistical Theory
The core innovation of the Tzotchev Trend Measure lies in its transformation of price momentum into a probability-based metric through the application of statistical hypothesis testing principles. The indicator employs the fundamental formula ST = 2 × Φ(√T × r̄T / σ̂T) - 1, where ST represents the trend strength score bounded between -1 and +1, Φ(x) denotes the normal cumulative distribution function, T represents the lookback period in trading days, r̄T is the average logarithmic return over the specified period, and σ̂T represents the estimated daily return volatility.
This formulation transforms what is essentially a t-statistic into a probabilistic trend measure, testing the null hypothesis that the mean return equals zero against the alternative hypothesis of non-zero mean return. The use of logarithmic returns rather than simple returns provides several statistical advantages, including symmetry properties where log(P₁/P₀) = -log(P₀/P₁), additivity characteristics that allow for proper compounding analysis, and improved validity of normal distribution assumptions that underpin the statistical framework.
The implementation utilizes the Abramowitz and Stegun (1964) approximation for the normal cumulative distribution function, achieving accuracy within ±1.5 × 10⁻⁷ for all input values. This approximation employs Horner's method for polynomial evaluation to ensure numerical stability, particularly important when processing large datasets or extreme market conditions.
Comparative Analysis with Traditional Trend Measurement Methods
The Tzotchev Trend Measure demonstrates significant theoretical and empirical advantages over conventional trend analysis techniques. Traditional moving average-based systems, including simple moving averages (SMA), exponential moving averages (EMA), and their derivatives such as MACD, suffer from several fundamental limitations that the Tzotchev methodology addresses systematically.
Moving average systems exhibit inherent lag bias, as documented by Kaufman (2013) in "Trading Systems and Methods," where he demonstrates that moving averages inevitably lag price movements by approximately half their period length. This lag creates delayed signal generation that reduces profitability in trending markets and increases false signal frequency during consolidation periods. In contrast, the Tzotchev measure eliminates lag bias by directly analyzing the statistical properties of return distributions rather than smoothing price levels.
The volatility normalization inherent in the Tzotchev formula addresses a critical weakness in traditional momentum indicators. As shown by Bollinger (2001) in "Bollinger on Bollinger Bands," momentum oscillators like RSI and Stochastic fail to account for changing volatility regimes, leading to inconsistent signal interpretation across different market conditions. The Tzotchev measure's incorporation of return volatility in the denominator ensures that trend strength assessments remain consistent regardless of the underlying volatility environment.
Empirical studies by Hurst, Ooi, and Pedersen (2013) in "Demystifying Managed Futures" demonstrate that traditional trend-following indicators suffer from significant drawdowns during whipsaw markets, with Sharpe ratios frequently below 0.5 during challenging periods. The authors attribute these poor performance characteristics to the binary nature of most trend signals and their inability to quantify signal confidence. The Tzotchev measure addresses this limitation by providing continuous probability-based outputs that allow for more sophisticated risk management and position sizing strategies.
The statistical foundation of the Tzotchev approach provides superior robustness compared to technical indicators that lack theoretical grounding. Fama and French (1988) in "Permanent and Temporary Components of Stock Prices" established that price movements contain both permanent and temporary components, with traditional moving averages unable to distinguish between these elements effectively. The Tzotchev methodology's hypothesis testing framework specifically tests for the presence of permanent trend components while filtering out temporary noise, providing a more theoretically sound approach to trend identification.
Research by Moskowitz, Ooi, and Pedersen (2012) in "Time Series Momentum in the Cross Section of Asset Returns" found that traditional momentum indicators exhibit significant variation in effectiveness across asset classes and time periods. Their study of multiple asset classes over decades revealed that simple price-based momentum measures often fail to capture persistent trends in fixed income and commodity markets. The Tzotchev measure's normalization by volatility and its probabilistic interpretation provide consistent performance across diverse asset classes, as demonstrated in the original J.P. Morgan research.
Comparative performance studies conducted by AQR Capital Management (Asness, Moskowitz, and Pedersen, 2013) in "Value and Momentum Everywhere" show that volatility-adjusted momentum measures significantly outperform traditional price momentum across international equity, bond, commodity, and currency markets. The study documents Sharpe ratio improvements of 0.2 to 0.4 when incorporating volatility normalization, consistent with the theoretical advantages of the Tzotchev approach.
The regime detection capabilities of the Tzotchev measure provide additional advantages over binary trend classification systems. Research by Ang and Bekaert (2002) in "Regime Switches in Interest Rates" demonstrates that financial markets exhibit distinct regime characteristics that traditional indicators fail to capture adequately. The Tzotchev measure's five-tier classification system (Strong Bull, Weak Bull, Neutral, Weak Bear, Strong Bear) provides more nuanced market state identification than simple trend/no-trend binary systems.
Statistical testing by Jegadeesh and Titman (2001) in "Profitability of Momentum Strategies" revealed that traditional momentum indicators suffer from significant parameter instability, with optimal lookback periods varying substantially across market conditions and asset classes. The Tzotchev measure's statistical framework provides more stable parameter selection through its grounding in hypothesis testing theory, reducing the need for frequent parameter optimization that can lead to overfitting.
Advanced Noise Filtering and Market Regime Detection
A significant enhancement over the original Tzotchev methodology is the incorporation of a multi-factor noise filtering system designed to reduce false signals during sideways market conditions. The filtering mechanism employs four distinct approaches: adaptive thresholding based on current market regime strength, volatility-based filtering utilizing ATR percentile analysis, trend strength confirmation through momentum alignment, and a comprehensive multi-factor approach that combines all methodologies.
The adaptive filtering system analyzes market microstructure through price change relative to average true range, calculates volatility percentiles over rolling windows, and assesses trend alignment across multiple timeframes using exponential moving averages of varying periods. This approach addresses one of the primary limitations identified in traditional trend-following systems, namely their tendency to generate excessive false signals during periods of low volatility or sideways price action.
The regime detection component classifies market conditions into five distinct categories: Strong Bull (ST > 0.3), Weak Bull (0.1 < ST ≤ 0.3), Neutral (-0.1 ≤ ST ≤ 0.1), Weak Bear (-0.3 ≤ ST < -0.1), and Strong Bear (ST < -0.3). This classification system provides traders with clear, quantitative definitions of market regimes that can inform position sizing, risk management, and strategy selection decisions.
Professional Implementation and Trading Applications
The indicator incorporates three distinct trading profiles designed to accommodate different investment approaches and risk tolerances. The Conservative profile employs longer lookback periods (63 days), higher signal thresholds (0.2), and reduced filter sensitivity (0.5) to minimize false signals and focus on major trend changes. The Balanced profile utilizes standard academic parameters with moderate settings across all dimensions. The Aggressive profile implements shorter lookback periods (14 days), lower signal thresholds (-0.1), and increased filter sensitivity (1.5) to capture shorter-term trend movements.
Signal generation occurs through threshold crossover analysis, where long signals are generated when the trend measure crosses above the specified threshold and short signals when it crosses below. The implementation includes sophisticated signal confirmation mechanisms that consider trend alignment across multiple timeframes and momentum strength percentiles to reduce the likelihood of false breakouts.
The alert system provides real-time notifications for trend threshold crossovers, strong regime changes, and signal generation events, with configurable frequency controls to prevent notification spam. Alert messages are standardized to ensure consistency across different market conditions and timeframes.
Performance Optimization and Computational Efficiency
The implementation incorporates several performance optimization features designed to handle large datasets efficiently. The maximum bars back parameter allows users to control historical calculation depth, with default settings optimized for most trading applications while providing flexibility for extended historical analysis. The system includes automatic performance monitoring that generates warnings when computational limits are approached.
Error handling mechanisms protect against division by zero conditions, infinite values, and other numerical instabilities that can occur during extreme market conditions. The finite value checking system ensures data integrity throughout the calculation process, with fallback mechanisms that maintain indicator functionality even when encountering corrupted or missing price data.
Timeframe validation provides warnings when the indicator is applied to unsuitable timeframes, as the Tzotchev methodology was specifically designed for daily and higher timeframe analysis. This validation helps prevent misapplication of the indicator in contexts where its statistical assumptions may not hold.
Visual Design and User Interface
The indicator features eight professional color schemes designed for different trading environments and user preferences. The EdgeTools theme provides an institutional blue and steel color palette suitable for professional trading environments. The Gold theme offers warm colors optimized for commodities trading. The Behavioral theme incorporates psychology-based color contrasts that align with behavioral finance principles. The Quant theme provides neutral colors suitable for analytical applications.
Additional specialized themes include Ocean, Fire, Matrix, and Arctic variations, each optimized for specific visual preferences and trading contexts. All color schemes include automatic dark and light mode optimization to ensure optimal readability across different chart backgrounds and trading platforms.
The information table provides real-time display of key metrics including current trend measure value, market regime classification, signal strength, Z-score, average returns, volatility measures, filter threshold levels, and filter effectiveness percentages. This comprehensive dashboard allows traders to monitor all relevant indicator components simultaneously.
Theoretical Implications and Research Context
The Tzotchev Trend Measure addresses several theoretical limitations inherent in traditional technical analysis approaches. Unlike moving average-based systems that rely on price level comparisons, this methodology grounds trend analysis in statistical hypothesis testing, providing a more robust theoretical foundation for trading decisions.
The probabilistic interpretation of trend strength offers significant advantages over binary trend classification systems. Rather than simply indicating whether a trend exists, the measure quantifies the statistical confidence level associated with the trend assessment, allowing for more nuanced risk management and position sizing decisions.
The incorporation of volatility normalization addresses the well-documented problem of volatility clustering in financial time series, ensuring that trend strength assessments remain consistent across different market volatility regimes. This normalization is particularly important for portfolio management applications where consistent risk metrics across different assets and time periods are essential.
Practical Applications and Trading Strategy Integration
The Tzotchev Trend Measure can be effectively integrated into various trading strategies and portfolio management frameworks. For trend-following strategies, the indicator provides clear entry and exit signals with quantified confidence levels. For mean reversion strategies, extreme readings can signal potential turning points. For portfolio allocation, the regime classification system can inform dynamic asset allocation decisions.
The indicator's statistical foundation makes it particularly suitable for quantitative trading strategies where systematic, rules-based approaches are preferred over discretionary decision-making. The standardized output range facilitates easy integration with position sizing algorithms and risk management systems.
Risk management applications benefit from the indicator's ability to quantify trend strength and provide early warning signals of potential trend changes. The multi-timeframe analysis capability allows for the construction of robust risk management frameworks that consider both short-term tactical and long-term strategic market conditions.
Implementation Guide and Parameter Configuration
The practical application of the Tzotchev Trend Measure requires careful parameter configuration to optimize performance for specific trading objectives and market conditions. This section provides comprehensive guidance for parameter selection and indicator customization.
Core Calculation Parameters
The Lookback Period parameter controls the statistical window used for trend calculation and represents the most critical setting for the indicator. Default values range from 14 to 63 trading days, with shorter periods (14-21 days) providing more sensitive trend detection suitable for short-term trading strategies, while longer periods (42-63 days) offer more stable trend identification appropriate for position trading and long-term investment strategies. The parameter directly influences the statistical significance of trend measurements, with longer periods requiring stronger underlying trends to generate significant signals but providing greater reliability in trend identification.
The Price Source parameter determines which price series is used for return calculations. The default close price provides standard trend analysis, while alternative selections such as high-low midpoint ((high + low) / 2) can reduce noise in volatile markets, and volume-weighted average price (VWAP) offers superior trend identification in institutional trading environments where volume concentration matters significantly.
The Signal Threshold parameter establishes the minimum trend strength required for signal generation, with values ranging from -0.5 to 0.5. Conservative threshold settings (0.2 to 0.3) reduce false signals but may miss early trend opportunities, while aggressive settings (-0.1 to 0.1) provide earlier signal generation at the cost of increased false positive rates. The optimal threshold depends on the trader's risk tolerance and the volatility characteristics of the traded instrument.
Trading Profile Configuration
The Trading Profile system provides pre-configured parameter sets optimized for different trading approaches. The Conservative profile employs a 63-day lookback period with a 0.2 signal threshold and 0.5 noise sensitivity, designed for long-term position traders seeking high-probability trend signals with minimal false positives. The Balanced profile uses a 21-day lookback with 0.05 signal threshold and 1.0 noise sensitivity, suitable for swing traders requiring moderate signal frequency with acceptable noise levels. The Aggressive profile implements a 14-day lookback with -0.1 signal threshold and 1.5 noise sensitivity, optimized for day traders and scalpers requiring frequent signal generation despite higher noise levels.
Advanced Noise Filtering System
The noise filtering mechanism addresses the challenge of false signals during sideways market conditions through four distinct methodologies. The Adaptive filter adjusts thresholds based on current trend strength, increasing sensitivity during strong trending periods while raising thresholds during consolidation phases. The Volatility-based filter utilizes Average True Range (ATR) percentile analysis to suppress signals during abnormally volatile conditions that typically generate false trend indications.
The Trend Strength filter requires alignment between multiple momentum indicators before confirming signals, reducing the probability of false breakouts from consolidation patterns. The Multi-factor approach combines all filtering methodologies using weighted scoring to provide the most robust noise reduction while maintaining signal responsiveness during genuine trend initiations.
The Noise Sensitivity parameter controls the aggressiveness of the filtering system, with lower values (0.5-1.0) providing conservative filtering suitable for volatile instruments, while higher values (1.5-2.0) allow more signals through but may increase false positive rates during choppy market conditions.
Visual Customization and Display Options
The Color Scheme parameter offers eight professional visualization options designed for different analytical preferences and market conditions. The EdgeTools scheme provides high contrast visualization optimized for trend strength differentiation, while the Gold scheme offers warm tones suitable for commodity analysis. The Behavioral scheme uses psychological color associations to enhance decision-making speed, and the Quant scheme provides neutral colors appropriate for quantitative analysis environments.
The Ocean, Fire, Matrix, and Arctic schemes offer additional aesthetic options while maintaining analytical functionality. Each scheme includes optimized colors for both light and dark chart backgrounds, ensuring visibility across different trading platform configurations.
The Show Glow Effects parameter enhances plot visibility through multiple layered lines with progressive transparency, particularly useful when analyzing multiple timeframes simultaneously or when working with dense price data that might obscure trend signals.
Performance Optimization Settings
The Maximum Bars Back parameter controls the historical data depth available for calculations, with values ranging from 5,000 to 50,000 bars. Higher values enable analysis of longer-term trend patterns but may impact indicator loading speed on slower systems or when applied to multiple instruments simultaneously. The optimal setting depends on the intended analysis timeframe and available computational resources.
The Calculate on Every Tick parameter determines whether the indicator updates with every price change or only at bar close. Real-time calculation provides immediate signal updates suitable for scalping and day trading strategies, while bar-close calculation reduces computational overhead and eliminates signal flickering during bar formation, preferred for swing trading and position management applications.
Alert System Configuration
The Alert Frequency parameter controls notification generation, with options for all signals, bar close only, or once per bar. High-frequency trading strategies benefit from all signals mode, while position traders typically prefer bar close alerts to avoid premature position entries based on intrabar fluctuations.
The alert system generates four distinct notification types: Long Signal alerts when the trend measure crosses above the positive signal threshold, Short Signal alerts for negative threshold crossings, Bull Regime alerts when entering strong bullish conditions, and Bear Regime alerts for strong bearish regime identification.
Table Display and Information Management
The information table provides real-time statistical metrics including current trend value, regime classification, signal status, and filter effectiveness measurements. The table position can be customized for optimal screen real estate utilization, and individual metrics can be toggled based on analytical requirements.
The Language parameter supports both English and German display options for international users, while maintaining consistent calculation methodology regardless of display language selection.
Risk Management Integration
Effective risk management integration requires coordination between the trend measure signals and position sizing algorithms. Strong trend readings (above 0.5 or below -0.5) support larger position sizes due to higher probability of trend continuation, while neutral readings (between -0.2 and 0.2) suggest reduced position sizes or range-trading strategies.
The regime classification system provides additional risk management context, with Strong Bull and Strong Bear regimes supporting trend-following strategies, while Neutral regimes indicate potential for mean reversion approaches. The filter effectiveness metric helps traders assess current market conditions and adjust strategy parameters accordingly.
Timeframe Considerations and Multi-Timeframe Analysis
The indicator's effectiveness varies across different timeframes, with higher timeframes (daily, weekly) providing more reliable trend identification but slower signal generation, while lower timeframes (hourly, 15-minute) offer faster signals with increased noise levels. Multi-timeframe analysis combining trend alignment across multiple periods significantly improves signal quality and reduces false positive rates.
For optimal results, traders should consider trend alignment between the primary trading timeframe and at least one higher timeframe before entering positions. Divergences between timeframes often signal potential trend reversals or consolidation periods requiring strategy adjustment.
Conclusion
The Tzotchev Trend Measure represents a significant advancement in technical analysis methodology, combining rigorous statistical foundations with practical trading applications. Its implementation of the J.P. Morgan research methodology provides institutional-quality trend analysis capabilities previously available only to sophisticated quantitative trading firms.
The comprehensive parameter configuration options enable customization for diverse trading styles and market conditions, while the advanced noise filtering and regime detection capabilities provide superior signal quality compared to traditional trend-following indicators. Proper parameter selection and understanding of the indicator's statistical foundation are essential for achieving optimal trading results and effective risk management.
References
Abramowitz, M. and Stegun, I.A. (1964). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. Washington: National Bureau of Standards.
Ang, A. and Bekaert, G. (2002). Regime Switches in Interest Rates. Journal of Business and Economic Statistics, 20(2), 163-182.
Asness, C.S., Moskowitz, T.J., and Pedersen, L.H. (2013). Value and Momentum Everywhere. Journal of Finance, 68(3), 929-985.
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Fama, E.F. and French, K.R. (1988). Permanent and Temporary Components of Stock Prices. Journal of Political Economy, 96(2), 246-273.
Hurst, B., Ooi, Y.H., and Pedersen, L.H. (2013). Demystifying Managed Futures. Journal of Investment Management, 11(3), 42-58.
Jegadeesh, N. and Titman, S. (2001). Profitability of Momentum Strategies: An Evaluation of Alternative Explanations. Journal of Finance, 56(2), 699-720.
Kaufman, P.J. (2013). Trading Systems and Methods. 5th Edition. Hoboken: John Wiley & Sons.
Moskowitz, T.J., Ooi, Y.H., and Pedersen, L.H. (2012). Time Series Momentum. Journal of Financial Economics, 104(2), 228-250.
Tzotchev, D., Lo, A.W., and Hasanhodzic, J. (2015). Designing robust trend-following system: Behind the scenes of trend-following. J.P. Morgan Quantitative Research, Asset Management Division.
[blackcat] L2 Trend LinearityOVERVIEW
The L2 Trend Linearity indicator is a sophisticated market analysis tool designed to help traders identify and visualize market trend linearity by analyzing price action relative to dynamic support and resistance zones. This powerful Pine Script indicator utilizes the Arnaud Legoux Moving Average (ALMA) algorithm to calculate weighted price calculations and generate dynamic support/resistance zones that adapt to changing market conditions. By visualizing market zones through colored candles and histograms, the indicator provides clear visual cues about market momentum and potential trading opportunities. The script generates buy/sell signals based on zone crossovers, making it an invaluable tool for both technical analysis and automated trading strategies. Whether you're a day trader, swing trader, or algorithmic trader, this indicator can help you identify market regimes, support/resistance levels, and potential entry/exit points with greater precision.
FEATURES
Dynamic Support/Resistance Zones: Calculates dynamic support (bear market zone) and resistance (bull market zone) using weighted price calculations and ALMA smoothing
Visual Market Representation: Color-coded candles and histograms provide immediate visual feedback about market conditions
Smart Signal Generation: Automatic buy/sell signals generated from zone crossovers with clear visual indicators
Customizable Parameters: Four different ALMA smoothing parameters for various timeframes and trading styles
Multi-Timeframe Compatibility: Works across different timeframes from 1-minute to weekly charts
Real-time Analysis: Provides instant feedback on market momentum and trend direction
Clear Visual Cues: Green candles indicate bullish momentum, red candles indicate bearish momentum, and white candles indicate neutral conditions
Histogram Visualization: Blue histogram shows bear market zone (below support), aqua histogram shows bull market zone (above resistance)
Signal Labels: "B" labels mark buy signals (price crosses above resistance), "S" labels mark sell signals (price crosses below support)
Overlay Functionality: Works as an overlay indicator without cluttering the chart with unnecessary elements
Highly Customizable: All parameters can be adjusted to suit different trading strategies and market conditions
HOW TO USE
Add the Indicator to Your Chart
Open TradingView and navigate to your desired trading instrument
Click on "Indicators" in the top menu and select "New"
Search for "L2 Trend Linearity" or paste the Pine Script code
Click "Add to Chart" to apply the indicator
Configure the Parameters
ALMA Length Short: Set the short-term smoothing parameter (default: 3). Lower values provide more responsive signals but may generate more false signals
ALMA Length Medium: Set the medium-term smoothing parameter (default: 5). This provides a balance between responsiveness and stability
ALMA Length Long: Set the long-term smoothing parameter (default: 13). Higher values provide more stable signals but with less responsiveness
ALMA Length Very Long: Set the very long-term smoothing parameter (default: 21). This provides the most stable support/resistance levels
Understand the Visual Elements
Green Candles: Indicate bullish momentum when price is above the bear market zone (support)
Red Candles: Indicate bearish momentum when price is below the bull market zone (resistance)
White Candles: Indicate neutral market conditions when price is between support and resistance zones
Blue Histogram: Shows bear market zone when price is below support level
Aqua Histogram: Shows bull market zone when price is above resistance level
"B" Labels: Mark buy signals when price crosses above resistance
"S" Labels: Mark sell signals when price crosses below support
Identify Market Regimes
Bullish Regime: Price consistently above resistance zone with green candles and aqua histogram
Bearish Regime: Price consistently below support zone with red candles and blue histogram
Neutral Regime: Price oscillating between support and resistance zones with white candles
Generate Trading Signals
Buy Signals: Look for price crossing above the bull market zone (resistance) with confirmation from green candles
Sell Signals: Look for price crossing below the bear market zone (support) with confirmation from red candles
Confirmation: Always wait for confirmation from candle color changes before entering trades
Optimize for Different Timeframes
Scalping: Use shorter ALMA lengths (3-5) for 1-5 minute charts
Day Trading: Use medium ALMA lengths (5-13) for 15-60 minute charts
Swing Trading: Use longer ALMA lengths (13-21) for 1-4 hour charts
Position Trading: Use very long ALMA lengths (21+) for daily and weekly charts
LIMITATIONS
Whipsaw Markets: The indicator may generate false signals in choppy, sideways markets where price oscillates rapidly between support and resistance
Lagging Nature: Like all moving average-based indicators, there is inherent lag in the calculations, which may result in delayed signals
Not a Standalone Tool: This indicator should be used in conjunction with other technical analysis tools and risk management strategies
Market Structure Dependency: Performance may vary depending on market structure and volatility conditions
Parameter Sensitivity: Different markets may require different parameter settings for optimal performance
No Volume Integration: The indicator does not incorporate volume data, which could provide additional confirmation signals
Limited Backtesting: Pine Script limitations may restrict comprehensive backtesting capabilities
Not Suitable for All Instruments: May perform differently on stocks, forex, crypto, and futures markets
Requires Confirmation: Signals should always be confirmed with other indicators or price action analysis
Not Predictive: The indicator identifies current market conditions but does not predict future price movements
NOTES
ALMA Algorithm: The indicator uses the Arnaud Legoux Moving Average (ALMA) algorithm, which is known for its excellent smoothing capabilities and reduced lag compared to traditional moving averages
Weighted Price Calculations: The bear market zone uses (2low + close) / 3, while the bull market zone uses (high + 2close) / 3, providing more weight to recent price action
Dynamic Zones: The support and resistance zones are dynamic and adapt to changing market conditions, making them more responsive than static levels
Color Psychology: The color scheme follows traditional trading psychology - green for bullish, red for bearish, and white for neutral
Signal Timing: The signals are generated on the close of each bar, ensuring they are based on complete price action
Label Positioning: Buy signals appear below the bar (red "B" label), while sell signals appear above the bar (green "S" label)
Multiple Timeframes: The indicator can be applied to multiple timeframes simultaneously for comprehensive analysis
Risk Management: Always use proper risk management techniques when trading based on indicator signals
Market Context: Consider the overall market context and trend direction when interpreting signals
Confirmation: Look for confirmation from other indicators or price action patterns before entering trades
Practice: Test the indicator on historical data before using it in live trading
Customization: Feel free to experiment with different parameter combinations to find what works best for your trading style
THANKS
Special thanks to the TradingView community and the Pine Script developers for creating such a powerful and flexible platform for technical analysis. This indicator builds upon the foundation of the ALMA algorithm and various moving average techniques developed by technical analysis pioneers. The concept of dynamic support and resistance zones has been refined over decades of market analysis, and this script represents a modern implementation of these timeless principles. We acknowledge the contributions of all traders and developers who have contributed to the evolution of technical analysis and continue to push the boundaries of what's possible with algorithmic trading tools.
Fisher Volume Transform | AlphaNattFisher Volume Transform | AlphaNatt
A powerful oscillator that applies the Fisher Transform - converting price into a Gaussian normal distribution - while incorporating volume weighting to identify high-probability reversal points with institutional participation.
"The Fisher Transform reveals what statistics professors have known for decades: when you transform market data into a normal distribution, turning points become crystal clear."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎲 THE MATHEMATICS
Fisher Transform Formula:
The Fisher Transform converts any bounded dataset into a Gaussian distribution:
y = 0.5 × ln((1 + x) / (1 - x))
Where x is normalized price (-1 to 1 range)
Why This Matters:
Market extremes become statistically identifiable
Turning points are amplified and clarified
Removes the skew from price distributions
Creates nearly instantaneous signals at reversals
Volume Integration:
Unlike standard Fisher Transform, this version weights price by relative volume:
High volume moves get more weight
Low volume moves get filtered out
Identifies institutional participation
Reduces false signals from retail chop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 KEY ADVANTAGES
Statistical Edge: Transforms price into normal distribution where extremes are mathematically defined
Volume Confirmation: Only signals with volume support
Early Reversal Detection: Fisher Transform amplifies turning points
Clean Signals: Gaussian distribution reduces noise
No Lag: Mathematical transformation, not averaging
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS OPTIMIZATION
Fisher Period (5-30):
5-9: Very sensitive, many signals
10: Default - balanced sensitivity
15-20: Moderate smoothing
25-30: Major reversals only
Volume Weight (0.1-1.0):
0.1-0.3: Minimal volume influence
0.5-0.7: Balanced price/volume
0.7: Default - strong volume weight
0.8-1.0: Volume dominant
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING SIGNALS
Primary Signals:
Zero Cross Up: Bullish momentum shift
Zero Cross Down: Bearish momentum shift
Signal Line Cross: Early reversal warning
Extreme Readings (±75): Potential reversal zones
Visual Interpretation:
Cyan zones: Bullish momentum
Magenta zones: Bearish momentum
Gradient intensity: Strength of move
Histogram: Raw momentum power
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 OPTIMAL USAGE
Best Market Conditions:
Range-bound markets (reversals clear)
High volume periods
Major support/resistance levels
Divergence hunting
Trading Strategies:
1. Extreme Reversal:
Enter when oscillator exceeds ±75 and reverses
2. Zero Line Momentum:
Trade crosses of zero line with volume confirmation
3. Signal Line Strategy:
Early entry on signal line crosses
4. Divergence Trading:
Price makes new high/low but Fisher doesn't
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Quantitative Trading Systems
Version: 1.0
Classification: Statistical Transform Oscillator
Not financial advice. Always DYOR.
Hilly's Advanced Crypto Scalping Strategy - 5 Min ChartTo determine the "best" input parameters for the Advanced Crypto Scalping Strategy on a 5-minute chart, we need to consider the goals of optimizing for profitability, minimizing false signals, and adapting to the volatile nature of cryptocurrencies. The default parameters in the script are a starting point, but the optimal values depend on the specific cryptocurrency pair, market conditions, and your risk tolerance. Below, I'll provide recommended input values based on common practices in crypto scalping, along with reasoning for each parameter. I’ll also suggest how to fine-tune them using TradingView’s backtesting and optimization tools.
Recommended Input Parameters
These values are tailored for a 5-minute chart for liquid cryptocurrencies like BTC/USD or ETH/USD on exchanges like Binance or Coinbase. They aim to balance signal frequency and accuracy for day trading.
Fast EMA Length (emaFastLen): 9
Reasoning: A 9-period EMA is commonly used in scalping to capture short-term price movements while remaining sensitive to recent price action. It reacts faster than the default 10, aligning with the 5-minute timeframe.
Slow EMA Length (emaSlowLen): 21
Reasoning: A 21-period EMA provides a good balance for identifying the broader trend on a 5-minute chart. It’s slightly longer than the default 20 to reduce noise while confirming the trend direction.
RSI Length (rsiLen): 14
Reasoning: The default 14-period RSI is a standard choice for momentum analysis. It works well for detecting overbought/oversold conditions without being too sensitive on short timeframes.
RSI Overbought (rsiOverbought): 75
Reasoning: Raising the overbought threshold to 75 (from 70) reduces false sell signals in strong bullish trends, which are common in crypto markets.
RSI Oversold (rsiOversold): 25
Reasoning: Lowering the oversold threshold to 25 (from 30) filters out weaker buy signals, ensuring entries occur during stronger reversals.
MACD Fast Length (macdFast): 12
Reasoning: The default 12-period fast EMA for MACD is effective for capturing short-term momentum shifts in crypto, aligning with scalping goals.
MACD Slow Length (macdSlow): 26
Reasoning: The default 26-period slow EMA is a standard setting that works well for confirming momentum trends without lagging too much.
MACD Signal Smoothing (macdSignal): 9
Reasoning: The default 9-period signal line is widely used and provides a good balance for smoothing MACD crossovers on a 5-minute chart.
Bollinger Bands Length (bbLen): 20
Reasoning: The default 20-period Bollinger Bands are effective for identifying volatility breakouts, which are key for scalping in crypto markets.
Bollinger Bands Multiplier (bbMult): 2.0
Reasoning: A 2.0 multiplier is standard and captures most price action within the bands. Increasing it to 2.5 could reduce signals but improve accuracy in highly volatile markets.
Stop Loss % (slPerc): 0.8%
Reasoning: A tighter stop loss of 0.8% (from 1.0%) suits the high volatility of crypto, helping to limit losses on false breakouts while keeping risk manageable.
Take Profit % (tpPerc): 1.5%
Reasoning: A 1.5% take-profit target (from 2.0%) aligns with scalping’s goal of capturing small, frequent gains. Crypto markets often see quick reversals, so a smaller target increases the likelihood of hitting profits.
Use Candlestick Patterns (useCandlePatterns): True
Reasoning: Enabling candlestick patterns (e.g., engulfing, hammer) adds confirmation to signals, reducing false entries in choppy markets.
Use Volume Filter (useVolumeFilter): True
Reasoning: The volume filter ensures signals occur during high-volume breakouts, which are more likely to sustain in crypto markets.
Signal Arrow Size (signalSize): 2.0
Reasoning: Increasing the arrow size to 2.0 (from 1.5) makes buy/sell signals more visible on the chart, especially on smaller screens or volatile price action.
Background Highlight Transparency (bgTransparency): 85
Reasoning: A slightly higher transparency (85 from 80) keeps the background highlights subtle but visible, avoiding chart clutter.
How to Apply These Parameters
Copy the Script: Use the Pine Script provided in the previous response.
Paste in TradingView: Open TradingView, go to the Pine Editor, paste the code, and click "Add to Chart."
Set Parameters: In the strategy settings, manually input the recommended values above or adjust them via the input fields.
Test on a 5-Minute Chart: Apply the strategy to a liquid crypto pair (e.g., BTC/USDT, ETH/USDT) on a 5-minute chart.
Fine-Tuning for Optimal Performance
To find the absolute best parameters for your specific trading pair and market conditions, use TradingView’s Strategy Tester and optimization features:
Backtesting:
Run the strategy on historical data for your chosen pair (e.g., BTC/USDT on Binance).
Check metrics like Net Profit, Profit Factor, Win Rate, and Max Drawdown in the Strategy Tester.
Focus on a sample period of at least 1–3 months to capture various market conditions (bull, bear, sideways).
Parameter Optimization:
In the Strategy Tester, click the settings gear next to the strategy name.
Enable optimization for key inputs like emaFastLen (test range: 7–12), emaSlowLen (15–25), slPerc (0.5–1.5), and tpPerc (1.0–3.0).
Run the optimization to find the combination with the highest net profit or best Sharpe ratio, but avoid over-optimization (curve-fitting) by testing on out-of-sample data.
Market-Specific Adjustments:
Volatile Pairs (e.g., DOGE/USDT): Use tighter stop losses (e.g., 0.5–0.7%) and smaller take-profit targets (e.g., 1.0–1.2%) to account for rapid price swings.
Stable Pairs (e.g., BTC/USDT): Slightly wider stop losses (e.g., 1.0–1.2%) and take-profit targets (e.g., 1.8–2.5%) may work better.
Trending Markets: Increase emaSlowLen (e.g., to 25–30) to follow stronger trends.
Choppy Markets: Tighten bbMult (e.g., to 1.8) and lower rsiOverbought/rsiOversold (e.g., to 70/30) to filter noise.
Forward Testing:
After backtesting, run the strategy in real-time on a demo account for 1–2 weeks to validate performance under current market conditions.
Important Notes
No Universal "Best" Numbers: Optimal parameters vary by crypto pair, exchange, and market conditions (e.g., bull vs. bear market). The suggested values are a starting point based on common scalping practices.
Risk Management: Never risk more than 1–2% of your account per trade. Adjust position sizing in TradingView’s strategy settings to align with your risk tolerance.
Market Volatility: Crypto markets are highly volatile. Test the strategy on your specific pair and adjust parameters if signals are too frequent or too rare.
Not Financial Advice: This is an educational tool. Backtest thoroughly and use a demo account before trading with real funds.
If you want me to generate a chart showing backtest performance for specific parameters or to tweak the script further (e.g., adding more indicators or adjusting signal logic), let me know!can you add clear buy ans sell signs above the candles in this codeTo add clear buy and sell signals above the candles in the provided Pine Script, I'll modify the existing code to include prominent text labels directly above (for sell signals) and below (for buy signals) the candles. These labels will be larger, color-coded, and positioned to avoid clutter, ensuring they are easily visible on the chart. The core strategy logic (EMA, RSI, MACD, Bollinger Bands, candlestick patterns, and volume filter) will remain unchanged, and I'll reuse the same artifact_id since this is an update to the previous script.AdvancedCryptoScalpingStrategy.pinex-pine
4H Weekly Candle Counter (UTC - Dynamic)Counts the 4H Candles on a given trading day. Made specifically for the /ES. (The first 4H Candle opens at 15:00 Sunday-Thursday)
Artharjan ADXArtharjan ADX (AADX) by Rrahul Desai @Artharjan
📌 Overview
The Artharjan ADX (AADX) is an advanced implementation of the Average Directional Index (ADX) with customizable moving averages, momentum thresholds, and visually intuitive grading of bullish and bearish strength.
Unlike the standard ADX indicator that only shows trend strength, AADX adds graded bullish/bearish conditions, alerts, smoothed DI signals, histogram visualizations, and background color fills to help traders quickly interpret market conditions.
It is designed for traders who want early detection of trend strength, clean visual cues, and automated alert triggers for both bullish and bearish momentum setups.
⚙️ Key Features
🔹 Customizable Calculations
DI Length (default 13) – controls sensitivity of directional indicators.
+/- DI Smoothing – smooths DI signals with user-selected MA.
Multiple Moving Average Types – SMA, EMA, WMA, RMA, VWMA, ALMA, Hull, SWMA, SMMA, TMA.
ADX Smoothing – define how smooth/fast the ADX reacts.
🔹 Flexible Display
Toggle between line plots or histogram view.
Adjustable plot thickness.
Option to plot averages of ADX, +DI, -DI for confirmation.
Configurable background fills:
ADX above/below momentum threshold.
ADX rising/falling color shading.
Trend-grade based color intensity.
🔹 Momentum & Thresholds
Momentum Level (default 25) → defines “strong trend” zone.
Crossover Threshold (default 15) → helps detect early DI crossovers.
Color-coded histogram bars for +DI vs -DI difference:
Above/below zero.
Rising/falling momentum.
🔹 Bullish & Bearish Grading System
The indicator assigns grades from 1 to 5 for both bullish and bearish setups, based on DI and ADX conditions:
Bullish Grades
Grade 1 → Very Weak Bullish
Grade 2 → Weak Bullish
Grade 3 → Moderate Bullish
Grade 4 → Strong Bullish
Grade 5 → Very Strong Bullish
Bearish Grades
Grade 1 → Very Weak Bearish
Grade 2 → Weak Bearish
Grade 3 → Moderate Bearish
Grade 4 → Strong Bearish
Grade 5 → Very Strong Bearish
Labels are automatically plotted above bars to indicate the active grade.
🔹 Alerts
Bullish Alert → when +DI crosses above its average below the threshold OR bullish conditions are met.
Bearish Alert → when -DI crosses above its average below the threshold OR bearish conditions are met.
These alerts make it possible to automate trading signals for scalping, intraday, and swing trading.
📊 Use Cases
Trend Strength Measurement
Spot when markets shift from range-bound to trending.
Confirm the reliability of breakouts with strong ADX readings.
Bullish vs Bearish Control
Compare +DI vs -DI strength to gauge trend direction.
Identify trend reversals early with DI slope changes.
Momentum Confirmation
Use ADX rising + DI grades to validate trade entries.
Filter false breakouts with weak ADX.
Trade Grading System
Enter aggressively on Grade 4–5 signals.
Stay cautious on Grade 1–2 signals.
Automated Alerts & Screening
Combine AADX alerts with strategy rules.
Build scanners to highlight strong ADX setups across multiple stocks.
🎯 Trader’s Advantage
More powerful than standard ADX → Adds slope, grading, alerts, and visualization.
Adaptable to any style → Works for intraday scalping, swing trading, and positional analysis.
Visual clarity → Color fills, histograms, and labels simplify decision-making.
Customizable smoothing → Adjusts to fast or slow markets.
✅ Closing Note
The Artharjan ADX (AADX) transforms the traditional ADX into a complete trend and momentum analyzer. It helps traders detect, confirm, and act on directional strength with clarity and confidence.
With Thanks,
Rrahul Desai
@Artharjan
Sunset Zones by PDVDescription
Sunset Zones by PDV is an intraday reference indicator that plots key horizontal levels based on selected “root candles” throughout the trading day. At each programmed time, the indicator identifies the high and low of the corresponding candle and projects those levels forward with extended lines, providing traders with a clean visual framework of potential intraday reaction zones.
These zones serve as reference levels for support, resistance, liquidity grabs, and session context, allowing traders to analyze how price reacts around time-specific structures. Unlike lagging indicators, Sunset Zones gives traders real-time, rule-based levels tied directly to the price action of specific moments in the session.
Key Features
Predefined Time Codes
The script comes with a curated list of intraday timestamps (in HHMM format). Each represents a “root candle” from which levels are generated. Examples include 03:12, 06:47, 07:41, 08:51, etc. These time codes can reflect historically important market moments such as session opens, liquidity sweeps, or volatility inflection points.
Automatic Zone Plotting
At each root time, the script captures the candle’s high and low and instantly extends those levels forward across the chart. This provides consistent, objective reference points for intraday trading.
Extended Lines
Levels are projected far into the future (default: 500 bars) so traders can easily track how price interacts with those zones throughout the day.
Color-Coded Levels
Each root time is assigned a distinct color for fast identification. For example:
03:12 → Fuchsia
06:47 → Purple
07:41 → Teal
08:51 → White
09:53 → White
10:20 → Orange
11:10 → Green
11:49 → Red
12:05 → White
13:05 → Teal
14:09 → Aqua
This helps traders quickly recognize which time-of-day level price is interacting with.
Lightweight & Visual
The indicator focuses purely on price and time, avoiding complexity or lagging signals. It can be layered with other analysis tools, order flow charts, or session-based studies.
Practical Use Cases
Intraday Bias:
Observe whether price respects, rejects, or consolidates around these reference levels to form a bias.
Liquidity Zones:
High/low sweeps of the root candle can act as liquidity pools where institutions might trigger stops or reversals.
Support & Resistance:
Extended lines create intraday S/R zones without the need to manually draw levels.
Confluence Finder:
Combine Sunset Zones with VWAP, session ranges, Fibonacci levels, or higher-timeframe structure for layered confluence.
Important Notes
This is a visual reference tool only. It does not generate buy or sell signals.
Default times are provided, but the concept is flexible — traders can adapt it by modifying or expanding the list of time codes.
Works best on intraday timeframes where session structure is most relevant (e.g., 1-minute to 15-minute charts).
✅ In short: Sunset Zones by PDV gives intraday traders a systematic way to anchor their charts to important time-based highs and lows, creating a consistent framework for analyzing price reactions across the day.
Optimized ADX DI CCI Strategy### Key Features:
- Combines ADX, DI+/-, CCI, and RSI for signal generation.
- Supports customizable timeframes for indicators.
- Offers multiple exit conditions (Moving Average cross, ADX change, performance-based stop-loss).
- Tracks and displays trade statistics (e.g., win rate, capital growth, profit factor).
- Visualizes trades with labels and optional background coloring.
- Allows countertrading (opening an opposite trade after closing one).
1. **Indicator Calculation**:
- **ADX and DI+/-**: Calculated using the `ta.dmi` function with user-defined lengths for DI and ADX smoothing.
- **CCI**: Computed using the `ta.cci` function with a configurable source (default: `hlc3`) and length.
- **RSI (optional)**: Calculated using the `ta.rsi` function to filter overbought/oversold conditions.
- **Moving Averages**: Used for CCI signal smoothing and trade exits, with support for SMA, EMA, SMMA (RMA), WMA, and VWMA.
2. **Signal Generation**:
- **Buy Signal**: Triggered when DI+ > DI- (or DI+ crosses over DI-), CCI > MA (or CCI crosses over MA), and optional ADX/RSI filters are satisfied.
- **Sell Signal**: Triggered when DI+ < DI- (or DI- crosses over DI+), CCI < MA (or CCI crosses under MA), and optional ADX/RSI filters are satisfied.
3. **Trade Execution**:
- **Entry**: Long or short trades are opened using `strategy.entry` when signals are detected, provided trading is allowed (`allow_long`/`allow_short`) and equity is positive.
- **Exit**: Trades can be closed based on:
- Opposite signal (if no other exit conditions are used).
- MA cross (price crossing below/above the exit MA for long/short trades).
- ADX percentage change exceeding a threshold.
- Performance-based stop-loss (trade loss exceeding a percentage).
- **Countertrading**: If enabled, closing a trade triggers an opposite trade (e.g., closing a long opens a short).
4. **Visualization**:
- Labels are plotted at trade entries/exits (e.g., "BUY," "SELL," arrows).
- Optional background coloring highlights open trades (green for long, red for short).
- A statistics table displays real-time metrics (e.g., capital, win rates).
5. **Trade Tracking**:
- Tracks the number of long/short trades, wins, and overall performance.
- Monitors equity to prevent trading if it falls to zero.
### 2.3 Key Components
- **Indicator Calculations**: Uses `request.security` to fetch indicator data for the specified timeframe.
- **MA Function**: A custom `ma_func` handles different MA types for CCI and exit conditions.
- **Signal Logic**: Combines crossover/under checks with recent bar windows for flexibility.
- **Exit Conditions**: Multiple configurable exit strategies for risk management.
- **Statistics Table**: Updates dynamically with trade and capital metrics.
## 3. Configuration Options
The script provides extensive customization through input parameters, grouped for clarity in the TradingView settings panel. Below is a detailed breakdown of each setting and its impact.
### 3.1 Strategy Settings (Global)
- **Initial Capital**: Default `10000`. Sets the starting capital for backtesting.
- **Effect**: Determines the base equity for calculating position sizes and performance metrics.
- **Default Quantity Type**: `strategy.percent_of_equity` (50% of equity).
- **Effect**: Controls the size of each trade as a percentage of available equity.
- **Pyramiding**: Default `2`. Allows up to 2 simultaneous trades in the same direction.
- **Effect**: Enables multiple entries if conditions are met, increasing exposure.
- **Commission**: 0.2% per trade.
- **Effect**: Simulates trading fees, reducing net profit in backtesting.
- **Margin**: 100% for long and short trades.
- **Effect**: Assumes no leverage; adjust for margin trading simulations.
- **Calc on Every Tick**: `true`.
- **Effect**: Ensures real-time signal updates for precise execution.
### 3.2 Indicator Settings
- **Indicator Timeframe** (`indicator_timeframe`):
- **Options**: `""` (chart timeframe), `1`, `5`, `15`, `30`, `60`, `240`, `D`, `W`.
- **Default**: `""` (uses chart timeframe).
- **Effect**: Determines the timeframe for ADX, DI, CCI, and RSI calculations. A higher timeframe reduces noise but may delay signals.
### 3.3 ADX & DI Settings
- **DI Length** (`adx_di_len`):
- **Default**: `30`.
- **Range**: Minimum `1`.
- **Effect**: Sets the period for calculating DI+ and DI-. Longer periods smooth trends but reduce sensitivity.
- **ADX Smoothing Length** (`adx_smooth_len`):
- **Default**: `14`.
- **Range**: Minimum `1`.
- **Effect**: Smooths the ADX calculation. Longer periods produce smoother ADX values.
- **Use ADX Filter** (`use_adx_filter`):
- **Default**: `false`.
- **Effect**: If `true`, requires ADX to exceed the threshold for signals to be valid, filtering out weak trends.
- **ADX Threshold** (`adx_threshold`):
- **Default**: `25`.
- **Range**: Minimum `0`.
- **Effect**: Sets the minimum ADX value for valid signals when the filter is enabled. Higher values restrict trades to stronger trends.
### 3.4 CCI Settings
- **CCI Length** (`cci_length`):
- **Default**: `20`.
- **Range**: Minimum `1`.
- **Effect**: Sets the period for CCI calculation. Longer periods reduce noise but may lag.
- **CCI Source** (`cci_src`):
- **Default**: `hlc3` (average of high, low, close).
- **Effect**: Defines the price data for CCI. `hlc3` is standard, but users can choose other sources (e.g., `close`).
- **CCI MA Type** (`ma_type`):
- **Options**: `SMA`, `EMA`, `SMMA (RMA)`, `WMA`, `VWMA`.
- **Default**: `SMA`.
- **Effect**: Determines the moving average type for CCI signal smoothing. EMA is more responsive; VWMA weights by volume.
- **CCI MA Length** (`ma_length`):
- **Default**: `14`.
- **Range**: Minimum `1`.
- **Effect**: Sets the period for the CCI MA. Longer periods smooth the MA but may delay signals.
### 3.5 RSI Filter Settings
- **Use RSI Filter** (`use_rsi_filter`):
- **Default**: `false`.
- **Effect**: If `true`, applies RSI-based overbought/oversold filters to signals.
- **RSI Length** (`rsi_length`):
- **Default**: `14`.
- **Range**: Minimum `1`.
- **Effect**: Sets the period for RSI calculation. Longer periods reduce sensitivity.
- **RSI Lower Limit** (`rsi_lower_limit`):
- **Default**: `30`.
- **Range**: `0` to `100`.
- **Effect**: Defines the oversold threshold for buy signals. Lower values allow trades in more extreme conditions.
- **RSI Upper Limit** (`rsi_upper_limit`):
- **Default**: `70`.
- **Range**: `0` to `100`.
- **Effect**: Defines the overbought threshold for sell signals. Higher values allow trades in more extreme conditions.
### 3.6 Signal Settings
- **Cross Window** (`cross_window`):
- **Default**: `0`.
- **Range**: `0` to `5` bars.
- **Effect**: Specifies the lookback period for detecting DI+/- or CCI crosses. `0` requires crosses on the current bar; higher values allow recent crosses, increasing signal frequency.
- **Allow Long Trades** (`allow_long`):
- **Default**: `true`.
- **Effect**: Enables/disables new long trades. If `false`, only closing existing longs is allowed.
- **Allow Short Trades** (`allow_short`):
- **Default**: `true`.
- **Effect**: Enables/disables new short trades. If `false`, only closing existing shorts is allowed.
- **Require DI+/DI- Cross for Buy** (`buy_di_cross`):
- **Default**: `true`.
- **Effect**: If `true`, requires a DI+ crossover DI- for buy signals; if `false`, DI+ > DI- is sufficient.
- **Require CCI Cross for Buy** (`buy_cci_cross`):
- **Default**: `true`.
- **Effect**: If `true`, requires a CCI crossover MA for buy signals; if `false`, CCI > MA is sufficient.
- **Require DI+/DI- Cross for Sell** (`sell_di_cross`):
- **Default**: `true`.
- **Effect**: If `true`, requires a DI- crossover DI+ for sell signals; if `false`, DI+ < DI- is sufficient.
- **Require CCI Cross for Sell** (`sell_cci_cross`):
- **Default**: `true`.
- **Effect**: If `true`, requires a CCI crossunder MA for sell signals; if `false`, CCI < MA is sufficient.
- **Countertrade** (`countertrade`):
- **Default**: `true`.
- **Effect**: If `true`, closing a trade triggers an opposite trade (e.g., close long, open short) if allowed.
- **Color Background for Open Trades** (`color_background`):
- **Default**: `true`.
- **Effect**: If `true`, colors the chart background green for long trades and red for short trades.
### 3.7 Exit Settings
- **Use MA Cross for Exit** (`use_ma_exit`):
- **Default**: `true`.
- **Effect**: If `true`, closes trades when the price crosses the exit MA (below for long, above for short).
- **MA Length for Exit** (`ma_exit_length`):
- **Default**: `20`.
- **Range**: Minimum `1`.
- **Effect**: Sets the period for the exit MA. Longer periods delay exits.
- **MA Type for Exit** (`ma_exit_type`):
- **Options**: `SMA`, `EMA`, `SMMA (RMA)`, `WMA`, `VWMA`.
- **Default**: `SMA`.
- **Effect**: Determines the MA type for exit signals. EMA is more responsive; VWMA weights by volume.
- **Use ADX Change Stop-Loss** (`use_adx_stop`):
- **Default**: `false`.
- **Effect**: If `true`, closes trades when the ADX changes by a specified percentage.
- **ADX % Change for Stop-Loss** (`adx_change_percent`):
- **Default**: `5.0`.
- **Range**: Minimum `0.0`, step `0.1`.
- **Effect**: Specifies the percentage change in ADX (vs. previous bar) that triggers a stop-loss. Higher values reduce premature exits.
- **Use Performance Stop-Loss** (`use_perf_stop`):
- **Default**: `false`.
- **Effect**: If `true`, closes trades when the loss exceeds a percentage threshold.
- **Performance Stop-Loss (%)** (`perf_stop_percent`):
- **Default**: `-10.0`.
- **Range**: `-100.0` to `0.0`, step `0.1`.
- **Effect**: Specifies the loss percentage that triggers a stop-loss. More negative values allow larger losses before exiting.
## 4. Visual and Statistical Output
- **Labels**: Displayed at trade entries/exits with arrows (↑ for buy, ↓ for sell) and text ("BUY," "SELL"). A "No Equity" label appears if equity is zero.
- **Background Coloring**: Optionally colors the chart background (green for long, red for short) to indicate open trades.
- **Statistics Table**: Displayed at the top center of the chart, updated on timeframe changes or trade events. Includes:
- **Capital Metrics**: Initial capital, current capital, capital growth (%).
- **Trade Metrics**: Total trades, long/short trades, win rate, long/short win rates, profit factor.
- **Open Trade Status**: Indicates if a long, short, or no trade is open.
## 5. Alerts
- **Buy Signal Alert**: Triggered when `buy_signal` is true ("Cross Buy Signal").
- **Sell Signal Alert**: Triggered when `sell_signal` is true ("Cross Sell Signal").
- **Usage**: Users can set up TradingView alerts to receive notifications for trade signals.
Renko RSI (Brick-Triggered, Red/Green Only) MODIFIEDhe Renko RSI (Brick-Triggered, Red/Green Only) Modified indicator is a specialized trading tool designed for use with Renko charts, which focus solely on price movements rather than time. This modified version enhances the traditional Renko RSI by triggering signals based on brick formations (price blocks) and uses only red and green colors to indicate trend direction—green for bullish (upward) trends and red for bearish (downward) trends. It integrates the Relative Strength Index (RSI) to identify potential reversals or continuations when Renko bricks change direction, filtering out market noise for clearer trend analysis. The indicator is tailored to highlight high-probability entry and exit points, making it suitable for traders seeking a simplified, visual approach to spotting trends and reversals, especially on assets like crypto on short timeframes such as 15-minute or 1-hour charts.
Smart Structure Breaks & Order BlocksOverview (What it does)
The indicator “Smart Structure Breaks & Order Blocks” detects market structure using swing highs and lows, identifies Break of Structure (BOS) events, and automatically draws order blocks (OBs) from the origin candle. These zones extend to the right and change color/outline when mitigated or invalidated. By formalizing and automating part of discretionary analysis, it provides consistent zone recognition.
Main Components
Swing Detection: ta.pivothigh/ta.pivotlow identify confirmed swing points.
BOS Detection: Determines if the recent swing high/low is broken by close (strict mode) or crossover.
OB Creation: After a BOS, the opposite candle (bearish for bullish BOS, bullish for bearish BOS) is used to generate an order block zone.
Zone Management: Limits the number of zones, extends them to the right, and tracks tagged (mitigated) or invalidated states.
Input Parameters
Left/Right Pivot (default 6/6): Number of bars required on each side to confirm a swing. Higher values = smoother swings.
Max Zones (default 4): Maximum zones stored per direction (bull/bear). Oldest zones are overwritten.
Zone Confirmation Lookback (default 3): Ensures OB origin candle validity by checking recent highs/lows.
Show Swing Points (default ON): Displays triangles on swing highs/lows.
Require close for BOS? (default ON): Strict BOS (close required) vs loose BOS (line crossover).
Use candle body for zones (default OFF): Zones drawn from candle body (ON) or wick (OFF).
Signal Definition & Logic
Swing Updates: Latest confirmed pivots update lastHighLevel / lastLowLevel.
BOS (Break of Structure):
Bullish – close breaks last swing high.
Bearish – close breaks last swing low.
Only one valid BOS per swing (avoids duplicates).
OB Detection:
Bullish BOS → previous bearish candle with lowest low forms the OB.
Bearish BOS → previous bullish candle with highest high forms the OB.
Zones: Bull = green, Bear = red, semi-transparent, extended to the right.
Zone States:
Mitigated: Price touches the zone → border highlighted.
Invalidated:
Bull zone → close below → turns red.
Bear zone → close above → turns green.
Chart Appearance
Swing High: red triangle above bar
Swing Low: green triangle below bar
Bull OB: green zone (border highlighted on touch)
Bear OB: red zone (border highlighted on touch)
Invalid Zones: Bull zones turn reddish, Bear zones turn greenish
Practical Use (Trading Assistance)
Trend Following Entries: Buy pullbacks into green OBs in uptrends, sell rallies into red OBs in downtrends.
Focus on First Touch: First mitigation after BOS often has higher reaction probability.
Confluence: Combine with higher timeframe trend, volume, session levels, key price levels (previous highs/lows, VWAP, etc.).
Stops/Targets:
Bull – stop below zone, partial take profit at swing high or resistance.
Bear – stop above zone, partial take profit at swing low or support.
Parameter Tuning (per market/timeframe)
Pivot (6/6 → 4/4/8/8): Lower for scalping (3–5), medium for day trading (5–8), higher for swing trading (8–14). Increase to reduce noise.
Strict Break: ON to reduce false breaks in ranging markets; OFF for earlier signals.
Body Zones: ON for assets with long wicks, OFF for cleaner OBs in liquid instruments.
Zone Confirmation (default 3): Increase for stricter OB origin, fewer zones.
Max Zones (default 4 → 6–10): Increase for higher volatility, decrease to avoid clutter.
Strengths
Standardizes BOS and OB detection that is usually subjective.
Tracks mitigation and invalidation automatically.
Adaptable: allows body/wick zone switching for different instruments.
Limitations
Pivot-based: Signals appear only after pivots confirm (slight lag).
Zones reflect past balance: Can fail after new events (news, earnings, macro data).
Range-heavy markets: More false BOS; consider stricter settings.
Backtesting: This script is for drawing/visual aid; trading rules must be defined separately.
Workflow Example
Identify higher timeframe trend (4H/Daily).
On lower TF (15–60m), wait for BOS and new OB.
Enter on first mitigation with confirmation candle.
Stop beyond zone; targets based on R multiples and swing points.
FAQ
Q: Why are zones invalidated quickly?
A: Flow reversal after BOS. Adjust pivots higher, enable Strict mode, or switch to Body zones to reduce noise.
Q: What does “tagged” mean?
A: Price touched the zone once = mitigated. Implies some orders in that zone may have been filled.
Q: Body or Wick zones?
A: Wick zones are fine in clean markets. For volatile pairs with long wicks, body zones provide more realistic areas.
Customization Tips (Code perspective)
Zone storage: Currently ring buffer ((idx+1) % zoneLimit). Could prioritize keeping unmitigated zones.
Automated testing: Add strategy.entry/exit for rule-based backtests.
Multi-timeframe: Use request.security() for higher timeframe swings/BOS.
Visualization: Add labels for BOS bars, tag zones with IDs, count touches.
Summary
This indicator formalizes the cycle Swing → BOS → OB creation → Mitigation/Invalidation, providing consistent structure analysis and zone tracking. By tuning sensitivity and strictness, and combining with higher timeframe context, it enhances pullback/continuation trading setups. Always combine with proper risk management.
RSI Multi Time FrameWhat it is
A clean, two-layer RSI that shows your chart-timeframe RSI together with a higher-timeframe (HTF) RSI on the same pane. The HTF line is drawn as a live segment plus frozen “steps” for each completed HTF bar, so you can see where the higher timeframe momentum held during your lower-timeframe bars.
How it works
Auto HTF mapping (when “Auto” is selected):
Intraday < 30m → uses 60m (1-hour) RSI
30m ≤ tf < 240m (4h) → uses 240m (4-hour) RSI
240m ≤ tf < 1D → uses 1D RSI
1D → uses 1W RSI
1W or 2W → uses 1M RSI
≥ 1M → keeps the same timeframe
The HTF series is requested with request.security(..., gaps_off, lookahead_off), so values are confirmed bar-by-bar. When a new HTF bar begins, the previous value is “frozen” as a horizontal segment; the current HTF value is shown by a short moving segment and a small dot (so you can read the last value easily).
Visuals
Current RSI (chart TF): solid line (color/width configurable).
HTF RSI: same-pane line + tiny circle for the latest value; historical step segments show completed HTF bars.
Guides: dashed 70 / 30 bands, dotted 60/40 helpers, dashed 50 midline.
Inputs
Higher Time Frame: Auto or a fixed TF (1, 3, 5, 10, 15, 30, 45, 60, 120, 180, 240, 360, 480, 720, D, W, 2W, M, 3M, 6M, 12M).
Length: RSI period (default 14).
Source: price source for RSI.
RSI / HTF RSI colors & widths.
Number of HTF RSI Bars: how many frozen HTF segments to keep.
Reading it
Alignment: When RSI (current TF) and HTF RSI both push in the same direction, momentum is aligned across frames.
Divergence across frames: Current RSI failing to confirm HTF direction can warn about chops or early slowdowns.
Zones: 70/30 boundaries for classic overbought/oversold; 60/40 can be used as trend bias rails; 50 is the balance line.
This is a context indicator, not a signal generator. Combine with your entry/exit rules.
Notes & limitations
HTF values do not repaint after their bar closes (lookahead is off). The short “live” segment will evolve until the HTF bar closes — this is expected.
Very small panels or extremely long histories may impact performance if you keep a large number of HTF segments.
Credits
Original concept by LonesomeTheBlue; Pine v6 refactor and auto-mapping rules by trading_mura.
Suggested use
Day traders: run the indicator on 5–15m and keep HTF on Auto to see 1h/4h momentum.
Swing traders: run it on 1h–4h and watch the daily HTF.
Position traders: run on daily and watch the weekly HTF.
If you find it useful, a ⭐ helps others discover it.
ADX Tide ZonesADX Tide Zones – Adaptive Momentum & Trend Strength Framework
Overview
ADX Tide Zones – Professional is a dynamic trend-strength visualizer designed for traders who want to interpret momentum with precision and context. By combining the Average Directional Index (ADX) with adaptive threshold logic, the indicator segments price action into distinct “tide zones” that reflect varying levels of market strength: Calm, Rising, Strong, and Falling Tides. These zones transform raw ADX readings into an interpretable framework that highlights when markets are consolidating, building momentum, trending strongly, or losing strength.
Unlike standard ADX readings, which can be difficult to interpret in real time, ADX Tide Zones translate momentum shifts into a continuous, color-coded system that traders can instantly read. Whether applied to scalping, intraday, or swing trading, the indicator offers a consistent methodology for identifying actionable opportunities across assets and timeframes.
How It Works
The foundation of ADX Tide Zones lies in momentum analysis via the ADX. By measuring the strength (not direction) of a trend, ADX provides an objective read on when markets are gaining or losing energy. ADX Tide Zones enhances this by applying threshold logic to classify ADX values into four distinct states:
Calm Tide : Low ADX values indicate sideways or consolidating conditions.
Rising Tide : ADX increases past a threshold, signaling momentum building.
Strong Tide : ADX remains elevated, confirming robust and sustained trend strength.
Falling Tide : ADX declines after strength, hinting at exhaustion or early reversal setups.
These states are displayed on the chart through adaptive visualizations (zones, bar colors, or overlays), offering real-time clarity on when to expect expansion, continuation, or contraction in price action.
Interpretation
Trend Analysis : By mapping transitions between tides, traders can instantly gauge whether markets are in accumulation, expansion, or exhaustion phases. Rising/Strong Tides reinforce trend continuation, while Falling Tides highlight weakening conditions.
Volatility & Risk Assessment : Shifts between Calm → Rising Tide often precede volatility expansions. Falling Tides can signal a period of compression or corrective moves, warning traders to manage risk proactively.
Market Context : The indicator does not dictate direction; instead, it overlays strength on top of price action, allowing traders to combine it with directional tools such as moving averages, order blocks, or liquidity zones for confirmation.
Strategy Integration
ADX Tide Zones adapts seamlessly to a wide range of trading strategies by translating momentum dynamics into actionable frameworks:
Trend Following : Traders can align with dominant flows by entering positions when the indicator confirms a Rising Tide or Strong Tide. These conditions signal persistent directional strength, making them ideal for continuation setups. Combining directional bias with ADX confirmation reduces the risk of trading against prevailing momentum.
Breakout Trading : When the market transitions from Calm Tide into a Rising Tide, it often precedes a volatility expansion. This shift highlights breakout conditions where accumulation gives way to impulsive price movement. Traders can use this transition as a timing tool to catch early entries into new momentum phases.
Exhaustion Reversals : Strong Tide phases don’t last forever—when they begin to fade into Falling Tide, it can mark trend fatigue or liquidity exhaustion. This offers contrarian traders an early edge in spotting overextended moves and positioning for corrective pullbacks or full reversals.
Multi-Timeframe Analysis : By overlaying higher timeframe tide zones on intraday or scalping charts, traders can filter noise and trade in alignment with larger flows. For example, combining a daily Rising Tide bias with a 15-minute breakout confirmation can significantly improve entry precision while reducing exposure to false signals.
Advanced Techniques
For traders seeking an extra edge, ADX Tide Zones can be pushed further with advanced methods:
Volume & Liquidity Confirmation : Pair the tide transitions with volume spikes, order flow, or liquidity sweep tools. When directional strength confirmed by the ADX coincides with institutional activity, it validates setups and increases probability of follow-through.
Cross-Asset Synchronization : Momentum rarely exists in isolation. Monitoring tide shifts across correlated instruments (e.g., majors vs. USD, or indices vs. risk assets) can uncover synchronized volatility events. These correlations help traders identify whether a move is isolated noise or part of a broader systemic trend.
Threshold Optimization : The sensitivity of ADX Tide Zones can be fine-tuned for different trading objectives. Lower thresholds heighten responsiveness, capturing micro-moves suitable for scalpers. Higher thresholds filter minor fluctuations, isolating major structural swings that align with swing or position trading.
Contextual Trade Management : Instead of using static stops or targets, traders can adapt risk management dynamically by tracking tide progression. For example, a trade initiated during Rising Tide may remain valid as long as conditions sustain, but partial profits or tighter stops can be applied once the zone shifts to Calm Tide.
Inputs & Customization
ADX Length : Define the lookback period for ADX calculation.
Threshold Levels : Adjust sensitivity for Calm, Rising, Strong, and Falling Tides.
Zone Visualization : Choose between bar coloring, background shading, or overlays.
Color Customization : Configure bullish, bearish, neutral, and tide-specific colors.
Multi-Timeframe Options : Enable tide readings from higher timeframes for confirmation.
Why Use ADX Tide Zones
ADX Tide Zones turns the complexity of momentum analysis into a visual system that highlights when markets are gearing up for moves, trending with conviction, or running out of steam. By combining adaptive ADX interpretation with customizable thresholds, traders can:
Anticipate breakouts before volatility expands.
Confirm the strength behind price trends.
Spot exhaustion phases early to secure profits or prepare for reversals.
Adapt strategies seamlessly between scalping, intraday, and swing trading.
With its balance of simplicity and depth, ADX Tide Zones provides a structured lens for reading market momentum, equipping traders with the clarity needed to execute with discipline and confidence.
Pivot Points mura visionWhat it is
A clean, single-set pivot overlay that lets you choose the pivot type (Traditional/Fibonacci), the anchor timeframe (Daily/Weekly/Monthly/Quarterly, or Auto), and fully customize colors, line width/style , and labels . The script never draws duplicate sets—exactly one pivot pack is displayed for the chosen (or auto-detected) anchor.
How it works
Pivots are computed with ta.pivot_point_levels() for the selected anchor timeframe .
The script supports the standard 7 levels: P, R1/S1, R2/S2, R3/S3 .
Lines span exactly one anchor period forward from the current bar time.
Label suffix shows the anchor source: D (Daily), W (Weekly), M (Monthly), Q (Quarterly).
Auto-anchor logic
Intraday ≤ 15 min → Daily pivots (D)
Intraday 20–120 min → Weekly pivots (W)
Intraday > 120 min (3–4 h) → Monthly pivots (M)
Daily and above → Quarterly pivots (Q)
This keeps the chart readable while matching the most common trader expectations across timeframes.
Inputs
Pivot Type — Traditional or Fibonacci.
Pivots Timeframe — Auto, Daily (1D), Weekly (1W), Monthly (1M), Quarterly (3M).
Line Width / Line Style — width 1–10; style Solid, Dashed, or Dotted.
Show Labels / Show Prices — toggle level tags and price values.
Colors — user-selectable colors for P, R*, S* .
How to use
Pick a symbol/timeframe.
Leave Pivots Timeframe = Auto to let the script choose; or set a fixed anchor if you prefer.
Toggle labels and prices to taste; adjust line style/width and colors for your theme.
Read the market like a map:
P often acts as a mean/rotation point.
R1/S1 are common first reaction zones; R2/S2 and R3/S3 mark stronger extensions.
Confluence with S/R, trendlines, session highs/lows, or volume nodes improves context.
Good practices
Use Daily pivots for intraday scalps (≤15m).
Use Weekly/Monthly for swing bias on 1–4 h.
Use Quarterly when analyzing on Daily and higher to frame larger cycles.
Combine with trend filters (e.g., EMA/KAMA 233) or volatility tools for entries and risk.
Notes & limitations
The script shows one pivot pack at a time by design (prevents clutter and duplicates).
Historical values follow TradingView’s standard pivot definitions; results can vary across assets/exchanges.
No alerts are included (levels are static within the anchor period).
Day Range Breakout Strategy + Trend Structure Filter🚀 Enhanced Strategy for Breaking Previous Day’s Extremes with Market Structure-Based Trend
The strategy focuses on breakouts of previous day’s highs and lows, filtered by trend direction based on market structure.
🔑 Key Improvements
1️⃣ Solved the repainting issue.
There are similar strategies in the community, but the historical results of those algorithms do not correspond to the results of real backtesting.
2️⃣ Added a trend filter.
In most cases, this makes it possible to achieve higher profitability. It works as follows:
The script determines market structure based on a defined number of previous candles.
If there are higher highs and higher lows, this is considered an uptrend structure.
If there are lower highs and lower lows, this is considered a downtrend structure.
The trend filter is adjusted using the Lookback Period setting.
3️⃣ Choice of entry principle.
Implemented the ability to choose whether trades are opened based on closing prices or by high/low breakout, which allows finding the optimal settings for a specific instrument.
4️⃣ Improved entry/exit logic.
When an opposite signal appears, before entering a trade, the script first closes the previous position.
✅ This makes the strategy fully ready for algorithmic trading via webhook on any exchange that supports this function.
5️⃣ Better visualization.
🟥 Red and 🟩 green backgrounds indicate the trend direction.
⚙️ How It Works
The principle of the strategy as follows:
Wait for the breakout of the previous day’s high or low.
Enter long on a breakout of the high, or short on a breakout of the low in the market structure trend direction.
Exit occurs on the breakout of the opposite extreme.
📈 This allows capturing long trends.
⚠️ But, like all similar strategies, in a sideways market it produces losing trades.
⚙️ Default Settings
Breakout Confirmation:
The breakout is determined by the candle close.
You can also choose high/low, but this often gives more false signals. However, on some assets, it may show higher profitability in backtesting.
Trend Structure Period:
The default value is 15.
This means the script analyzes the last 15 candles on the selected timeframe to determine market structure as described above.
Position Size:
Fixed at $1,000, which is 1% of the initial capital of $100,000 to keep risks under control.
Commission:
Set to 0.1%, which is sufficient for most cryptocurrency exchanges.
Slippage:
Configured at 1 tick.
Funding Note:
Keep in mind that funding is not included in this strategy.
It’s impossible to predict whether it will be positive or negative, and it can vary significantly across exchanges, so it is not part of the default settings.
🕒 Recommended Settings
Timeframe: 1H and higher
On lower timeframes → significant discrepancies may occur between historical and real backtesting data.
On higher timeframes → minor differences are possible, related to slippage, sharp moves, and other unpredictable situations.
⚠️ Important Notes
Always remember: Strategy results may not repeat in the future.
The market constantly changes, so:
✅ Monitor the situation
✅ Backtest regularly
✅ Adjust settings for each asset
Also remember about possible bugs in any algorithmic trading strategy.
Even if a script is well-tested, no one knows what unpredictable events the market may bring tomorrow.
⚠️ Risk Management:
Do not risk more than 1% of your deposit per trade, otherwise you may lose your account balance, since this strategy works without stop losses.
⚠️ Disclaimer
The author of the strategy does not encourage anyone to use this algorithm and bears no responsibility for any possible financial losses resulting from its application!
Any decision to use this strategy is made personally by the owners of TradingView accounts and cryptocurrency exchange accounts.
📝 Final Notes
This is not the final version. I already have ideas on how to improve it further, so follow me to not miss updates.
🐞 Bug Reports
If you notice any bugs or inconsistencies in my algorithm,
please let me know — I will try to fix them as quickly as possible.
💬 Feedback & Suggestions
If you have any ideas on how this or any of my other strategies can be improved, feel free to write to me. I will try to implement your suggestions in the script.
Wishing everyone good luck and stable profits! 🚀💰
BTC Macro Composite Global liquidity Index -OffsetThis indicator is based on the thesis that Bitcoin price movements are heavily influenced by macro liquidity trends. It calculates a weighted composite index based on the following components:
• Global Liquidity (41%): Sum of central bank balance sheets (Fed , ECB , BoJ , and PBoC ), adjusted to USD.
• Investor Risk Appetite (22%): Derived from the Copper/Gold ratio, inverse VIX (as a risk-on signal), and the spread between High Yield and Investment Grade bonds (HY vs IG OAS).
• Gold Sensitivity (15–20%): Combines the XAUUSD price with BTC/Gold ratio to reflect the historical influence of gold on Bitcoin pricing.
Each component is normalized and then offset forward by 90 days to attempt predictive alignment with Bitcoin’s price.
The goal is to identify macro inflection points with high predictive value for BTC. It is not a trading signal generator but rather a macro trend context indicator.
❗ Important: This script should be used with caution. It does not account for geopolitical shocks, regulatory events, or internal BTC market structure (e.g., miner behavior, on-chain metrics).
💡 How to use:
• Use on the 1D timeframe.
• Look for divergences between BTC price and the macro index.
• Apply in confluence with other technical or fundamental frameworks.
🔍 Originality:
While similar components exist in macro dashboards, this script combines them uniquely using time-forward offsets and custom weighting specifically tailored for BTC behavior.
Liquidity Sweep ReversalOverview
The Liquidity Sweep Reversal indicator is a sophisticated intraday trading tool designed to identify high-probability reversal opportunities after liquidity sweeps occur at key market levels. Based on Smart Money Concepts (SMC) and Institutional Order Flow analysis, this indicator helps traders catch market reversals when stop-loss clusters are hunted.
Key Features
🎯 Multi-Level Liquidity Analysis
Previous Day High/Low (PDH/PDL) detection
Previous Week High/Low (PWH/PWL) tracking
Session highs/lows for Asian, London, and New York markets
Real-time level validation and usage tracking
⚡ Advanced Signal Generation
CISD (Change In State of Delivery) detection algorithm
Engulfing pattern recognition at key levels
Liquidity sweep confirmation system
Directional bias filtering to avoid false signals
⏰ Kill Zone Integration
Pre-configured optimal trading windows
Asian Kill Zone (20:00-00:00 EST)
London Kill Zone (02:00-05:00 EST)
New York AM/PM Kill Zones (08:30-11:00 & 13:30-16:00 EST)
Optional kill zone-only trading mode
🛠 Customization Options
Multiple timezone support (NY, London, Tokyo, Shanghai, UTC)
Flexible HTF (Higher Time Frame) selection
Adjustable signal sensitivity
Visual customization for all levels and signals
Hide historical signals option for cleaner charts
How It Works
The indicator continuously monitors price action around key liquidity levels
When price sweeps liquidity (stop-loss hunting), it marks potential reversal zones
Confirmation signals are generated through CISD or engulfing patterns
Trade signals appear as arrows with color-coded candles for easy identification
Best Suited For
Intraday traders focusing on 1m to 15m timeframes
Smart Money Concepts (SMC) practitioners
Scalpers looking for high-probability reversal entries
Traders who understand liquidity and market structure
Usage Tips
Works best on liquid forex pairs and major indices
Combine with volume analysis for stronger confirmation
Use proper risk management - not all signals will be winners
Monitor higher timeframe bias for better accuracy
==============================================
日内流动性掠夺反向开单指标
指标简介
这是一款基于Smart Money概念(SMC)开发的高级日内交易指标,专门用于识别市场在关键价格水平扫除流动性后的反转机会。通过分析机构订单流和流动性分布,帮助交易者精准捕捉止损扫单后的市场反转点。
核心功能
多维度流动性分析
前日高低点(PDH/PDL)自动标记
前周高低点(PWH/PWL)动态跟踪
亚洲、伦敦、纽约三大交易时段高低点识别
关键位使用状态实时监控,避免重复信号
智能信号系统
CISD(Change In State of Delivery)算法检测
关键位吞没形态识别
流动性扫除确认机制
方向过滤系统,大幅降低虚假信号
黄金交易时段
内置Kill Zone时间窗口
支持亚洲、伦敦、纽约AM/PM四个黄金时段
可选择仅在Kill Zone内交易
时区智能切换,全球交易者适用
个性化设置
支持多时区切换(纽约/伦敦/东京/上海/UTC)
HTF周期自动适配或手动选择
信号灵敏度可调
所有图表元素均可自定义样式
历史信号隐藏功能,保持图表整洁
适用人群
日内短线交易者(1分钟-15分钟)
SMC交易体系践行者
追求高胜率反转入场的投机者
理解流动性和市场结构的专业交易者
使用建议
推荐用于主流加密货币、外汇对和股指期货
配合成交量分析效果更佳
严格止损,理性对待每个信号
关注更高时间框架的趋势方向
风险提示: 任何技术指标都不能保证100%准确,请结合自己的交易系统和风险管理使用。
Market Pulse Dip RadarThis indicator is designed to help traders spot meaningful dips in price and then evaluate whether those dips are worth trading or not. It doesn’t just mark a dip; it also helps with risk management, trade planning, and filtering out weak signals.
Here’s how it works:
First, it looks at the recent high price and checks how much the market has dropped from that high. If the drop is larger than the minimum percentage you set, it marks it as a potential dip.
Next, it checks the trend structure by using two moving averages (a fast one and a slow one). If the fast average is below the slow average, it means the market is in a weaker structure, and that dip is considered more valid.
On top of that, you can enable a multi-timeframe filter. For example, if you are trading on the 15-minute chart, you can ask the indicator to confirm that the 1-hour trend is also supportive before showing you a dip. This helps avoid trading against the bigger trend.
Risk management is built in. The indicator automatically suggests a stop-loss by combining volatility (ATR) and recent swing lows. It then draws three profit target levels (1x risk, 2x risk, and 3x risk). This makes it easier to plan where to exit if the trade works.
A key part of this tool is the confidence score. Each dip signal is rated from 0 to 100. The score depends on how deep the dip is, how far apart the moving averages are, how healthy volatility is, and whether the higher timeframe supports the trade. The score is then labeled as High, Medium, Low, or Wait. This helps traders focus only on the stronger setups.
On the chart, dip signals are marked with a diamond shape under the bars. The color of the diamond tells you if it’s high, medium, or low quality. When a signal appears, the indicator also plots horizontal lines for the entry, stop, and targets.
To make it easier to read, there is also a dashboard box that shows the current score, quality, dip percentage, and suggested stop-loss. This means you don’t have to calculate or check different things yourself – everything is visible in one place.
Finally, it comes with alerts. You can set alerts for when a dip signal happens, or when it’s medium or high confidence. This way, you don’t need to stare at charts all day; TradingView can notify you.
So in short, this tool:
• Finds dips based on your rules.
• Filters them using structure, volatility, and higher timeframe trend.
• Suggests stop-loss and profit targets.
• Rates each dip with a confidence score.
• Shows all this info in a clean dashboard and alerts you when it happens.
👉 Do you want me to now explain how a trader would actually use it in practice (step by step, from signal to trade)?
Gamma Blast StrategyGamma Blast Strategy used for quick 2-5 ticks on Buys, but on a sideways market can get up to 15-20 ticks.
Moon Scalper v3 + VSAMoon Scalper v3 is a high-precision scalping indicator optimized for the 15-minute chart. It delivers clean buy/sell signals with TP1 (1:1 risk-reward) exits using layered confirmations:
• **Volatility Bands** — SMA + multiplier detect expansion zones
• **EMA Filter (200)** — ensures trades align with trend
• **RSI Range Filter** — avoids extreme overbought/oversold traps (buy: 52–62, sell: 38–48)
• **Volume Spike Filter** — filters for institutional activity (vol > 1.4×SMA)
• **VSA Confirmation** — requires wide-spread, high-volume bars with reclaim (volume × 1.4, spread × 1.5, reclaim 50%)
**Usage Notes:**
Best used on 15m timeframe for liquid pairs (e.g., BTCUSDT, ETHUSDT). Signals appear as “BUY” / “SELL” labels on chart. Defaults yield high TP1 hit rate; use only during active sessions (e.g., London/NY) for best accuracy.
**Disclaimer:**
This indicator is for educational purposes only. Past performance is not a guarantee of future results. Always backtest before live trading and manage risk responsibly.
J12Matic Builder by galgoomA flexible Renko/tick strategy that lets you choose between two entry engines (Multi-Source 3-way or QBand+Moneyball), with a unified trailing/TP exit engine, NY-time trading windows with auto-flatten, daily profit/loss and trade-count limits (HALT mode), and clean webhook routing using {{strategy.order.alert_message}}.
Highlights
Two entry engines
Multi-Source (3): up to three long/short sources with Single / Dual / Triple logic and optional lookback.
QBand + Moneyball: Gate → Trigger workflow with timing windows, OR/AND trigger modes, per-window caps, optional same-bar fire.
Unified exit engine: Trailing by Bricks or Ticks, plus optional static TP/SL.
Session control (NY time): Evening / Overnight / NY Session windows; auto-flatten at end of any enabled window.
Day controls: Profit/Loss (USD) and Trade-count limits. When hit, strategy HALTS new entries, shows an on-chart label/background.
Alert routing designed for webhooks: Every order sets alert_message= so you can run alerts with:
Condition: this strategy
Notify on: Order fills only
Message: {{strategy.order.alert_message}}
Default JSONs or Custom payloads: If a Custom field is blank, a sensible default JSON is sent. Fill a field to override.
How to set up alerts (the 15-second version)
Create a TradingView alert with this strategy as Condition.
Notify on: Order fills only.
Message: {{strategy.order.alert_message}} (exactly).
If you want your own payloads, paste them into Inputs → 08) Custom Alert Payloads.
Leave blank → the strategy sends a default JSON.
Fill in → your text is sent as-is.
Note: Anything you type into the alert dialog’s Message box is ignored except the {{strategy.order.alert_message}} token, which forwards the payload supplied by the strategy at order time.
Publishing notes / best practices
Renko users: Make sure “Renko Brick Size” in Inputs matches your chart’s brick size exactly.
Ticks vs Bricks: Exit distances switch instantly when you toggle Exit Units.
Same-bar flips: If enabled, a new opposite signal will first close the open trade (with its exit payload), then enter the new side.
HALT mode: When day profit/loss limit or trade-count limit triggers, new entries are blocked for the rest of the session day. You’ll see a label and a soft background tint.
Session end flatten: Auto-closes positions at window ends; these exits use the “End of Session Window Exit” payload.
Bar magnifier: Strategy is configured for on-close execution; you can enable Bar Magnifier in Properties if needed.
Default JSONs (used when a Custom field is empty)
Open: {"event":"open","side":"long|short","symbol":""}
Close: {"event":"close","side":"long|short|flat","reason":"tp|sl|flip|session|limit_profit|limit_loss","symbol":""}
You can paste any text/JSON into the Custom fields; it will be forwarded as-is when that event occurs.
Input sections — user guide
01) Entries & Signals
Entry Logic: Choose Multi-Source (3) or QBand + Moneyball (pick one).
Enable Long/Short Signals: Master on/off switches for entering long/short.
Flip on opposite signal: If enabled, a new opposite signal will close the current position first, then open the other side.
Signal Logic (Multi-Source):
Single: any 1 of the 3 sources > 0
Dual: Source1 AND Source2 > 0
Triple (default): 1 AND 2 AND 3 > 0
Long/Short Signal Sources 1–3: Provide up to three series (often indicators). A positive value (> 0) is treated as a “pulse”.
Use Lookback: Keeps a source “true” for N bars after it pulses (helps catch late triggers).
Long/Short Lookback (bars): How many bars to remember that pulse.
01b) QBands + Moneyball (Gate -> Trigger)
Allow same-bar Gate->Trigger: If ON, a trigger can fire on the same bar as the gate pulse.
Trigger must fire within N bars after Gate: Size of the gate window (in bars).
Max signals per window (0 = unlimited): Cap the number of entries allowed while a gate window is open.
Buy/Sell Source 1 – Gate: Gate pulse sources that open the buy/sell window (often a regime/zone, e.g., QBands bull/bear).
Trigger Pulse Mode (Buy/Sell): How to detect a trigger pulse from the trigger sources (Change / Appear / Rise>0 / Fall<0).
Trigger A/B sources + Extend Bars: Primary/secondary triggers plus optional extension to persist their pulse for N bars.
Trigger Mode: Pick S2 only, S3 only, S2 OR S3, or S2 AND S3. AND mode remembers both pulses inside the window before firing.
02) Exit Units (Trailing/TP)
Exit Units: Choose Bricks (Renko) or Ticks. All distances below switch accordingly.
03) Tick-based Trailing / Stops (active when Exit Units = Ticks)
Initial SL (ticks): Starting stop distance from entry.
Start Trailing After (ticks): Start trailing once price moves this far in your favor.
Trailing Distance (ticks): Offset of the trailing stop from peak/trough once trailing begins.
Take Profit (ticks): Optional static TP distance.
Stop Loss (ticks): Optional static SL distance (overrides trailing if enabled).
04) Brick-based Trailing / Stops (active when Exit Units = Bricks)
Renko Brick Size: Must match your chart’s brick size.
Initial SL / Start Trailing After / Trailing Distance (bricks): Same definitions as tick mode, measured in bricks.
Take Profit / Stop Loss (bricks): Optional static distances.
05) TP / SL Switch
Enable Static Take Profit: If ON, closes the trade at the fixed TP distance.
Enable Static Stop Loss (Overrides Trailing): If ON, trailing is disabled and a fixed SL is used.
06) Trading Windows (NY time)
Use Trading Windows: Master toggle for all windows.
Evening / Overnight / NY Session: Define each session in NY time.
Flatten at End of : Auto-close any open position when a window ends (sends the Session Exit payload).
07) Day Controls & Limits
Enable Profit Limits / Profit Limit (Dollars): When daily net PnL ≥ limit → auto-flatten and HALT.
Enable Loss Limits / Loss Limit (Dollars): When daily net PnL ≤ −limit → auto-flatten and HALT.
Enable Trade Count Limits / Number of Trades Allowed: After N entries, HALT new entries (does not auto-flatten).
On-chart HUD: A label and soft background tint appear when HALTED; a compact status table shows Day PnL, trade count, and mode.
08) Custom Alert Payloads (used as strategy.order.alert_message)
Long/Short Entry: Payload sent on entries (if blank, a default open JSON is sent).
Regular Long/Short Exit: Payload sent on closes from SL/TP/flip (if blank, a default close JSON is sent).
End of Session Window Exit: Payload sent when any enabled window ends and positions are flattened.
Profit/Loss/Trade Limit Close: Payload sent when daily profit/loss limit causes auto-flatten.
Tip: Any tokens you include here are forwarded “as is”. If your downstream expects variables, do the substitution on the receiver side.
Known limitations
No bracket orders from Pine: This strategy doesn’t create OCO/attached brackets on the broker; it simulates exits with strategy logic and forwards your payloads for external automation.
alert_message is per order only: Alerts fire on order events. General status pings aren’t sent unless you wire a separate indicator/alert.
Renko specifics: Backtests on synthetic Renko can differ from live execution. Always forward-test on your instrument and settings.
Quick checklist before you publish
✅ Brick size in Inputs matches your Renko chart
✅ Exit Units set to Bricks or Ticks as you intend
✅ Day limits/Windows toggled as you want
✅ Custom payloads filled (or leave blank to use defaults)
✅ Your alert uses Order fills only + {{strategy.order.alert_message}}