PROTECTED SOURCE SCRIPT
Main Street Break and Retest Scalp

Key Features:
1. Dynamic Zones:
- Resistance zones from swing highs (red)
- Support zones from swing lows (green)
- Zone width based on ATR (automatically adapts to volatility)
2. Signal Logic:
- Buy Signal: Price breaks resistance > retests zone > closes bullishly
- Sell Signal: Price breaks support > retests zone > closes bearishly
3. Visual Elements:
- Solid line: Zone boundary
- Dashed line: Retest level
- Semi-transparent fill: Zone area
- Green/Red labels: Entry signals
4. Customization Options:
- Adjust swing sensitivity (left/right bars)
- Modify zone tolerance (ATR multiplier)
- Set max retest period (1-20 bars)
- Control zone display length
### How to Use:
1. Apply to Chart
2. Wait for price to break through a colored zone
3. Watch for retest of the zone (price touching dashed line)
4. Enter on bullish/bearish close with confirmation label
### Optimization Tips:
- For day trading: Reduce leftBars/rightBars to 2-3
- For swing trading: Increase maxRetestBars to 30-50
- In high volatility: Increase ATR multiplier to 0.7-1.0
1. Volume Pressure Filter:
- Added two new inputs: Volume MA Length (default 20) and Volume Multiplier (default 1.5)
- Signals now require volume to be greater than Volume Multiplier times the moving average volume
- Only candles with above-average volume will generate signals
2. Signal Logic Enhancement:
- Volume filter applied at both detection points:
- During retest confirmation
- At final signal generation
- Maintained original break/retest logic while adding volume confirmation
3. Visual Improvements:
- Updated indicator name to reflect volume filtering
- Cleaner signal labels with "BUY"/"SELL" text
### How the Volume Filter Works:
1. Calculates a moving average of volume (default 20 periods)
2. Defines "sufficient volume" as current volume > (volume MA × multiplier)
3. Requires this volume condition to be true on the retest candle:
- For buys: Volume surge when price retests broken resistance as support
- For sells: Volume surge when price retests broken support as resistance
This modification significantly reduces low-quality signals by ensuring only high-conviction price moves with supporting volume generate trade signals. The original zone identification and retest logic remains unchanged, preserving the core strategy while adding volume confirmation.
1. Dynamic Zones:
- Resistance zones from swing highs (red)
- Support zones from swing lows (green)
- Zone width based on ATR (automatically adapts to volatility)
2. Signal Logic:
- Buy Signal: Price breaks resistance > retests zone > closes bullishly
- Sell Signal: Price breaks support > retests zone > closes bearishly
3. Visual Elements:
- Solid line: Zone boundary
- Dashed line: Retest level
- Semi-transparent fill: Zone area
- Green/Red labels: Entry signals
4. Customization Options:
- Adjust swing sensitivity (left/right bars)
- Modify zone tolerance (ATR multiplier)
- Set max retest period (1-20 bars)
- Control zone display length
### How to Use:
1. Apply to Chart
2. Wait for price to break through a colored zone
3. Watch for retest of the zone (price touching dashed line)
4. Enter on bullish/bearish close with confirmation label
### Optimization Tips:
- For day trading: Reduce leftBars/rightBars to 2-3
- For swing trading: Increase maxRetestBars to 30-50
- In high volatility: Increase ATR multiplier to 0.7-1.0
1. Volume Pressure Filter:
- Added two new inputs: Volume MA Length (default 20) and Volume Multiplier (default 1.5)
- Signals now require volume to be greater than Volume Multiplier times the moving average volume
- Only candles with above-average volume will generate signals
2. Signal Logic Enhancement:
- Volume filter applied at both detection points:
- During retest confirmation
- At final signal generation
- Maintained original break/retest logic while adding volume confirmation
3. Visual Improvements:
- Updated indicator name to reflect volume filtering
- Cleaner signal labels with "BUY"/"SELL" text
### How the Volume Filter Works:
1. Calculates a moving average of volume (default 20 periods)
2. Defines "sufficient volume" as current volume > (volume MA × multiplier)
3. Requires this volume condition to be true on the retest candle:
- For buys: Volume surge when price retests broken resistance as support
- For sells: Volume surge when price retests broken support as resistance
This modification significantly reduces low-quality signals by ensuring only high-conviction price moves with supporting volume generate trade signals. The original zone identification and retest logic remains unchanged, preserving the core strategy while adding volume confirmation.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
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.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
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.