PROTECTED SOURCE SCRIPT

FVG vertical

23
Created by Alphaomega18
🎯 What is an FVG (Fair Value Gap)?
A Fair Value Gap is a price imbalance created by a mismatch between buyers and sellers, formed by 3 consecutive candles where:

Bullish FVG: The low of the current candle is above the high of the candle 2 periods ago
Bearish FVG: The high of the current candle is below the low of the candle 2 periods ago

⚙️ Indicator Settings
Display Group:

Show Bullish vertical FVG: Display bullish vertical FVGs (green) ✅
Show Bearish vertical FVG: Display bearish vertical FVGs (red) ✅
Box Extension (bars): Zone extension duration (1-50 bars, default: 10)
Show Labels: Display labels with gap size 🏷️
Remove When Filled: Automatically remove filled zones ✅

📊 Visual Elements
FVG Zones:

🟢 Green = Bullish vertical FVG (potential support zone)
🔴 Red = Bearish vertical FVG (potential resistance zone)

Labels:

Show gap size in points
Positioned at the beginning of each zone

Dashboard (top right corner):

Real-time count of active FVGs
🟢 = Number of bullish vertical FVGs
🔴 = Number of bearish vertical FVGs

Candle Coloring:

Light green background = Candle forming a bullish vertical FVG
Light red background = Candle forming a bearish vertical FVG

🎯 How to Use the Indicator
1. Installation:

Open TradingView
Click "Indicators" at the top of the chart
Search for "FVG Clean" or paste the code in the Pine Editor

2. Trading Strategies:
Support/Resistance:

Bullish vertical FVGs act as support zones
Bearish vertical FVGs act as resistance zones
Price tends to return to "fill" these gaps

Position Entries:

Long: Wait for a return to a bullish vertical FVG + confirmation
Short: Wait for a return to a bearish vertical FVG + confirmation

Position Management:

Place stops below/above FVGs
Use FVGs as price targets
A filled FVG loses its validity

🔔 Alerts
The indicator includes 2 configurable alert types:

Bullish vertical FVG: Triggers when a new bullish vertical FVG forms
Bearish vertical FVG: Triggers when a new bearish vertical FVG forms

To configure: Right-click on chart → "Add Alert" → Select desired alert
💡 Usage Tips
✅ Do:

Combine with other indicators (volume, momentum)
Wait for confirmation before entering
Use across multiple timeframes
Respect your risk management

❌ Don't:

Trade solely on FVGs without confirmation
Ignore the overall market trend
Overload your chart with too many zones

🔧 Parameter Optimization
Scalping (1-5min):

Box Extension: 5-10 bars
Remove When Filled: Enabled

Day Trading (15min-1H):

Box Extension: 10-20 bars
Remove When Filled: Enabled

Swing Trading (4H-Daily):

Box Extension: 20-50 bars
Remove When Filled: As preferred

📈 Performance

Maximum 100 FVGs of each type in memory
Automatic removal of oldest ones
Optimized to not slow down your chart
Compatible with all markets and timeframes

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.