OPEN-SOURCE SCRIPT
Market Mastery Blueprint Narrow State Finder

A comprehensive trade management and signal indicator built specifically for ES and MES futures traders operating on the 2-minute chart. The Market Mastery Blueprint combines market state detection, MA cross signals, smart entry scoring, and real-time risk/reward calculation into a single all-in-one tool.
KEY FEATURES:
Market State Detection
Uses a fast (20) and slow (200) EMA relationship to classify price action into Narrow State (low volatility, inside range) and Wide State (trending/expanded) conditions. Background shading highlights each regime so you always know the current market context.
MA Cross Signal Engine
Detects three types of moving average crosses: Price x 20 SMA, Price x 200 SMA, and the classic 20 x 200 SMA Golden/Death Cross. An optional Elephant Bar filter ensures crosses are only flagged when backed by strong momentum candles, reducing false signals.
Elephant Bar Detection
Identifies large, impulsive candles (bull and bear) based on body size, tail wick ratios, and bar range thresholds. Elephant bars are highlighted directly on the chart and can act as confirmation filters for MA cross and entry signals.
Tail Dot Signals
Plots small dots on candles with significant wicks (topping tails and bottoming tails) that do not align with the prevailing signal direction, helping identify potential exhaustion and reversal setups.
Entry Labels with Risk/Reward
When a long or short signal triggers, a label is placed on the chart displaying the signal type, composite score, risk in dollars, reward in dollars, and number of contracts based on your defined account size and risk percentage.
TP / SL / Breakeven Lines
Automatically draws dynamic stop-loss, take-profit, and breakeven lines projected forward from each signal bar. Offset lines extend to the right for clear visual reference.
Session Filter
Restricts signals to active trading hours. You can skip the first N minutes after the open and stop taking signals N minutes before the close, keeping you out of pre/post market noise.
Fully Customizable Inputs
- Instrument: MES or ES
- Account size and risk % per trade
- ATR stop multiplier and R-multiple target
- Breakeven trigger level (x ATR)
- Minimum stop distance in points
- All visual toggles (state backgrounds, zones, elephant colors, labels, TP/SL lines, cross signals)
Built in Pine Script v6. Designed for active futures day traders who want a structured, rule-based framework for identifying high-quality setups on the ES and MES.
KEY FEATURES:
Market State Detection
Uses a fast (20) and slow (200) EMA relationship to classify price action into Narrow State (low volatility, inside range) and Wide State (trending/expanded) conditions. Background shading highlights each regime so you always know the current market context.
MA Cross Signal Engine
Detects three types of moving average crosses: Price x 20 SMA, Price x 200 SMA, and the classic 20 x 200 SMA Golden/Death Cross. An optional Elephant Bar filter ensures crosses are only flagged when backed by strong momentum candles, reducing false signals.
Elephant Bar Detection
Identifies large, impulsive candles (bull and bear) based on body size, tail wick ratios, and bar range thresholds. Elephant bars are highlighted directly on the chart and can act as confirmation filters for MA cross and entry signals.
Tail Dot Signals
Plots small dots on candles with significant wicks (topping tails and bottoming tails) that do not align with the prevailing signal direction, helping identify potential exhaustion and reversal setups.
Entry Labels with Risk/Reward
When a long or short signal triggers, a label is placed on the chart displaying the signal type, composite score, risk in dollars, reward in dollars, and number of contracts based on your defined account size and risk percentage.
TP / SL / Breakeven Lines
Automatically draws dynamic stop-loss, take-profit, and breakeven lines projected forward from each signal bar. Offset lines extend to the right for clear visual reference.
Session Filter
Restricts signals to active trading hours. You can skip the first N minutes after the open and stop taking signals N minutes before the close, keeping you out of pre/post market noise.
Fully Customizable Inputs
- Instrument: MES or ES
- Account size and risk % per trade
- ATR stop multiplier and R-multiple target
- Breakeven trigger level (x ATR)
- Minimum stop distance in points
- All visual toggles (state backgrounds, zones, elephant colors, labels, TP/SL lines, cross signals)
Built in Pine Script v6. Designed for active futures day traders who want a structured, rule-based framework for identifying high-quality setups on the ES and MES.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.