OPEN-SOURCE SCRIPT
Telah dikemas kini EPTv2.11

An experimental framework for visualizing market psychology, crowd positioning, and institutional intent — derived entirely from price structure.
-Experimental Indicator
This tool does not generate buy or sell signals.
Esco Psychological Theory is a psychological lens — a way of interpreting what participants are likely feeling and who benefits from those emotional conditions.
Treat it as a research framework, not a trading system.
What This Is
Price does not simply move between support and resistance.
It moves through emotional states.
Every candle on your chart represents thousands of decisions made under fear, greed, hope, regret, and panic. Those emotions are not random — they tend to appear in recognizable structural patterns.
Smart money does not simply buy low and sell high.
It often creates the emotional conditions that force the crowd to do the opposite.
Esco Psychological Theory attempts to model this process. It reads structure, volatility expansion, displacement, liquidity sweeps, failed breakouts, and wick behavior — then infers what market participants are likely experiencing and how institutional players may be responding.
This indicator is not trying to predict price.
It is trying to frame why price may be behaving the way it is.
The Psychological Model
Markets tend to cycle through recognizable emotional regimes.
This indicator models those transitions using a sequential state machine. Regimes progress through adjacent states rather than jumping randomly, producing a more realistic psychological narrative.
The cycle:
COMFORT → TENSION → HOPE → TRAP RISK → PANIC → CAPITULATION → RELIEF → REACCUMULATION → …
Each regime leaves structural fingerprints that can be observed in price behavior.
Comfort
Low volatility, orderly trend behavior, shallow pullbacks.
The crowd feels positioned and confident.
This is often where smart money quietly builds exposure.
Tension
Equal highs/lows begin forming.
Repeated rejection at key levels.
Volatility compresses.
Something is building.
Hope
A displacement candle breaks structure.
Breakout traders enter aggressively.
Momentum appears convincing.
The move looks real.
Trap Risk
The breakout stalls or fails to continue.
Price reclaims prior levels.
Large wicks appear at extremes.
Late entries are now vulnerable.
Panic
Structure shifts against the prior trend.
Stops trigger.
Positions unwind quickly.
Volume spikes.
Capitulation
Consecutive displacement candles appear.
Multiple structure breaks occur rapidly.
Maximum forced repositioning.
Relief
Volatility begins to decline.
Price stabilizes and the market pauses.
Participants exit remaining positions.
Reaccumulation
Compression forms around new price levels.
Fresh pivots emerge.
Smart money quietly finishes positioning for the next cycle.
Modules
Emotional Regime Engine
Classifies the market’s current psychological regime using the sequential state model.
Transitions are constrained to realistic sequences rather than random jumps.
Labels appear only when the regime changes.
Optional background shading and a timeline ribbon allow you to visually track emotional phases across the chart.
Smart Money Intent
Estimates institutional behavior based on structural evidence.
Six possible classifications are evaluated simultaneously with confidence scoring.
Accumulation
Repeated demand absorption and compression near discount levels.
Distribution
Repeated supply rejection and compression near premium levels.
Liquidity Harvest
Sweeps of equal highs or lows followed by sharp displacement reversals.
Trap Engineering
Failed breakouts combined with equal level buildup and overextension.
Passive Absorption
Quiet wick rejection and declining volume at key levels.
Aggressive Repricing
Consecutive displacement candles and decisive structure breaks.
Crowd Bias
Infers likely crowd positioning based on structure alignment and momentum behavior.
Possible states include:
Positioned Long / Positioned Short
Trapped Long / Trapped Short
Chasing Momentum
Indecisive / Neutral
Pain & Pressure Engine
Estimates where future price movement would create the greatest psychological stress.
Pain direction is derived from:
trapped positioning
recent liquidity sweeps
failed breakout attempts
distance from equilibrium
premium / discount positioning
Pressure intensity (0–100%) measures the amount of latent repositioning energy in the market.
When pressure exceeds 70%, candles receive a subtle amber tint.
Soft gradient bands above and below price indicate potential pain direction — areas where movement could force the most participants to react.
Psychological Pressure Zones
Event-driven zones are created when structural events occur.
FOMO Zones
Breakout areas where late buyers or sellers entered.
Regret Zones
Failed breakout ranges containing trapped traders.
Trap Zones
Sweep-and-reclaim areas where liquidity was harvested.
Forced Zones
Panic and capitulation ranges created during liquidation events.
Zones automatically deduplicate, fade with time, and disappear once price cleanly resolves through them.
Premium / Discount Context
Using the most recent major swing high and low, the indicator calculates range positioning.
The chart displays:
Premium (top 25%)
Discount (bottom 25%)
Equilibrium midpoint
The dashboard shows the exact percentage location within the range.
Dashboard
A compact panel summarizes the full psychological read of the market.
Displayed metrics include:
Regime — current emotional state
Crowd — inferred crowd positioning
Intent — smart money classification with confidence score
Pain — directional pain bias
Pressure — psychological pressure intensity
Zone — premium / discount / equilibrium position
Phase — cycle phase progression
What This Indicator Is Not
This indicator does not predict price direction.
It does not have access to order flow, liquidation data, or actual market positioning.
Instead, it infers probable psychological conditions from the structural footprint that emotion leaves on a chart.
The classifications and intent scores are probabilistic interpretations, not definitive signals.
Use this as one analytical layer alongside your own discretionary framework.
Inputs
All modules can be enabled or disabled independently.
Key configuration options include:
Swing Lookback
Major Swing Lookback
Maximum Zone Age / Visible Zones
Regime Background and Timeline Ribbon
Pain Gradient and Pressure Bar Colors
Premium / Discount Shading
Event Markers (displacement candles, sweeps, MSS, squeeze events)
Notes
Overlay indicator (drawn directly on the price chart)
Pine Script v6
Compatible with all markets and timeframes
Lower timeframes may require smaller swing lookback values (10–14 recommended)
Higher timeframes benefit from larger values (21–50 recommended)
Feedback
This is the first public release of Esco Psychological Theory.
The framework is experimental and will continue evolving.
If you test it and have feedback, ideas, or suggestions for improving the psychological model or visual design, I would genuinely love to hear them.
Community input is welcome and appreciated.
Esco Psychological Theory
Structure reveals emotion.
Emotion reveals intent.
-Experimental Indicator
This tool does not generate buy or sell signals.
Esco Psychological Theory is a psychological lens — a way of interpreting what participants are likely feeling and who benefits from those emotional conditions.
Treat it as a research framework, not a trading system.
What This Is
Price does not simply move between support and resistance.
It moves through emotional states.
Every candle on your chart represents thousands of decisions made under fear, greed, hope, regret, and panic. Those emotions are not random — they tend to appear in recognizable structural patterns.
Smart money does not simply buy low and sell high.
It often creates the emotional conditions that force the crowd to do the opposite.
Esco Psychological Theory attempts to model this process. It reads structure, volatility expansion, displacement, liquidity sweeps, failed breakouts, and wick behavior — then infers what market participants are likely experiencing and how institutional players may be responding.
This indicator is not trying to predict price.
It is trying to frame why price may be behaving the way it is.
The Psychological Model
Markets tend to cycle through recognizable emotional regimes.
This indicator models those transitions using a sequential state machine. Regimes progress through adjacent states rather than jumping randomly, producing a more realistic psychological narrative.
The cycle:
COMFORT → TENSION → HOPE → TRAP RISK → PANIC → CAPITULATION → RELIEF → REACCUMULATION → …
Each regime leaves structural fingerprints that can be observed in price behavior.
Comfort
Low volatility, orderly trend behavior, shallow pullbacks.
The crowd feels positioned and confident.
This is often where smart money quietly builds exposure.
Tension
Equal highs/lows begin forming.
Repeated rejection at key levels.
Volatility compresses.
Something is building.
Hope
A displacement candle breaks structure.
Breakout traders enter aggressively.
Momentum appears convincing.
The move looks real.
Trap Risk
The breakout stalls or fails to continue.
Price reclaims prior levels.
Large wicks appear at extremes.
Late entries are now vulnerable.
Panic
Structure shifts against the prior trend.
Stops trigger.
Positions unwind quickly.
Volume spikes.
Capitulation
Consecutive displacement candles appear.
Multiple structure breaks occur rapidly.
Maximum forced repositioning.
Relief
Volatility begins to decline.
Price stabilizes and the market pauses.
Participants exit remaining positions.
Reaccumulation
Compression forms around new price levels.
Fresh pivots emerge.
Smart money quietly finishes positioning for the next cycle.
Modules
Emotional Regime Engine
Classifies the market’s current psychological regime using the sequential state model.
Transitions are constrained to realistic sequences rather than random jumps.
Labels appear only when the regime changes.
Optional background shading and a timeline ribbon allow you to visually track emotional phases across the chart.
Smart Money Intent
Estimates institutional behavior based on structural evidence.
Six possible classifications are evaluated simultaneously with confidence scoring.
Accumulation
Repeated demand absorption and compression near discount levels.
Distribution
Repeated supply rejection and compression near premium levels.
Liquidity Harvest
Sweeps of equal highs or lows followed by sharp displacement reversals.
Trap Engineering
Failed breakouts combined with equal level buildup and overextension.
Passive Absorption
Quiet wick rejection and declining volume at key levels.
Aggressive Repricing
Consecutive displacement candles and decisive structure breaks.
Crowd Bias
Infers likely crowd positioning based on structure alignment and momentum behavior.
Possible states include:
Positioned Long / Positioned Short
Trapped Long / Trapped Short
Chasing Momentum
Indecisive / Neutral
Pain & Pressure Engine
Estimates where future price movement would create the greatest psychological stress.
Pain direction is derived from:
trapped positioning
recent liquidity sweeps
failed breakout attempts
distance from equilibrium
premium / discount positioning
Pressure intensity (0–100%) measures the amount of latent repositioning energy in the market.
When pressure exceeds 70%, candles receive a subtle amber tint.
Soft gradient bands above and below price indicate potential pain direction — areas where movement could force the most participants to react.
Psychological Pressure Zones
Event-driven zones are created when structural events occur.
FOMO Zones
Breakout areas where late buyers or sellers entered.
Regret Zones
Failed breakout ranges containing trapped traders.
Trap Zones
Sweep-and-reclaim areas where liquidity was harvested.
Forced Zones
Panic and capitulation ranges created during liquidation events.
Zones automatically deduplicate, fade with time, and disappear once price cleanly resolves through them.
Premium / Discount Context
Using the most recent major swing high and low, the indicator calculates range positioning.
The chart displays:
Premium (top 25%)
Discount (bottom 25%)
Equilibrium midpoint
The dashboard shows the exact percentage location within the range.
Dashboard
A compact panel summarizes the full psychological read of the market.
Displayed metrics include:
Regime — current emotional state
Crowd — inferred crowd positioning
Intent — smart money classification with confidence score
Pain — directional pain bias
Pressure — psychological pressure intensity
Zone — premium / discount / equilibrium position
Phase — cycle phase progression
What This Indicator Is Not
This indicator does not predict price direction.
It does not have access to order flow, liquidation data, or actual market positioning.
Instead, it infers probable psychological conditions from the structural footprint that emotion leaves on a chart.
The classifications and intent scores are probabilistic interpretations, not definitive signals.
Use this as one analytical layer alongside your own discretionary framework.
Inputs
All modules can be enabled or disabled independently.
Key configuration options include:
Swing Lookback
Major Swing Lookback
Maximum Zone Age / Visible Zones
Regime Background and Timeline Ribbon
Pain Gradient and Pressure Bar Colors
Premium / Discount Shading
Event Markers (displacement candles, sweeps, MSS, squeeze events)
Notes
Overlay indicator (drawn directly on the price chart)
Pine Script v6
Compatible with all markets and timeframes
Lower timeframes may require smaller swing lookback values (10–14 recommended)
Higher timeframes benefit from larger values (21–50 recommended)
Feedback
This is the first public release of Esco Psychological Theory.
The framework is experimental and will continue evolving.
If you test it and have feedback, ideas, or suggestions for improving the psychological model or visual design, I would genuinely love to hear them.
Community input is welcome and appreciated.
Esco Psychological Theory
Structure reveals emotion.
Emotion reveals intent.
Nota Keluaran
An experimental framework for visualizing market psychology, crowd positioning, and institutional intent — derived entirely from price structure.Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.