OPEN-SOURCE SCRIPT
SOT & SA Detector Pro

SOT & SA Detector Pro- Advanced Reversal Pattern Recognition
OVERVIEW
The SOT & SA Detector is an educational indicator designed to identify potential market reversal points through systematic analysis of candlestick patterns, volume confirmation, and price wave structures. SOT (Shorting of Thrust) signals suggest potential bearish reversals after upward price movements, while SA (Selling Accumulation) signals indicate possible bullish reversals following downward trends. This tool helps traders recognize key market transition points by combining multiple technical criteria for enhanced signal reliability.
═══════════════════════════════════════════════════════════════
HOW IT WORKS
Technical Methodology
The indicator employs a multi-factor analysis approach that evaluates:
Wave Structure Analysis: Identifies minimum 2-bar directional waves (upward for SOT, downward for SA)
Price Delta Validation: Ensures closing price changes remain within specified percentage thresholds (default 0.3%) best 0.1.
Candlestick Tail Analysis: Measures rejection wicks using configurable tail multipliers
Volume Confirmation: Requires increased volume compared to previous periods
Pattern Confirmation: Validates signals through subsequent price action
Signal Generation Process
Pattern Recognition: Scans for qualifying candlestick formations with appropriate tail characteristics
Volume Verification: Confirms patterns with volume expansion using adjustable multiplier
Price Confirmation: Validates signals when price breaks and closes beyond pattern extremes
Signal Display: Places labeled markers and draws horizontal reference levels
Mathematical Foundation
Delta calculation: math.abs(close[1] - close[2]) / close[2] <= deltaPercent / 100
Tail analysis: (high[1] - close[1]) >= tailMultiplier * (close[1] - low[1]) for SOT
Volume filter: volume[1] >= volume[2] * volumeFactor
═══════════════════════════════════════════════════════════════
KEY FEATURES
Dual Pattern Recognition: Identifies both bullish (SA) and bearish (SOT) reversal candidates
Volume Integration: Incorporates volume analysis for enhanced signal validation
Customizable Parameters: Adjustable wave length, delta percentage, tail multiplier, and volume factor
Visual Clarity: Color-coded bar highlighting, labeled signals, and horizontal reference levels
Time-Based Filtering: Configurable analysis period to focus on recent market activity
Non-Repainting Signals: Confirmed signals remain stable and do not change with new price data
Alert System: Built-in notifications for both initial signals and subsequent confirmations
═══════════════════════════════════════════════════════════════
HOW TO USE
Signal Interpretation
Red SOT Labels: Appear above potential bearish reversal candles with downward-pointing markers
Green SA Labels: Display below potential bullish reversal candles with upward-pointing markers
Horizontal Lines: Extend from signal levels to provide ongoing reference points
Bar Coloring: Highlights qualifying pattern candles for visual emphasis
Trading Application
This indicator serves as an educational tool for pattern recognition and should be used in conjunction with additional analysis methods. Consider SOT signals as potential areas of selling pressure following upward moves, while SA signals may indicate buying interest after downward price action.
Best Practices
Combine with trend analysis and support/resistance levels
Consider overall market context and timeframe alignment
Use proper risk management techniques
Validate signals with additional technical indicators
═══════════════════════════════════════════════════════════════
SETTINGS
Analysis Days (Default: 20)
Controls the lookback period for signal detection. Higher values extend historical analysis while lower values focus on recent activity.
Minimum Bars in Wave (Default: 2)
Sets the minimum consecutive bars required to establish directional wave patterns. Increase for stronger trend confirmation.
Max Close Change % (Default: 0.3) best 0.1.
Defines acceptable closing price variation between consecutive bars. Lower values require tighter price consolidation.
Tail Multiplier (Default: 1.0) best 1.5 or more.
Adjusts sensitivity for candlestick tail analysis. Higher values require more pronounced rejection wicks.
Volume Factor (Default: 1.0)
Sets volume expansion threshold compared to previous period. Values above 1.0 require volume increases.
═══════════════════════════════════════════════════════════════
LIMITATIONS
Market Conditions
May produce false signals in highly volatile or low-volume conditions
Effectiveness varies across different market environments and timeframes
Requires sufficient volume data for optimal performance
Signal Timing
Signals appear after pattern completion, not in real-time during formation
Confirmation signals depend on subsequent price action
Historical signals do not guarantee future market behavior
Technical Constraints
Limited to analyzing price and volume data only
Does not incorporate fundamental analysis or external market factors
Performance may vary significantly across different trading instruments
═══════════════════════════════════════════════════════════════
IMPORTANT DISCLAIMERS
This indicator is designed for educational purposes and technical analysis learning. It does not constitute financial advice, investment recommendations, or trading signals. Past performance does not guarantee future results. Trading involves substantial risk of loss, and this tool should be used alongside proper risk management techniques and additional analysis methods.
Always conduct thorough analysis using multiple indicators and consider market context before making trading decisions. The SOT & SA patterns represent potential reversal points but do not guarantee price direction changes.
═══════════════════════════════════════════════════════════════
Credits: Original concept and Pine Script implementation by Everyday_Trader_X
Version: Pine Script v6 compatible
Category: Technical Analysis / Reversal Detection
Overlay: Yes (displays on price chart)
OVERVIEW
The SOT & SA Detector is an educational indicator designed to identify potential market reversal points through systematic analysis of candlestick patterns, volume confirmation, and price wave structures. SOT (Shorting of Thrust) signals suggest potential bearish reversals after upward price movements, while SA (Selling Accumulation) signals indicate possible bullish reversals following downward trends. This tool helps traders recognize key market transition points by combining multiple technical criteria for enhanced signal reliability.
═══════════════════════════════════════════════════════════════
HOW IT WORKS
Technical Methodology
The indicator employs a multi-factor analysis approach that evaluates:
Wave Structure Analysis: Identifies minimum 2-bar directional waves (upward for SOT, downward for SA)
Price Delta Validation: Ensures closing price changes remain within specified percentage thresholds (default 0.3%) best 0.1.
Candlestick Tail Analysis: Measures rejection wicks using configurable tail multipliers
Volume Confirmation: Requires increased volume compared to previous periods
Pattern Confirmation: Validates signals through subsequent price action
Signal Generation Process
Pattern Recognition: Scans for qualifying candlestick formations with appropriate tail characteristics
Volume Verification: Confirms patterns with volume expansion using adjustable multiplier
Price Confirmation: Validates signals when price breaks and closes beyond pattern extremes
Signal Display: Places labeled markers and draws horizontal reference levels
Mathematical Foundation
Delta calculation: math.abs(close[1] - close[2]) / close[2] <= deltaPercent / 100
Tail analysis: (high[1] - close[1]) >= tailMultiplier * (close[1] - low[1]) for SOT
Volume filter: volume[1] >= volume[2] * volumeFactor
═══════════════════════════════════════════════════════════════
KEY FEATURES
Dual Pattern Recognition: Identifies both bullish (SA) and bearish (SOT) reversal candidates
Volume Integration: Incorporates volume analysis for enhanced signal validation
Customizable Parameters: Adjustable wave length, delta percentage, tail multiplier, and volume factor
Visual Clarity: Color-coded bar highlighting, labeled signals, and horizontal reference levels
Time-Based Filtering: Configurable analysis period to focus on recent market activity
Non-Repainting Signals: Confirmed signals remain stable and do not change with new price data
Alert System: Built-in notifications for both initial signals and subsequent confirmations
═══════════════════════════════════════════════════════════════
HOW TO USE
Signal Interpretation
Red SOT Labels: Appear above potential bearish reversal candles with downward-pointing markers
Green SA Labels: Display below potential bullish reversal candles with upward-pointing markers
Horizontal Lines: Extend from signal levels to provide ongoing reference points
Bar Coloring: Highlights qualifying pattern candles for visual emphasis
Trading Application
This indicator serves as an educational tool for pattern recognition and should be used in conjunction with additional analysis methods. Consider SOT signals as potential areas of selling pressure following upward moves, while SA signals may indicate buying interest after downward price action.
Best Practices
Combine with trend analysis and support/resistance levels
Consider overall market context and timeframe alignment
Use proper risk management techniques
Validate signals with additional technical indicators
═══════════════════════════════════════════════════════════════
SETTINGS
Analysis Days (Default: 20)
Controls the lookback period for signal detection. Higher values extend historical analysis while lower values focus on recent activity.
Minimum Bars in Wave (Default: 2)
Sets the minimum consecutive bars required to establish directional wave patterns. Increase for stronger trend confirmation.
Max Close Change % (Default: 0.3) best 0.1.
Defines acceptable closing price variation between consecutive bars. Lower values require tighter price consolidation.
Tail Multiplier (Default: 1.0) best 1.5 or more.
Adjusts sensitivity for candlestick tail analysis. Higher values require more pronounced rejection wicks.
Volume Factor (Default: 1.0)
Sets volume expansion threshold compared to previous period. Values above 1.0 require volume increases.
═══════════════════════════════════════════════════════════════
LIMITATIONS
Market Conditions
May produce false signals in highly volatile or low-volume conditions
Effectiveness varies across different market environments and timeframes
Requires sufficient volume data for optimal performance
Signal Timing
Signals appear after pattern completion, not in real-time during formation
Confirmation signals depend on subsequent price action
Historical signals do not guarantee future market behavior
Technical Constraints
Limited to analyzing price and volume data only
Does not incorporate fundamental analysis or external market factors
Performance may vary significantly across different trading instruments
═══════════════════════════════════════════════════════════════
IMPORTANT DISCLAIMERS
This indicator is designed for educational purposes and technical analysis learning. It does not constitute financial advice, investment recommendations, or trading signals. Past performance does not guarantee future results. Trading involves substantial risk of loss, and this tool should be used alongside proper risk management techniques and additional analysis methods.
Always conduct thorough analysis using multiple indicators and consider market context before making trading decisions. The SOT & SA patterns represent potential reversal points but do not guarantee price direction changes.
═══════════════════════════════════════════════════════════════
Credits: Original concept and Pine Script implementation by Everyday_Trader_X
Version: Pine Script v6 compatible
Category: Technical Analysis / Reversal Detection
Overlay: Yes (displays on price chart)
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.