PROTECTED SOURCE SCRIPT
RED-E Market Structure (Pro V2)

RED-E Market Structure - Comprehensive Technical Analysis System
⚠️ EDUCATIONAL TOOL - NO GUARANTEES
This indicator is designed for educational purposes to help traders learn technical analysis concepts. It does not predict future price movements or guarantee profitable trades. Trading involves substantial risk of loss.
═══════════════════════════════════════════════════════════════
📊 WHAT THIS INDICATOR DOES
This indicator combines multiple standard technical analysis methods into a unified system for analyzing market structure, momentum, volume dynamics, and key price levels. Rather than adding 10 separate indicators to your chart, this consolidates related information into one cohesive interface where each component informs the others.
═══════════════════════════════════════════════════════════════
🔧 TECHNICAL METHODOLOGY - HOW IT WORKS
1️⃣ MOMENTUM CANDLE COLORING (6 Levels)
Calculation Method:
- Compares close vs EMA(9) and EMA(21)
- Applies RSI(14) thresholds for strength
- Color codes: Royal Blue (strongest bull) → Cyan → Green → Yellow → Orange → Red (strongest bear) → White (neutral)
Formula Logic:
IF close > EMA(9) AND close > EMA(21) AND close > open:
RSI > 70 = Level 3 Bull (Royal Blue)
RSI 60-70 = Level 2 Bull (Cyan)
RSI < 60 = Level 1 Bull (Green)
Purpose: Visualizes momentum strength by combining trend (EMAs), candle direction, and overbought/oversold conditions (RSI).
2️⃣ ENTRY SIGNAL LABELS
Calculation Method:
- Uses EMA alignment: EMA(9) > EMA(21) > EMA(50) for bullish
- Filters RSI to avoid extremes
- Requires confirming candle
BUY Signal Logic:
IF close > EMA(9) AND RSI between 40-70 AND EMA(9) > EMA(21) > EMA(50) AND close > open
THEN: Display "BUY" label
Purpose: Identifies potential entries when multiple trend and momentum conditions align. This is standard multi-confirmation technical analysis.
3️⃣ VOLUME DELTA PERCENTAGE
Calculation Method:
FOR each bar in lookback period (default 20):
IF close > open: add volume to bullish_volume
IF close < open: add volume to bearish_volume
bullish_percent = (bullish_volume / total_volume) × 100
Purpose: Quantifies buying vs selling pressure as percentages. Shows if volume supports the current trend.
Display: "🟢65.3% | 🔴34.7%" in dashboard
4️⃣ PRE-MARKET HIGH/LOW TRACKING
Calculation Method:
1. Detect pre-market session (4:00-9:30 AM ET)
2. Track highest high during pre-market
3. Track lowest low during pre-market
4. Draw horizontal lines when market opens
Purpose: Pre-market levels often act as support/resistance during regular hours. This automates their tracking and visualization.
5️⃣ OPENING RANGE BREAKOUT (ORB)
Calculation Method:
1. User sets start time (default 9:30 AM) and duration (default 15 min)
2. Track highest high and lowest low during this period
3. Draw box and extend lines
Purpose: The opening range breakout is a well-documented day trading strategy. First X minutes establish a range, and breakouts often signal directional moves.
6️⃣ SUPPORT/RESISTANCE TRENDLINES
Calculation Method:
1. Identify pivot highs: ta.pivothigh(high, 5, 5)
2. Identify pivot lows: ta.pivotlow(low, 5, 5)
3. Connect last two pivot highs = Resistance (red)
4. Connect last two pivot lows = Support (blue)
Purpose: Automatically connects significant pivot points. Based on standard pivot analysis where price respects these levels.
7️⃣ GAMMA ZONE DETECTION
Calculation Method:
1. Calculate 30-min range: (high - low)
2. Calculate 10-period SMA of range
3. Calculate ratio: current_range / average_range
IF ratio < (1.0 / sensitivity): HIGH GAMMA = Low volatility
IF ratio > (1.0 × sensitivity): LOW GAMMA = High volatility
Purpose: Approximates options gamma effects. High gamma = dealers hedge more = suppressed volatility. Low gamma = less hedging = potential explosive moves.
8️⃣ TAKE PROFIT LEVELS (5 Levels + ATR Stop Loss)
Calculation Method:
LONG: TP = entry_price × (1 + percentage/100)
SHORT: TP = entry_price × (1 - percentage/100)
Stop Loss (ATR): entry ± (ATR(14) × multiplier)
Purpose: Automatically calculates percentage-based targets and volatility-adjusted stops. ATR adapts stop to current market conditions.
9️⃣ THE STRAT PATTERN RECOGNITION
Calculation Method:
Compare current bar to previous:
- Strat 3 (outside bar): high > high[1] AND low < low[1]
- Strat 1 (inside bar): high ≤ high[1] AND low ≥ low[1]
- Strat 2 (directional): All others
Purpose: The Strat is a price action system categorizing bars by relationship to previous bars. This automates classification.
🔟 FIBONACCI RETRACEMENTS
Calculation Method:
1. Find highest high in lookback (default 30 bars)
2. Find lowest low in lookback
3. Calculate: 0.0, 0.382, 0.5, 0.618, 1.0 levels
Purpose: Standard Fibonacci tool. These ratios are commonly used support/resistance in technical analysis.
1️⃣1️⃣ MULTI-TIMEFRAME ANALYSIS
Calculation Method:
FOR each timeframe (default 15m, 1H, 4H):
Check if close > EMA(9) on that timeframe
IF true: "BULLISH", else: "BEARISH"
Purpose: Shows trend alignment across timeframes using Pine's request.security(). Common confirmation technique.
═══════════════════════════════════════════════════════════════
💡 WHY THESE COMPONENTS WORK TOGETHER
This indicator's originality lies in its unified system approach:
1. TREND IDENTIFICATION (EMAs, MTF) - Shows direction
2. MOMENTUM MEASUREMENT (RSI, candles) - Shows strength
3. VOLUME CONFIRMATION (Volume Delta) - Shows conviction
4. KEY LEVELS (PM, ORB, Fib, S/R) - Shows decision points
5. RISK MANAGEMENT (TP levels, ATR stops) - Shows exits
VALUE OF INTEGRATION:
Rather than 10 separate indicators creating chart clutter, this consolidates related concepts where each component provides different information that, when viewed together, gives a more complete market picture.
Example Integration:
- Entry signal appears (EMA + RSI aligned)
- Volume Delta confirms (more buying than selling)
- MTF shows higher timeframes agree
- TP levels auto-calculate with good risk:reward
- Support trendline nearby provides stop reference
═══════════════════════════════════════════════════════════════
⚙️ CUSTOMIZATION OPTIONS
All features independently toggleable:
- EMAs: Adjust lengths (9, 21, 50, 200), colors, widths
- RSI: Change overbought/oversold levels (70/30)
- Volume Delta: Adjust lookback period (20)
- ORB: Set custom start time, duration, timezone
- Gamma: Adjust sensitivity (1-10)
- TP Levels: Customize all 5 percentages
- Dashboard: Reposition, resize, recolor
═══════════════════════════════════════════════════════════════
📖 HOW TO USE
Step 1 - Assess Context:
- Check MTF Dashboard for alignment
- Check EMA indicator for trend
- Check Gamma Zone for volatility expectation
Step 2 - Identify Setups:
- Wait for BUY/SELL signal
- Check Volume Delta matches direction
- Verify RSI not extreme (30-70)
- Look for support/resistance confluence
Step 3 - Evaluate Risk:Reward:
- Review TP3 R:R ratio (target 2:1+)
- Check stop loss placement
- Ensure risk acceptable
Step 4 - Monitor:
- Track P&L % in real-time
- Use TP levels as potential exits
- Adjust stops based on S/R
═══════════════════════════════════════════════════════════════
⚠️ LIMITATIONS & REALISTIC EXPECTATIONS
This indicator does NOT:
- Predict future price movements
- Guarantee profitable trades
- Work in all market conditions
- Replace proper education and practice
This indicator CAN:
- Display standard technical indicators in organized way
- Automate common calculations
- Visualize multiple analysis methods simultaneously
- Help learn how different indicators relate
Key Understanding:
All technical indicators use historical data. They help identify patterns and conditions but cannot predict the future. Successful trading requires risk management, psychology, and experience—not just indicators.
═══════════════════════════════════════════════════════════════
📚 EDUCATIONAL CONCEPTS TAUGHT
- How EMAs show trend direction and alignment
- How RSI identifies momentum extremes
- How volume confirms or diverges from price
- How support/resistance levels form
- How multiple timeframes provide context
- How ATR adapts stops to volatility
- How risk:reward ratios work
═══════════════════════════════════════════════════════════════
📊 BEST SUITED FOR
- Scalping: 1m-5m charts with quick entries/exits
- Day Trading: 15m-1H focusing on ORB and PM levels
- Swing Trading: 4H-D following major trends
═══════════════════════════════════════════════════════════════
⚠️ RISK DISCLAIMER
Trading involves substantial risk of loss. This educational tool:
- Does NOT guarantee profits
- Cannot predict future performance
- Requires proper risk management
- Should be practiced on demo accounts first
Always use stop losses, risk only 1-2% per trade, and consult licensed financial professionals before trading with real capital.
═══════════════════════════════════════════════════════════════
Educational tool for learning technical analysis. Not financial advice. Past results do not indicate future performance.
⚠️ EDUCATIONAL TOOL - NO GUARANTEES
This indicator is designed for educational purposes to help traders learn technical analysis concepts. It does not predict future price movements or guarantee profitable trades. Trading involves substantial risk of loss.
═══════════════════════════════════════════════════════════════
📊 WHAT THIS INDICATOR DOES
This indicator combines multiple standard technical analysis methods into a unified system for analyzing market structure, momentum, volume dynamics, and key price levels. Rather than adding 10 separate indicators to your chart, this consolidates related information into one cohesive interface where each component informs the others.
═══════════════════════════════════════════════════════════════
🔧 TECHNICAL METHODOLOGY - HOW IT WORKS
1️⃣ MOMENTUM CANDLE COLORING (6 Levels)
Calculation Method:
- Compares close vs EMA(9) and EMA(21)
- Applies RSI(14) thresholds for strength
- Color codes: Royal Blue (strongest bull) → Cyan → Green → Yellow → Orange → Red (strongest bear) → White (neutral)
Formula Logic:
IF close > EMA(9) AND close > EMA(21) AND close > open:
RSI > 70 = Level 3 Bull (Royal Blue)
RSI 60-70 = Level 2 Bull (Cyan)
RSI < 60 = Level 1 Bull (Green)
Purpose: Visualizes momentum strength by combining trend (EMAs), candle direction, and overbought/oversold conditions (RSI).
2️⃣ ENTRY SIGNAL LABELS
Calculation Method:
- Uses EMA alignment: EMA(9) > EMA(21) > EMA(50) for bullish
- Filters RSI to avoid extremes
- Requires confirming candle
BUY Signal Logic:
IF close > EMA(9) AND RSI between 40-70 AND EMA(9) > EMA(21) > EMA(50) AND close > open
THEN: Display "BUY" label
Purpose: Identifies potential entries when multiple trend and momentum conditions align. This is standard multi-confirmation technical analysis.
3️⃣ VOLUME DELTA PERCENTAGE
Calculation Method:
FOR each bar in lookback period (default 20):
IF close > open: add volume to bullish_volume
IF close < open: add volume to bearish_volume
bullish_percent = (bullish_volume / total_volume) × 100
Purpose: Quantifies buying vs selling pressure as percentages. Shows if volume supports the current trend.
Display: "🟢65.3% | 🔴34.7%" in dashboard
4️⃣ PRE-MARKET HIGH/LOW TRACKING
Calculation Method:
1. Detect pre-market session (4:00-9:30 AM ET)
2. Track highest high during pre-market
3. Track lowest low during pre-market
4. Draw horizontal lines when market opens
Purpose: Pre-market levels often act as support/resistance during regular hours. This automates their tracking and visualization.
5️⃣ OPENING RANGE BREAKOUT (ORB)
Calculation Method:
1. User sets start time (default 9:30 AM) and duration (default 15 min)
2. Track highest high and lowest low during this period
3. Draw box and extend lines
Purpose: The opening range breakout is a well-documented day trading strategy. First X minutes establish a range, and breakouts often signal directional moves.
6️⃣ SUPPORT/RESISTANCE TRENDLINES
Calculation Method:
1. Identify pivot highs: ta.pivothigh(high, 5, 5)
2. Identify pivot lows: ta.pivotlow(low, 5, 5)
3. Connect last two pivot highs = Resistance (red)
4. Connect last two pivot lows = Support (blue)
Purpose: Automatically connects significant pivot points. Based on standard pivot analysis where price respects these levels.
7️⃣ GAMMA ZONE DETECTION
Calculation Method:
1. Calculate 30-min range: (high - low)
2. Calculate 10-period SMA of range
3. Calculate ratio: current_range / average_range
IF ratio < (1.0 / sensitivity): HIGH GAMMA = Low volatility
IF ratio > (1.0 × sensitivity): LOW GAMMA = High volatility
Purpose: Approximates options gamma effects. High gamma = dealers hedge more = suppressed volatility. Low gamma = less hedging = potential explosive moves.
8️⃣ TAKE PROFIT LEVELS (5 Levels + ATR Stop Loss)
Calculation Method:
LONG: TP = entry_price × (1 + percentage/100)
SHORT: TP = entry_price × (1 - percentage/100)
Stop Loss (ATR): entry ± (ATR(14) × multiplier)
Purpose: Automatically calculates percentage-based targets and volatility-adjusted stops. ATR adapts stop to current market conditions.
9️⃣ THE STRAT PATTERN RECOGNITION
Calculation Method:
Compare current bar to previous:
- Strat 3 (outside bar): high > high[1] AND low < low[1]
- Strat 1 (inside bar): high ≤ high[1] AND low ≥ low[1]
- Strat 2 (directional): All others
Purpose: The Strat is a price action system categorizing bars by relationship to previous bars. This automates classification.
🔟 FIBONACCI RETRACEMENTS
Calculation Method:
1. Find highest high in lookback (default 30 bars)
2. Find lowest low in lookback
3. Calculate: 0.0, 0.382, 0.5, 0.618, 1.0 levels
Purpose: Standard Fibonacci tool. These ratios are commonly used support/resistance in technical analysis.
1️⃣1️⃣ MULTI-TIMEFRAME ANALYSIS
Calculation Method:
FOR each timeframe (default 15m, 1H, 4H):
Check if close > EMA(9) on that timeframe
IF true: "BULLISH", else: "BEARISH"
Purpose: Shows trend alignment across timeframes using Pine's request.security(). Common confirmation technique.
═══════════════════════════════════════════════════════════════
💡 WHY THESE COMPONENTS WORK TOGETHER
This indicator's originality lies in its unified system approach:
1. TREND IDENTIFICATION (EMAs, MTF) - Shows direction
2. MOMENTUM MEASUREMENT (RSI, candles) - Shows strength
3. VOLUME CONFIRMATION (Volume Delta) - Shows conviction
4. KEY LEVELS (PM, ORB, Fib, S/R) - Shows decision points
5. RISK MANAGEMENT (TP levels, ATR stops) - Shows exits
VALUE OF INTEGRATION:
Rather than 10 separate indicators creating chart clutter, this consolidates related concepts where each component provides different information that, when viewed together, gives a more complete market picture.
Example Integration:
- Entry signal appears (EMA + RSI aligned)
- Volume Delta confirms (more buying than selling)
- MTF shows higher timeframes agree
- TP levels auto-calculate with good risk:reward
- Support trendline nearby provides stop reference
═══════════════════════════════════════════════════════════════
⚙️ CUSTOMIZATION OPTIONS
All features independently toggleable:
- EMAs: Adjust lengths (9, 21, 50, 200), colors, widths
- RSI: Change overbought/oversold levels (70/30)
- Volume Delta: Adjust lookback period (20)
- ORB: Set custom start time, duration, timezone
- Gamma: Adjust sensitivity (1-10)
- TP Levels: Customize all 5 percentages
- Dashboard: Reposition, resize, recolor
═══════════════════════════════════════════════════════════════
📖 HOW TO USE
Step 1 - Assess Context:
- Check MTF Dashboard for alignment
- Check EMA indicator for trend
- Check Gamma Zone for volatility expectation
Step 2 - Identify Setups:
- Wait for BUY/SELL signal
- Check Volume Delta matches direction
- Verify RSI not extreme (30-70)
- Look for support/resistance confluence
Step 3 - Evaluate Risk:Reward:
- Review TP3 R:R ratio (target 2:1+)
- Check stop loss placement
- Ensure risk acceptable
Step 4 - Monitor:
- Track P&L % in real-time
- Use TP levels as potential exits
- Adjust stops based on S/R
═══════════════════════════════════════════════════════════════
⚠️ LIMITATIONS & REALISTIC EXPECTATIONS
This indicator does NOT:
- Predict future price movements
- Guarantee profitable trades
- Work in all market conditions
- Replace proper education and practice
This indicator CAN:
- Display standard technical indicators in organized way
- Automate common calculations
- Visualize multiple analysis methods simultaneously
- Help learn how different indicators relate
Key Understanding:
All technical indicators use historical data. They help identify patterns and conditions but cannot predict the future. Successful trading requires risk management, psychology, and experience—not just indicators.
═══════════════════════════════════════════════════════════════
📚 EDUCATIONAL CONCEPTS TAUGHT
- How EMAs show trend direction and alignment
- How RSI identifies momentum extremes
- How volume confirms or diverges from price
- How support/resistance levels form
- How multiple timeframes provide context
- How ATR adapts stops to volatility
- How risk:reward ratios work
═══════════════════════════════════════════════════════════════
📊 BEST SUITED FOR
- Scalping: 1m-5m charts with quick entries/exits
- Day Trading: 15m-1H focusing on ORB and PM levels
- Swing Trading: 4H-D following major trends
═══════════════════════════════════════════════════════════════
⚠️ RISK DISCLAIMER
Trading involves substantial risk of loss. This educational tool:
- Does NOT guarantee profits
- Cannot predict future performance
- Requires proper risk management
- Should be practiced on demo accounts first
Always use stop losses, risk only 1-2% per trade, and consult licensed financial professionals before trading with real capital.
═══════════════════════════════════════════════════════════════
Educational tool for learning technical analysis. Not financial advice. Past results do not indicate future performance.
Script protegido
Este script se publica como código cerrado. However, you can use it freely and without any limitations – learn more here.
MARK N. ROGERS, MBA
Rogers1906.com
Rogers1906.com
Exención de responsabilidad
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Script protegido
Este script se publica como código cerrado. However, you can use it freely and without any limitations – learn more here.
MARK N. ROGERS, MBA
Rogers1906.com
Rogers1906.com
Exención de responsabilidad
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.