RSI in Bull and Bear Market V2.0RSI oversold at 60/40 in bullish market
And Overbought at 40/60 in Bearish market
for more info of this Strategy
Pesquisar nos scripts por "bear"
Bull Power Strategy Backtest Bull Power Indicator
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb.
1337 VolumeThis volume indicator gives you a unique perspective and ability to analyze volume in any market. The upper line that is always >=0 represents average up volume over a user definable period while the lower line that is always <= 0 represents the average down volume over a user definable period.
green == bullish candle but volume lower than average
lime == bullish candle with above average volume
crimson == bearish candle with below average volume
red == bearish candle with above average volume
This indicator is very useful for spotting bottoms / tops (do a visual backtest and observe its behavior) as well as entry opportunities.
By default, the lookback period for average volume is 7, but I encourage you to change this value in order to find settings that work best for your particular market.
If you have any feedback or ideas for improvement, please comment.
Enjoy :D
PPO Bull/Bear Divergence to High/Low StrategyA simple strategy that uses the PPO divergences to open trades and the highs/lows to close them. Credit to Pekipek for this PPO Divergence indicator (I changed the visuals a bit)
STRATEGY
Purple circle - bullish divergence - enter LONG
Orange circle - bearish divergence - enter SHORT
Green dot - high point - exit LONG
Red dot - low point - exit SHORT
That's it. Not very profitable, but I like Pekipek's indicator a lot so figured I'd see what a strategy was like. Would love to see any variations.
Super Envolvente (Bullish y Bearish)Identificador de Super-envolventes (SE), se encarga de darle un color verde a la SE alzista (Bullish) verde y rojo a la bajista (Bearish).
[NM]Improved Linear Regression Bull and Bear Power v02Hi guys, I'm back with a little improvement on the Bull and Bear Signal I published just last week thanks to some feedback I received from a couple of users, which is of course highly appreciated.
Here are the changes that have been implemented compared to v01 :
(version 1 is the top indicator, version 2 is the bottom one) in the chart above
Formula adapted to calculate the signal if no data is available for either bull or bear
Added the possibility to smoothen the signal using Arnaud Legroux Moving Average (the benefit of this is that it does not add any lag to the signal)
Zero line was added
If you have any further ideas on how to improve the indicator or if you are happy with it and want to share your settings or rules of engagement, please feel free to share them below.
Oh, and don't forget to click that like button ! :)
Candlestick Patterns Identified (updated 3/11/15)I decided to republish this one without the trend filter and with all the major symbols active. This will allow for all the patterns to show up.
Due to 15 different candlestick formations in this one script, it will be difficult to turn off the last few due to screen size. You can turn off individual patterns on the settings screen.
I have everything spelled out except the hammer and inverted hammer. They are "H" and "IH" respectively on the charts. They show up so often that they cluttered the charts.
The default script has: Doji, Evening Star, Morning Star, Shooting Star, Hammer, Inverted Hammer, Bearish Harami, Bullish Harami, Bearish Engulfing, Bullish Engulfing, Piercing Line, Bullish Belt, Bullish Kicker, Bearish Kicker, Hanging man, and Dark Cloud Cover. You can turn off what you don't like. The Piercing Line, Bullish Belt, and the Kickers will usually show up better in the daily charts.
I recommend watching videos with Stephen Bigalow to get a feel for how to trade these. You will want to add an 8 EMA to your chart with his setups. Enjoy.
If you want the old version: Take a look at the related ideas below.
Candlesticks Patterns IdentifiedI was using another script that colored the bars to show the different candle patterns. Thanks to HPotter (www.tradingview.com). Unfortunately, I can't think that fast when looking across a screen of charts with different color bars. Fortunately, Tradingview came up with symbols and names on 2/26/15. I decided to take my favorite symbols and attach them to a name. This makes it easier to see what is going on and where your entry would be if it confirms. Works beautifully for me. Decided to share. I also added the ability to alter what shows up based upon a look back. A bullish engulfing at the top of a trend, or a bearish harami at the bottom of the trend, is nearly useless and clutters the chart. I have the default set for the open of the current bar to be higher or lower than the open from 5 bars back. You can adjust in the settings to what you like. This trend setting is on all the patterns except doji. If you want to see all the candle patterns, set it to "1".
The doji can be adjusted as well. I left some other patterns at the bottom of the script, but they are turned off. They became too much of a clutter for me. I prefer DovCaspi's pattern finder for hammers and stars: I use his due to the clean appearance.
The default script has: Doji, Bearish Harami, Bullish Harami, Bearish Engulfing, Bullish Engulfing, Piercing Line, Bullish Belt, Bullish Kicker, and Bearish Kicker. You can turn off what you don't like. The Piercing Line, Bullish Belt, and the Kickers will usually show up better in the daily charts.
If you would like the updated version, see the Related Ideas below:
Custom Indicator Clearly Shows If Bulls or Bears are in Control!The Two Versions of this Indicator I learned from Two Famous and Highly Successful Traders. This Indicator shows With No Lag Clear Up and Down Trends in Market by Documenting Clearly If Bulls or Bears are in Control. The Version In SubChart 1 Shows Consecutive Closes if the Current Close is Greater than of Less than the Midpoint of the Previous Bar (Why Midpoint Explained in Detail in 1st Post). The Version in SubChart 2 Shows Consecutive Closes that are Greater than or Less Than the Previous Close (Will Discuss Specific Uses in 1st Post). Works on Stocks, Forex, Futures, on All Timeframes.
Keltner Channel v2 - Auto highlighting of Bull/Bear trendsPlease do not use the previous version (), I was using wrong colors for Bull/Bear there.
All options configurable.
Reversals are marked using crosses. as well as highlighted using green/red color (depending on bull/bear). Enjoy!
Keltner Channel with auto highlighting of Bear/Bull reversals*** New version @ ****
All options configurable.
Reversals are marked using crosses. as well as highlighted using green/red color (depending on bull/bear). Enjoy!
Bearish signal using Point of Control (POC) with PAC by guruThis indicator code helps traders identify potential sell opportunities using several important technical indicators:
Point of Control (POC) – This is the price level where the most volume was traded over the past several days.
Previous Day's Low – This shows the lowest price reached during the previous day.
PAC (Price Action Channel) EMA – These are two moving averages (one based on the low price and one based on the close price) that help determine if the price is trending within a certain range.
Volume SMA – This is a 3-day simple moving average (SMA) of volume, which helps filter out signals based on market activity.
What the Script Does:
Point of Control (POC):
The script looks at the last 50 days (configurable) and calculates which price level had the highest trading volume.
It then plots a red line on the chart at the POC level. This is important because it helps identify areas where there was strong market interest in the past.
Volume Moving Average:
The script calculates a 3-day SMA of volume, but it excludes the current day to avoid premature signals based on today’s trading.
The volume SMA is used to ensure there’s enough market activity (with a threshold set to 25 units) before triggering a sell signal.
Price Action Channel (PAC) EMA:
The PAC consists of two exponential moving averages (EMAs):
The PAC Low EMA: This is based on the low prices over the last 34 periods (configurable).
The PAC Close EMA: This is based on the closing prices over the last 34 periods.
These EMAs help determine if the price is trending above or below certain price levels.
Sell Signal Logic: The script checks three conditions before displaying a "Sell" signal:
Price Below POC and Previous Day’s Low:
The close price must be below both the Point of Control (POC) and the previous day's low.
Volume SMA Above 25:
The 3-day volume SMA must be greater than 25. This ensures the signal only triggers when there’s enough trading volume in the market.
Today’s Low is Above PAC EMAs:
Today's low price must be above both the PAC low EMA and the PAC close EMA. This prevents sell signals when prices are already significantly below the PAC, indicating possible exhaustion in the downtrend.
If all three conditions are met, the script will display a red "Sell" label on the chart, signaling a potential selling opportunity.
No Sell Signal if Price Reverses:
If the price crosses back above the POC or the previous day's low, the script will remove the sell signal and reset for a new opportunity.
Summary of Conditions:
For the script to display a "Sell" label:
The close price must be below the Point of Control (POC) and the previous day’s low.
The 3-day volume SMA (excluding today) must be greater than 25 units.
The low price of the current day must be above both the PAC low EMA and the PAC close EMA.
If these conditions are met, a red sell label appears on the chart as a potential signal for a short (sell) trade.
Multi-Timeframe EMA Trend Dashboard with Volume and RSI Filters═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME EMA TREND DASHBOARD
═══════════════════════════════════════════════════════════
OVERVIEW
This indicator provides a comprehensive view of trend direction across multiple timeframes using the classic EMA 20/50 crossover methodology, enhanced with volume confirmation and RSI filtering. It aggregates trend information from six timeframes into a single dashboard for efficient market analysis.
The indicator is designed for educational purposes and to assist traders in identifying potential trend alignments across different time horizons.
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME ANALYSIS
• Monitors 6 timeframes simultaneously: 1m, 5m, 15m, 1H, 4H, 1D
• Each timeframe analyzed independently using request.security()
• Non-repainting implementation with proper lookahead settings
• Calculates overall trend strength as percentage of bullish timeframes
EMA CROSSOVER SYSTEM
• Fast EMA (default: 20) and Slow EMA (default: 50)
• Bullish: Fast EMA > Slow EMA
• Bearish: Fast EMA < Slow EMA
• Neutral: Fast EMA = Slow EMA (rare condition)
• Visual EMA plots with optional fill area
VOLUME CONFIRMATION
• Optional volume filter for crossover signals
• Compares current volume against moving average (default: 20-period SMA)
• Categorizes volume as: High (>1.5x average), Normal (>average), Low (70), oversold (<30), and neutral zones
• Used in quality score calculation
• Optional display toggle
SUPPORT & RESISTANCE DETECTION
• Automatic detection using highest/lowest over lookback period (default: 50 bars)
• Plots resistance (red), support (green), and mid-level (gray)
• Step-line style for clear visualization
• Optional display toggle
QUALITY SCORING SYSTEM
• Rates trade setups from 1-5 stars
• Considers: MTF alignment, volume confirmation, RSI positioning
• 5 stars: 4+ timeframes aligned + volume confirmed + RSI 50-70
• 4 stars: 4+ timeframes aligned + volume confirmed
• 3 stars: 3+ timeframes aligned
• 2 stars: Exactly 3 timeframes aligned
• 1 star: Other conditions
VISUAL DASHBOARD
• Clean table display (position customizable)
• Color-coded trend indicators (green/red/yellow)
• Extended statistics panel (toggleable)
• Shows: Trends, Strength, Quality, RSI, Volume, Price Distance
═══════════════════════════════════════════════════════════
TECHNICAL SPECIFICATIONS
═══════════════════════════════════════════════════════════
CALCULATIONS
Trend Determination per Timeframe:
• request.security() fetches EMA values with gaps=off, lookahead=off
• Compares Fast EMA vs Slow EMA
• Returns: 1 (bullish), -1 (bearish), 0 (neutral)
Trend Strength:
• Counts number of bullish timeframes
• Formula: (bullish_count / 6) × 100
• Range: 0% (all bearish) to 100% (all bullish)
Price Distance from EMA:
• Formula: ((close - EMA) / EMA) × 100
• Positive: Price above EMA
• Negative: Price below EMA
• Warning when absolute distance > 5%
ANTI-REPAINTING MEASURES
• All request.security() calls use lookahead=barmerge.lookahead_off
• Dashboard updates only on barstate.islast
• Historical bars remain unchanged
• Crossover signals finalize on bar close
═══════════════════════════════════════════════════════════
USAGE GUIDE
═══════════════════════════════════════════════════════════
INTERPRETING THE DASHBOARD
Timeframe Rows:
• Each row shows individual timeframe trend status
• Look for alignment (multiple timeframes same direction)
• Higher timeframes generally more significant
Strength Indicator:
• >66.67%: Strong bullish (4+ timeframes bullish)
• 33.33-66.67%: Mixed/choppy conditions
• <33.33%: Strong bearish (4+ timeframes bearish)
Quality Score:
• Higher stars = better confluence of factors
• 5-star setups have strongest multi-factor confirmation
• Lower scores may indicate weaker or conflicting signals
SUGGESTED APPLICATIONS
Trend Confirmation:
• Check if multiple timeframes confirm current chart trend
• Higher agreement = stronger trend confidence
• Use for position sizing decisions
Entry Timing:
• Wait for EMA crossover on chart timeframe
• Confirm with higher timeframe alignment
• Volume above average preferred
• RSI not in extreme zones
Divergence Detection:
• When lower timeframes diverge from higher
• May indicate trend exhaustion or reversal
• Requires additional confirmation
CUSTOMIZATION
EMA Settings:
• Adjust Fast/Slow lengths for different sensitivities
• Shorter periods = more responsive, more signals
• Longer periods = smoother, fewer signals
• Common alternatives: 10/30, 12/26, 50/200
Volume Filter:
• Enable for higher-quality signals (fewer false positives)
• Disable in always-liquid markets or for more signals
• Adjust MA length based on typical volume patterns
Display Options:
• Toggle EMAs, S/R levels, extended stats as needed
• Choose dashboard position to avoid chart overlap
• Adjust colors for visibility preferences
═══════════════════════════════════════════════════════════
ALERTS
═══════════════════════════════════════════════════════════
AVAILABLE ALERT CONDITIONS
1. Bullish EMA Cross (Volume Confirmed)
2. Bearish EMA Cross (Volume Confirmed)
3. Strong Bullish Alignment (4+ timeframes)
4. Strong Bearish Alignment (4+ timeframes)
5. Trend Strength Increasing (>16.67% jump)
6. Trend Strength Decreasing (>16.67% drop)
7. Excellent Trade Setup (5-star rating)
Alert messages use standard placeholders:
• {{ticker}} - Symbol name
• {{close}} - Current close price
• {{time}} - Bar timestamp
═══════════════════════════════════════════════════════════
LIMITATIONS & CONSIDERATIONS
═══════════════════════════════════════════════════════════
KNOWN LIMITATIONS
• Lower timeframe data may not be available on all symbols
• 1-minute data typically limited to recent history
• request.security() subject to TradingView data limits
• Dashboard requires screen space (may overlap on small screens)
• More complex calculations may affect load time on slower devices
NOT SUITABLE FOR
• Highly volatile/illiquid instruments (many false signals)
• News-driven markets during announcements
• Automated trading without additional filters
• Markets where EMA strategies don't perform well
DOES NOT PROVIDE
• Exact entry/exit prices
• Stop-loss or take-profit levels
• Position sizing recommendations
• Guaranteed profit signals
• Market predictions
═══════════════════════════════════════════════════════════
BEST PRACTICES
═══════════════════════════════════════════════════════════
RECOMMENDED USAGE
✓ Combine with price action analysis
✓ Use appropriate risk management
✓ Backtest on historical data before live use
✓ Adjust settings for specific market characteristics
✓ Wait for higher-quality setups in important trades
✓ Consider overall market context and fundamentals
NOT RECOMMENDED
✗ Using as standalone trading system without confirmation
✗ Trading every signal without discretion
✗ Ignoring risk management principles
✗ Trading without understanding the methodology
✗ Applying to unsuitable markets/timeframes
═══════════════════════════════════════════════════════════
EDUCATIONAL BACKGROUND
═══════════════════════════════════════════════════════════
EMA CROSSOVER STRATEGY
The Exponential Moving Average crossover is a classical trend-following technique:
• Golden Cross: Fast EMA crosses above Slow EMA (bullish signal)
• Death Cross: Fast EMA crosses below Slow EMA (bearish signal)
• Widely used since the 1970s in various markets
• More responsive than SMA due to exponential weighting
MULTI-TIMEFRAME ANALYSIS
Analyzing multiple timeframes helps traders:
• Identify alignment between short and long-term trends
• Reduce false signals from single-timeframe noise
• Understand market context across different horizons
• Make informed decisions about trade duration
VOLUME ANALYSIS
Volume confirmation adds reliability:
• High volume suggests institutional participation
• Low volume signals may indicate false breakouts
• Volume precedes price in many market theories
• Helps distinguish genuine moves from noise
═══════════════════════════════════════════════════════════
TECHNICAL IMPLEMENTATION
═══════════════════════════════════════════════════════════
CODE STRUCTURE
• Organized in clear sections with proper commenting
• Uses explicit type declarations (int, float, bool, color, string)
• Constants defined at top (BULLISH=1, BEARISH=-1, etc.)
• Functions documented with @function, @param, @returns
• Follows PineCoders naming conventions (camelCase variables)
PERFORMANCE OPTIMIZATION
• var keyword for table (created once, not every bar)
• Calculations cached where possible
• Dashboard updates only on last bar
• Minimal redundant security() calls
SECURITY IMPLEMENTATION
• Proper gaps and lookahead parameters
• No future data leakage
• Signals finalize on bar close
• Historical bars remain static
═══════════════════════════════════════════════════════════
VERSION INFORMATION
═══════════════════════════════════════════════════════════
Current Version: 2.0
Pine Script Version: 5
Last Updated: 2024
Developed by: Zakaria Safri
═══════════════════════════════════════════════════════════
SETTINGS REFERENCE
═══════════════════════════════════════════════════════════
EMA SETTINGS
• Fast EMA Length: 1-500 (default: 20)
• Slow EMA Length: 1-500 (default: 50)
VOLUME & MOMENTUM
• Use Volume Confirmation: true/false (default: true)
• Volume MA Length: 1-500 (default: 20)
• Show RSI Levels: true/false (default: true)
• RSI Length: 1-500 (default: 14)
PRICE ACTION FEATURES
• Show Price Distance: true/false (default: true)
• Show Key Levels: true/false (default: true)
• S/R Lookback Period: 10-500 (default: 50)
DISPLAY SETTINGS
• Show EMAs on Chart: true/false (default: true)
• Fast EMA Color: customizable (default: cyan)
• Slow EMA Color: customizable (default: orange)
• EMA Line Width: 1-5 (default: 2)
• Show Fill Between EMAs: true/false (default: true)
• Show Crossover Signals: true/false (default: true)
DASHBOARD SETTINGS
• Position: Top Left/Right, Bottom Left/Right
• Show Extended Statistics: true/false (default: true)
ALERT SETTINGS
• Alert on Multi-TF Alignment: true/false (default: true)
• Alert on Trend Strength Change: true/false (default: true)
═══════════════════════════════════════════════════════════
RISK DISCLAIMER
═══════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy or sell any security.
IMPORTANT NOTICES:
• Past performance does not indicate future results
• All trading involves risk of capital loss
• No indicator guarantees profitable trades
• Always conduct independent research and analysis
• Use proper risk management and position sizing
• Consult a qualified financial advisor before trading
• The developer assumes no liability for trading losses
By using this indicator, you acknowledge that you understand these risks and accept full responsibility for your trading decisions.
═══════════════════════════════════════════════════════════
SUPPORT & CONTRIBUTIONS
═══════════════════════════════════════════════════════════
FEEDBACK WELCOME
• Constructive comments appreciated
• Bug reports help improve the indicator
• Feature suggestions considered for future versions
• Share your experience to help other users
OPEN SOURCE
This code is published as open source for the TradingView community to:
• Learn from the implementation
• Modify for personal use
• Understand multi-timeframe analysis techniques
If you find this indicator useful, please consider:
• Leaving a thoughtful review
• Sharing with other traders who might benefit
• Following for future updates and releases
═══════════════════════════════════════════════════════════
ADDITIONAL RESOURCES
═══════════════════════════════════════════════════════════
RECOMMENDED READING
• TradingView Pine Script documentation
• PineCoders community resources
• Technical analysis textbooks on moving averages
• Multi-timeframe trading strategy guides
• Risk management principles
RELATED CONCEPTS
• Trend following strategies
• Moving average convergence/divergence
• Multiple timeframe analysis
• Volume-price relationships
• Momentum indicators
═══════════════════════════════════════════════════════════
Thank you for using this indicator. Trade responsibly and continue learning!
═══════════════════════════════════════════════════════════
WorldCup Dashboard + Institutional Sessions© 2025 NewMeta™ — Educational use only.
# Full, Premium Description
## WorldCup Dashboard + Institutional Sessions
**A trade-ready, intraday framework that combines market structure, real flow, and institutional timing.**
This toolkit fuses **Institutional Sessions** with a **price–volume decision engine** so you can see *who is active*, *where value sits*, and *whether the drive is real*. You get: **CVD/Delta**, volume-weighted **Momentum**, **Aggression** spikes, **FVG (MTF)** with nearest side, **Daily Volume Profile (VAH/POC/VAL)**, **ATR regime**, a **24h position gauge**, classic **candle patterns**, IBH/IBL + **first-hour “true close”** lines, and a **10-vote confluence scoreboard**—all in one view.
---
## What’s inside (and how to trade it)
### 🌍 Institutional Sessions (Sydney • Tokyo • London • New York)
* Session boxes + a highlighted **first hour**.
* Plots the **true close** (first-hour close) as a running line with a label.
**Use:** Many desks anchor risk to this print. Above = bullish bias; below = bearish. **IBH/IBL** breaks during London/NY carry the most signal.
### 📊 CVD / Delta (Flow)
* Net buyer vs seller pressure with smooth trend state.
**Use:** **Rising CVD + acceptance above mid/POC** confirms continuation. Bearish price + rising CVD = caution (possible absorption).
### ⚡ Volume-Weighted Momentum
* Momentum adjusted by participation quality (volume).
**Use:** Momentum>MA and >0 → trend drive is “real”; <0 and falling → distribution risk.
### 🔥 Aggression Detector
* ROC × normalized volume × wick factor to flag **forceful** candles.
**Use:** On spikes, avoid fading blindly—wait for pullbacks into **aligned FVG** or for aggression to cool.
### 🟦🟪 Fair Value Gaps (with MTF)
* Detects up to 3 recent FVGs and marks the **nearest** side to price.
**Use:** Trend pullbacks into **bullish FVG** for longs; bounces into **bearish FVG** for shorts. Optional threshold to filter weak gaps.
### 🧭 24h Gauge (positioning)
* Shows current price across the 24h low⇢high with a mid reference.
**Use:** Above mid and pushing upper third = momentum continuation setups; below mid = sell the rips bias.
### 🧱 Daily Volume Profile (manual per day)
* **VAH / POC / VAL** derived from discretized rows.
**Use:** **POC below** supports longs; **POC above** caps rallies. Fade VAH/VAL in ranges; treat them as break/hold levels in trends.
### 📈 ATR Regime
* **ATR vs ATR-avg** with direction and regime flag (**HIGH / NORMAL / LOW**).
**Use:** HIGH ⇒ give trades room & favor trend following. LOW ⇒ fade edges, scale targets.
### 🕯️ Candle Patterns (contextual, not standalone)
* Engulfings, Morning/Evening Star, 3 Soldiers/Crows, Harami, Hammer/Shooting Star, Double Top/Bottom.
**Use:** Only with session + flow + momentum alignment.
### 🤝 Price–Volume Classification
* Labels each bar as **continuation**, **exhaustion**, **distribution**, or **healthy pullback**.
**Use:** Align continuation reads with trend; treat “Price↑ + Vol↓” as a caution flag.
### 🧪 Confluence Scoreboard & B/S Meter
* Ten elements vote: 🔵 bull, ⚪ neutral, 🟣 bear.
**Use:** Execution filter—take setups when the board’s skew matches your trade direction.
---
## Playbooks (actionable)
**Trend Pullback (Long)**
1. London/NY active, Momentum↑, CVD↑, price above 24h mid & POC.
2. Pullback into **nearest bullish FVG**.
3. Invalidate under FVG low or **true-close** line.
4. Targets: IBH → VAH → 24h high.
**Range Fade (Short)**
1. Asia/quiet regime, **Price↑ + Vol↓** into **VAH**, ATR low.
2. Nearest FVG bearish or scoreboard skew bearish.
3. Invalidate above VAH/IBH.
4. Targets: POC → VAL.
**News/Impulse**
Aggression spike? Don’t chase. Let it pull back into the aligned FVG; require CVD/Momentum agreement before entry.
---
## Alerts (included)
* **Bull/Bear Confluence ≥ 7/10**
* **Intraday Target Achieved** / **Daily Target Achieved**
* **Session True-Close Retests** (Sydney/Tokyo/London/NY)
*(Keep alerts “Once per bar” unless you specifically want intrabar triggers.)*
---
## Setup Tips
* **UTC**: Choose the reference that matches how you track sessions (default UTC+2).
* **Volume threshold**: 2.0× is a strong baseline; raise for noisy alts, lower for majors.
* **CVD smoothing**: 14–24 for scalps; 24–34 for slower markets.
* **ATR lengths**: Keep defaults unless your asset has a persistent regime shift.
---
## Why this framework?
Because **timing (sessions)**, **truth (flow)**, and **location (value/FVG)** together beat any single signal. You get *who is trading*, *how strong the push is*, and *where risk lives*—on one screen—so execution is faster and cleaner.
---
**Disclaimer**: Educational use only. Not financial advice. Markets are risky—backtest and size responsibly.
Aibuyzone Vector Strategy – Floating DashboardAibuyzone Vector Strategy – Floating Dashboard (Indicator)
Educational indicator that highlights potential “vector” candles (expanded-range bodies with optional wick-imbalance and volume-spike filters) and overlays basic trend/momentum context. Not financial advice.
What it does
Identifies potential vector candles using body-to-range %, ATR expansion, optional wick-imbalance ratio, and optional volume spike.
Optional 3-bar FVG alignment (in signal direction).
Trend filter using EMA Fast/Slow, with an optional higher-timeframe EMA.
Momentum context via RSI.
Optional floating dashboard summarizing the current state (toggle in settings).
Signals & visuals
Long setup: triangle below bar when vector criteria + trend + momentum align.
Short setup: triangle above bar on bearish alignment.
EMA Fast/Slow are plotted for trend context.
Alerts: “AIBZ Vector Long/Short”.
Inputs (key)
Vector: Body% minimum, ATR length & multiple, wick-imbalance ratio.
Volume: SMA length & spike multiple.
Trend: EMA Fast/Slow; optional HTF EMA and timeframe.
Momentum: RSI length and thresholds.
Display: label size/offset/colors; floating dashboard (Last bar / Every bar); optional watermark with symbol, timeframe, and script name.
Screenshot Mode: hides labels & dashboard for a clean publication chart.
How to use (example workflow)
Use on standard candle charts (not Heikin Ashi/Renko/Kagi/P&F/Range).
Confirm trend (EMA Fast vs. Slow and optional HTF EMA).
Look for a vector signal in trend direction and verify RSI context.
Manage risk independently; this tool does not place orders or provide trade management.
Limitations
Past signals don’t guarantee future results.
HTF calculations use request.security and may differ from intrabar development.
Indicator (not a strategy()); no backtest P/L.
Attribution
Built in Pine v6 by @Aibuyzone. No third-party proprietary code included.
Release notes
v1.0: Initial public release.
RSI Breakout Zones█ OVERVIEW
“RSI Breakout Zones” is a technical analysis tool that identifies significant zones on the chart based on the Relative Strength Index (RSI). The indicator maps overbought (OB) and oversold (OS) zones using boxes, then extends them until the next zone of the same type is detected, highlighting breakout points to aid in trade entry decisions. These zones often serve as areas of consolidation, support, or resistance.
█ CONCEPTS
The indicator identifies overbought (above 70) and oversold (below 30) zones, drawing boxes that extend until the next zone of the same type (OB for OB, OS for OS) is detected. Breakout signals are generated when the price crosses the zone boundaries, indicating potential shifts in market momentum.
Why are RSI zones important? These zones represent areas of extreme market sentiment, often leading to corrections or reversals. Overbought zones suggest potential selling pressure, while oversold zones indicate buying opportunities. After a breakout, a zone may switch roles, e.g., from support to resistance or vice versa, making it a key element in price action analysis. Larger zones, formed during high volatility, may attract price for retests due to stronger imbalances in buyer/seller dynamics. Consolidation often occurs within these zones as the market seeks equilibrium before further moves. However, in strong trends, zones may be decisively broken without immediate pullbacks, and their significance depends on their position relative to key support and resistance levels.
█ FEATURES
- RSI Zone Detection: Calculates RSI with a customizable length (default 14) and identifies overbought/oversold zones based on user-defined levels (default 70/30), drawing boxes that dynamically adjust to price action within the zone.
- Customizable Boxes: Zones extend until the next zone of the same type is detected. The indicator draws zones with adjustable colors for overbought (red) and oversold (green) areas, with options for box and zone transparency.
- Breakout Signals: Generates upward (green triangle) and downward (red triangle) breakout signals when the price crosses the top or bottom of a zone. Signals appear below or above the bar, indicating potential trade entry points.
- Midline: Automatically draws a dashed line at the midpoint of each zone, helping traders assess price behavior within the zone and potential halfway retests.
- Box Management: Option to remove outdated boxes.
- Alerts: Built-in support for alerts on breakout signals, enabling traders to receive notifications for key zone crossings.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- RSI Settings: Adjust RSI Length (default 14), Overbought Level (default 70), and Oversold Level (default 30) to tailor zone detection sensitivity—higher lengths smooth signals for longer-term analysis.
- Box Settings: Configure colors and transparency for overbought (red) and oversold (green) zones, including box transparency (default 90) and zone transparency (default 90).
- Signal Settings: Customize breakout signal colors (green for upward, red for downward) and enable/disable keeping boxes after RSI normalization.
Interpreting Signals:
- Upward Breakout Signal: A green triangle below the bar indicates a breakout, suggesting potential bullish momentum and trend continuation or reversal.
- Downward Breakout Signal: A red triangle above the bar indicates a breakout, suggesting potential bearish momentum.
- RSI Zones: If the price re-enters a zone after a breakout, it may signal a false breakout or consolidation; persistent zones can act as future support/resistance levels. Consolidation often occurs within these zones as the market seeks equilibrium.
- Use signals alongside other technical analysis tools for confirmation, such as moving averages (to confirm trend direction), Fibonacci levels (to identify key price zones), or volume indicators (to validate breakout strength). Analyze RSI zones on higher timeframes for stronger signals due to broader market context.
█ APPLICATIONS
- Momentum Trading: Use RSI zones as overbought/oversold filters. In an uptrend, look for buying opportunities on upward breakouts, and in a downtrend, on downward breakouts. Combining with MACD crossovers, Fibonacci levels, or pivot points enhances zone significance.
- Inter-Zone Trading: Utilize breakouts from one RSI zone and hold the position until reaching the next zone, which may act as a target level or reversal point.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize RSI length and levels for your trading style.
- For best results, use in trending markets where RSI extremes are more predictive; in ranging markets, additional filters are recommended to reduce false signals.
- Always combine with risk management; RSI zones alone do not guarantee reversals, and false breakouts may occur in low-liquidity environments.
saodisengxiaoyu-lianghua-2.1- This indicator is a modular, signal-building framework designed to generate long and short signals by combining a chosen leading indicator with selectable confirmation filters. It runs on Pine Script version 5, overlays directly on price, and is built to be highly configurable so traders can tailor the signal logic to their market, timeframe, and trading style. It includes a dashboard to visualize which conditions are active and whether they validate a signal, and it outputs clear buy/sell labels and alert conditions so you can automate or monitor trades with confidence.
Core Design
- Leading Indicator: You choose one primary signal generator from a broad list (for example, Range Filter, Supertrend, MACD, RSI, Ichimoku, and many others). This serves as the anchor of the system and determines when a preliminary long or short setup exists.
- Confirmation Filters: You can enable additional filters that validate the leading signal before it becomes actionable. Each “respect…” input toggles a filter on or off. These filters include popular tools like EMA, 2/3 EMA crosses, RQK (Nadaraya Watson), ADX/DMI, Bollinger-based oscillators, MACD variations, QQE, Hull, VWAP, Choppiness Index, Damiani Volatility, and more.
- Signal Expiry: To avoid waiting indefinitely for confirmations, the indicator counts how many consecutive bars the leading condition holds. If confirmations do not align within a defined number of bars, the setup expires. This controls latency and helps reduce late or stale entries.
- Alternating Signals: An optional mode enforces alternation (long must follow short and vice versa), helping avoid repeated entries in the same direction without a meaningful reset.
- Aggregation Logic: The final long/short conditions are formed by combining the leading condition with all selected confirmation filters through logical conjunction. Only if all enabled filters validate the signal (within expiry constraints) does the indicator consider it a confirmed long or short.
- Visualization and Alerts: The script plots buy/sell labels at signal points, provides alert conditions for automation, and displays a compact dashboard summarizing the leading indicator’s status and each confirmation’s pass/fail result using checkmarks.
Leading Indicator Options
- The indicator includes a very large menu of leading tools, each with its own logic to determine uptrend or downtrend impulses. Highlights include:
- Range Filter: Uses a dynamic centerline and bands computed via conditional EMA/SMA and range sizing to define directional movement. It can operate in a default mode or an alternative “DW” mode.
- Rational Quadratic Kernel (RQK): Applies a kernel smoothing model (Nadaraya Watson) to detect uptrends and downtrends with a focus on noise reduction.
- Supertrend, Half Trend, SSL Channel: Classic trend-following tools that derive direction from ATR-based bands or moving average channels.
- Ichimoku Cloud and SuperIchi: Multi-component systems validating trend via cloud position, conversion/base line relationships, projected cloud, and lagging span.
- TSI (True Strength Index), DPO (Detrended Price Oscillator), AO (Awesome Oscillator), MACD, STC (Schaff Trend Cycle), QQE Mod: Momentum and cycle tools that parse direction from crossovers, zero-line behavior, and momentum shifts.
- Donchian Trend Ribbon, Chandelier Exit: Trend and exit tools that can validate breakouts or sustained trend strength.
- ADX/DMI: Measures trend strength and directional movement via +DI/-DI relationships and minimum ADX thresholds.
- RSI and Stochastic: Use crossovers, level exits, or threshold filters to gate entries based on overbought/oversold dynamics or relative strength trends.
- Vortex, Chaikin Money Flow, VWAP, Bull Bear Power, ROC, Wolfpack Id, Hull Suite: A diverse set of directional, momentum, and volume-based indicators to suit different markets and styles.
- Trendline Breakout and Range Detector: Price-behavior filters that confirm signals during breakouts or within defined ranges.
Confirmation Filters
- Each filter is optional. When enabled, it must validate the leading condition for a signal to pass. Examples:
- EMA Filter: Requires price to be above a specified EMA for longs and below for shorts, filtering signals that contradict broader trend or baseline levels.
- 2 EMA Cross and 3 EMA Cross: Enforce moving average cross conditions (fast above slow for long, the reverse for short) or a three-line stacking logic for more stringent trend alignment.
- RQK, Supertrend, Half Trend, Donchian, QQE, Hull, MACD (crossover vs. zero-line), AO (zero line or AC momentum variants), SSL: Each adds its characteristic validation pattern.
- RSI family (MA cross, exits OB/OS zones, threshold levels) plus RSI MA direction and RSI/RSI MA limits: Multiple ways to constrain signals via relative strength behavior and trajectories.
- Choppiness Index and Damiani Volatility: Prevent entries during ranging conditions or insufficient volatility; choppiness thresholds and volatility states gate the trade.
- VWAP, Volume modes (above MA, simple up/down, delta), Chaikin Money Flow: Volume and flow conditions that ensure signals happen in supportive liquidity or accumulation/distribution contexts.
- ADX/DMI thresholds: Demand a minimum trend strength and directional DI alignment to reduce whipsaw trades.
- Trendline Breakout and Range Detector: Confirm that the price is breaking structure or remains within active range consistent with the leading setup.
- By combining several filters you can create strict, conservative entries or looser setups depending on your goals.
Range Filter Engine
- A core building block, the Range Filter uses conditional EMA and SMA functions to compute adaptive bands around a dynamic centerline. It supports two types:
- Type 1: The centerline updates when price exceeds the band thresholds; bands define acceptable drift ranges.
- Type 2: Uses quantized steps (via floor operations) relative to the previous centerline to handle larger moves in discrete increments.
- The engine offers smoothing for range values using a secondary EMA and can switch between raw and averaged outputs. Its hi/lo bands and centerline compose a corridor that defines directional movement and potential breakout confirmation.
Signal Construction
- The script computes:
- leadinglongcond and leadingshortcond : The primary directional signals from the chosen leading indicator.
- longCond and shortCond : Final signals formed by combining the leading conditions with all enabled confirmations. Each confirmation contributes a boolean gate. If a filter is disabled, it contributes a neutral pass-through, keeping the logic intact without enforcing that condition.
- Expiry Logic: The code counts consecutive bars where the leading condition remains true. If confirmations do not line up within the user-defined “Signal Expiry Candle Count,” the setup is abandoned and the signal does not trigger.
- Alternation: An optional state ensures that long and short signals alternate. This can reduce repeated entries in the same direction without a clear reset.
- Finally, longCondition and shortCondition represent the actionable signals after expiry and alternation logic. These drive the label plotting and alert conditions.
Visualization
- Buy and Sell Labels: When longCondition or shortCondition confirm, the script plots annotated labels directly on the chart, making entries easy to see at a glance. The labels use color coding and clear text tags (“long” vs. “short”).
- Dashboard: A table summarizes the status of the leading indicator and all confirmations. Each row shows the indicator label and whether it passed (✔️) or failed (❌) on the current bar. This intensely practical UI helps you diagnose why a signal did or did not trigger, empowering faster strategy iteration and parameter tuning.
- Failed Confirmation Markers: If a setup expires (count exceeds the limit) and confirmations failed to align, the script can mark the chart with a small label and provide a tooltip listing which confirmations did not pass. It’s a helpful audit trail to understand missed trades or prevent “chasing” invalid signals.
- Data Window Values: The script outputs signal states to the data window, which can be useful for debugging or building composite conditions in multi-indicator templates.
Inputs and Parameters
- You control the indicator from a comprehensive input panel:
- Setup: Signal expiry count, whether to enforce alternating signals, and whether to display labels and the dashboard (including position and size).
- Leading Indicator: Choose the primary signal generator from the large list.
- Per-Filter Toggles: For each confirmation, a respect... toggle enables or disables it. Many include sub-options (like MACD type, Stochastic mode, RSI mode, ADX variants, thresholds for choppiness/volatility, etc.) to fine-tune behavior.
- Range Filter Settings: Choose type and behavior; select default vs. DW mode and smoothing. The underlying functions adjust band sizes using ATR, average change, standard deviation, or user-defined scales.
- Because everything is customizable, you can adapt the indicator to different assets, volatility regimes, and timeframes.
Alerts and Automation
- The script defines alert conditions tied to longCondition and shortCondition . You can set these alerts in your chart to trigger notifications or webhook calls for automated execution in external bots. The alert text is simple, and you can configure your own message template when creating alerts in the chart, including JSON payloads for algorithmic integration.
Typical Workflow
- Select a Leading Indicator aligned with your style. For trend following, Supertrend or SSL may be appropriate; for momentum, MACD or TSI; for range/trend-change detection, Range Filter, RQK, or Donchian.
- Add a few key Confirmation Filters that complement the leading signal. For example:
- Pair Supertrend with EMA Filter and RSI MA Direction to ensure trend alignment and positive momentum.
- Combine MACD Crossover with ADX/DMI and Volume Above MA to avoid signals in low-trend or low-liquidity conditions.
- Use RQK with Choppiness Index and Damiani Volatility to only act when the market is trending and volatile enough.
- Set a sensible Signal Expiry Candle Count. Shorter expiry keeps entries timely and reduces lag; longer expiry captures setups that mature slowly.
- Observe the Dashboard during live markets to see which filters pass or fail, then iterate. Tighten or loosen thresholds and filter combinations as needed.
- For automation, turn on alerts for the final conditions and use webhook payloads to notify your trading robot.
Strengths and Practical Notes
- Flexibility: The indicator is a toolkit rather than a single rigid model. It lets you test different combinations rapidly and visualize outcomes immediately.
- Clarity: Labels, dashboard, and failed-confirmation markers make it easy to audit behavior and refine settings without digging into code.
- Robustness: The expiry and alternation options add discipline, avoiding the temptation to enter late or repeatedly in one direction without a reset.
- Modular Design: The logical gates (“respect…”) make the behavior transparent: if a filter is on, it must pass; if it’s off, the signal ignores it. This keeps reasoning clean.
- Avoiding Overfitting: Because you can stack many filters, it’s tempting to over-constrain signals. Start simple (one leading indicator and one or two confirmations). Add complexity only if it demonstrably improves your edge across varied market regimes.
Limitations and Recommendations
- No single configuration is universally optimal. Markets change; tune filters for the instrument and timeframe you trade and revisit settings periodically.
- Trend filters can underperform in choppy markets; likewise, momentum filters can false-trigger in quiet periods. Consider using Choppiness Index or Damiani to gate signals by regime.
- Use expiry wisely. Too short may miss good setups that need a few bars to confirm; too long may cause late entries. Balance responsiveness and accuracy.
- Always consider risk management externally (position sizing, stops, profit targets). The indicator focuses on signal quality; combining it with robust trade management methods will improve results.
Example Configurations
- Trend-Following Setup:
- Leading: Supertrend uptrend for longs and downtrend for shorts.
- Confirmations: EMA Filter (price above 200 EMA for long, below for short), ADX/DMI (trend strength above threshold with +DI/-DI alignment), Volume Above MA.
- Expiry: 3–4 bars to keep entries timely.
- Result: Strong bias toward sustained moves while avoiding weak trends and thin liquidity.
- Mean-Reversion to Momentum Crossover:
- Leading: RSI exits from OB/OS zones (e.g., RSI leaves oversold for long and leaves overbought for short).
- Confirmations: 2 EMA Cross (fast crossing slow in the same direction), MACD zero-line behavior for added momentum validation.
- Expiry: 2–3 bars for responsive re-entry.
- Result: Captures momentum transitions after short-term extremes, with extra confirmation to reduce head-fakes.
- Range Breakout Focus:
- Leading: Range Filter Type 2 or Donchian Trend Ribbon to detect breakouts.
- Confirmations: Damiani Volatility (avoid low-volatility false breaks), Choppiness Index (prefer trend-ready states), ROC positive/negative threshold.
- Expiry: 1–3 bars to act on breakout windows.
- Result: Better alignment to breakout dynamics, gating trades by volatility and regime.
Conclusion
- This indicator is a comprehensive, configurable framework that merges a chosen leading signal with an array of corroborating filters, disciplined expiry handling, and intuitive visualization. It’s designed to help you build high-quality entry signals tailored to your approach, whether that’s trend-following, breakout trading, momentum capturing, or a hybrid. By surfacing pass/fail states in a dashboard and allowing alert-based automation, it bridges the gap between discretionary analysis and systematic execution. With sensible parameter tuning and thoughtful filter selection, it can serve as a robust backbone for signal generation across diverse instruments and timeframes.
Enhanced OB Retest Strategy v7.0The OB Retest Strategy is a full Order Block retest trading system that detects, plots, and trades OB zones across multiple timeframes. It uses structure breaks, retrace depth, and ATR filters to identify strong reversal or continuation setups.
⸻
⚙️ Core Features
• Multi-timeframe OB detection using break-of-structure (BOS) logic
• Automatic zone creation for bullish and bearish order blocks
• Smart merging of overlapping OB zones
• Dynamic flip-zone logic that turns invalidated OBs into new zones
• Wick zone detection for high-precision entries
• ATR-based trailing stop and optional breakeven
• Adjustable retrace depth, breakout %, and ATR filters
• Built-in performance table showing PnL, win rate, and total trades
• Fully backtestable with date range and commission control
⸻
🧠 Logic Summary
1. Detects a BOS on the higher timeframe.
2. Identifies the last opposing candle as the valid OB.
3. Validates the OB based on ATR size and breakout strength.
4. Waits for price to retest the zone to a set depth.
5. Executes trades and manages exits using trailing stop or breakeven.
6. Flips invalidated zones automatically.
⸻
💡 Usage Tips
• Best used on 1H to 4H charts for swing setups.
• Tune ATR and breakout thresholds for your market’s volatility.
• Combine with higher-timeframe bias or liquidity levels for better accuracy.
⸻
⚠️ Notes
• For educational and testing purposes only.
• Backtested results do not predict future performance.
• Always test before live use.
Relative Strength Index Remastered [CHE]Relative Strength Index Remastered — Enhanced RSI with robust divergence detection using price-based pivots and line-of-sight validation to reduce false signals compared to the standard RSI indicator.
Summary
RSI Remastered builds on the classic Relative Strength Index by adding a more reliable divergence detection system that relies on price pivots rather than RSI pivots alone, incorporating a line-of-sight check to ensure the RSI path between points remains clear. This approach filters out many false divergences that occur in the original RSI indicator due to its volatile pivot detection on the RSI line itself. Users benefit from clearer reversal and continuation signals, especially in noisy markets, with optional hidden divergence support for trend confirmation. The core RSI calculation and smoothing options remain familiar, but the divergence logic provides materially fewer alerts while maintaining sensitivity.
Motivation: Why this design?
The standard RSI indicator often generates misleading divergence signals because it detects pivots directly on the RSI values, which can fluctuate erratically in volatile conditions, leading to frequent false positives that confuse traders during ranging or choppy price action. RSI Remastered addresses this by shifting pivot detection to the underlying price highs and lows, which are more stable, and adding a validation step that confirms the RSI line does not cross the direct path between pivot points. This design targets the real problem of over-signaling in the original, promoting more actionable insights without altering the RSI's core momentum measurement.
What’s different vs. standard approaches?
- Reference baseline: The classical TradingView RSI indicator, which uses simple RSI-based pivot detection for divergences.
- Architecture differences:
- Pivot identification on price extremes (highs and lows) instead of RSI values, extracting RSI levels at those points for comparison.
- Addition of a line-of-sight validation that checks the RSI path bar by bar between pivots to prevent signals where the line is interrupted.
- Inclusion of hidden divergence types alongside regular ones, using the same robust framework.
- Configurable drawing of connecting lines between validated pivot RSI points for visual clarity.
- Practical effect: Charts show fewer but higher-quality divergence markers and lines, reducing clutter from the original's frequent RSI pivot triggers; this matters for avoiding whipsaws in intraday trading, where the standard version might flag dozens of invalid setups per session.
Key Comparison Aspects
Aspect: Title/Shorttitle
Original RSI: "Relative Strength Index" / "RSI"
Robust Variant: "Relative Strength Index Remastered " / "RSI RM"
Aspect: Max. Lines/Labels
Original RSI: No specification (Standard: 50/50)
Robust Variant: max_lines_count=200, max_labels_count=200 (for more lines/markers in divergences)
Aspect: RSI Calculation & Plots
Original RSI: Identical: RSI with RMA, Plots (line, bands, gradient fills)
Robust Variant: Identical: RSI with RMA, Plots (line, bands, gradient fills)
Aspect: Smoothing (MA)
Original RSI: Identical: Inputs for MA types (SMA, EMA etc.), Bollinger Bands optional
Robust Variant: Identical: Inputs for MA types (SMA, EMA etc.), Bollinger Bands optional
Aspect: Divergence Activation
Original RSI: input.bool(false, "Calculate Divergence") (disabled by default)
Robust Variant: input.bool(true, "Calculate Divergence") (enabled by default, with tooltip)
Aspect: Pivot Calculation
Original RSI: Pivots on RSI (ta.pivotlow/high on RSI values)
Robust Variant: Pivots on price (ta.pivotlow/high on low/high), RSI values then extracted
Aspect: Lookback Values
Original RSI: Fixed: lookbackLeft=5, lookbackRight=5
Robust Variant: Input: L=5 (Pivot Left), R=5 (Pivot Right), adjustable (min=1, max=50)
Aspect: Range Between Pivots
Original RSI: Fixed: rangeUpper=60, rangeLower=5 (via _inRange function)
Robust Variant: Input: rangeUpper=60 (Max Bars), rangeLower=5 (Min Bars), adjustable (min=1–6, max=100–300)
Aspect: Divergence Types
Original RSI: Only Regular Bullish/Bearish: - Bull: Price LL + RSI HL - Bear: Price HH + RSI LH
Robust Variant: Regular + Hidden (optional via showHidden=true): - Regular Bull: Price LL + RSI HL - Regular Bear: Price HH + RSI LH - Hidden Bull: Price HL + RSI LL - Hidden Bear: Price LH + RSI HH
Aspect: Validation
Original RSI: No additional check (only pivot + range check)
Robust Variant: Line-of-Sight Check: RSI line must not cross the connecting line between pivots (line_clear function with slope calculation and loop for each bar in between)
Aspect: Signals (Plots/Shapes)
Original RSI: - Plot of pivot points (if divergence) - Shapes: "Bull"/"Bear" at RSI value, offset=-5
Robust Variant: - No pivot plots, instead shapes at RSI , offset=-R (adjustable) - Shapes: "Bull"/"Bear" (Regular), "HBull"/"HBear" (Hidden) - Colors: Lime/Red (Regular), Teal/Orange (Hidden)
Aspect: Line Drawing
Original RSI: No lines
Robust Variant: Optional (showLines=true): Lines between RSI pivots (thick for regular, dashed/thin for hidden), extend=none
Aspect: Alerts
Original RSI: Only Regular Bullish/Bearish (with pivot lookback reference)
Robust Variant: Regular Bullish/Bearish + Hidden Bullish/Bearish (specific "at latest pivot low/high")
Aspect: Robustness
Original RSI: Simple, prone to false signals (RSI pivots can be volatile)
Robust Variant: Higher: Price pivots are more stable, line-of-sight filters "broken" divergences, hidden support for trend continuations
Aspect: Code Length/Structure
Original RSI: ~100 lines, simple if-blocks for bull/bear
Robust Variant: ~150 lines, extended helper functions (e.g., inRange, line_clear), var group for inputs
How it works (technical)
The indicator first computes the core RSI value based on recent price changes, separating upward and downward movements over the specified length and smoothing them to derive a momentum reading scaled between zero and one hundred. This value is then plotted in a separate pane with fixed upper and lower reference lines at seventy and thirty, along with optional gradient fills to highlight overbought and oversold zones.
For smoothing, a moving average type is applied to the RSI if enabled, with an option to add bands around it based on the variability of recent RSI values scaled by a multiplier. Divergence detection activates on confirmed price pivots: lows for bullish checks and highs for bearish. At each new pivot, the system retrieves the bar index and values (price and RSI) for the current and prior pivot, ensuring they fall within a configurable bar range to avoid unrelated points.
Comparisons then assess whether the price has made a lower low (or higher high) while the RSI at those points moves in the opposite direction—higher for bullish regular, lower for bearish regular. For hidden types, the directions reverse to capture trend strength. The line-of-sight check calculates the straight path between the two RSI points and verifies that the actual RSI values in between stay entirely above (for bullish) or below (for bearish) that path, breaking the signal if any bar violates it. Valid signals trigger shapes at the RSI level of the new pivot and optional lines connecting the points. Initialization uses built-in functions to track prior occurrences, with states persisting across bars for accurate historical comparisons. No higher timeframe data is used, so confirmation occurs after the right pivot bars close, minimizing live-bar repaints.
Parameter Guide
Length — Controls the period for measuring price momentum changes — Default: 14 — Trade-offs/Tips: Shorter values increase responsiveness but add noise and more false signals; longer smooths trends but delays entries in fast markets.
Source — Selects the price input for RSI calculation — Default: Close — Trade-offs/Tips: Use high or low for volatility focus, but close works best for most assets; mismatches can skew overbought/oversold reads.
Calculate Divergence — Enables the enhanced divergence logic — Default: True — Trade-offs/Tips: Disable for pure RSI view to save computation; essential for signal reliability over the standard method.
Type (Smoothing) — Chooses the moving average applied to RSI — Default: SMA — Trade-offs/Tips: None for raw RSI; EMA for quicker adaptation, but SMA reduces whipsaws; Bollinger Bands option adds volatility context at cost of added lines.
Length (Smoothing) — Period for the smoothing average — Default: 14 — Trade-offs/Tips: Match RSI length for consistency; shorter boosts signal speed but amplifies noise in the smoothed line.
BB StdDev — Multiplier for band width around smoothed RSI — Default: 2.0 — Trade-offs/Tips: Lower narrows bands for tighter signals, risking more touches; higher widens for fewer but stronger breakouts.
Pivot Left — Bars to the left for confirming price pivots — Default: 5 — Trade-offs/Tips: Increase for stricter pivots in noisy data, reducing signals; too high delays confirmation excessively.
Pivot Right — Bars to the right for confirming price pivots — Default: 5 — Trade-offs/Tips: Balances with left for symmetry; longer right ensures maturity but shifts signals backward.
Max Bars Between Pivots — Upper limit on distance for valid pivot pairs — Default: 60 — Trade-offs/Tips: Tighten for short-term trades to focus recent action; widen for swing setups but risks unrelated comparisons.
Min Bars Between Pivots — Lower limit to avoid clustered pivots — Default: 5 — Trade-offs/Tips: Raise to filter micro-moves; too low invites overlapping signals like the original RSI.
Detect Hidden — Includes trend-continuation hidden types — Default: True — Trade-offs/Tips: Enable for full trend analysis; disable simplifies to reversals only, akin to basic RSI.
Draw Lines — Shows connecting lines between valid pivots — Default: True — Trade-offs/Tips: Turn off for cleaner charts; helps visually confirm line-of-sight in backtests.
Reading & Interpretation
The main RSI line oscillates between zero and one hundred, crossing above fifty suggesting building momentum and below indicating weakness; touches near seventy or thirty flag potential extremes. The optional smoothed line and bands provide a filtered view—price above the upper band on the RSI pane hints at overextension. Divergence shapes appear as upward labels for bullish (lime for regular, teal for hidden) and downward for bearish (red regular, orange hidden) at the pivot's RSI level, signaling a mismatch only after validation. Connecting lines, if drawn, slope between points without RSI interference, their color matching the shape type; a dashed style denotes hidden. Fewer shapes overall compared to the standard RSI mean higher conviction, but always confirm with price structure.
Practical Workflows & Combinations
- Trend following: Enter longs on regular bullish shapes near support with higher highs in price; filter hidden bullish for pullback buys in uptrends, pairing with a rising smoothed RSI above fifty.
- Exits/Stops: Use bearish regular as reversal warnings to tighten stops; hidden bearish in downtrends confirms continuation—exit if lines show RSI crossing the path.
- Multi-asset/Multi-TF: Defaults suit forex and stocks on one-hour charts; for crypto volatility, widen pivot ranges to ten; scale min/max bars proportionally on daily for swings, avoiding the original's intraday spam.
Behavior, Constraints & Performance
Signals confirm only after the right pivot bars close, so live bars may show tentative pivots that vanish on close, unlike the standard RSI's immediate RSI-pivot triggers—plan for this delay in automation. No higher timeframe calls, so no security-related repaints. Resources include up to two hundred lines and labels for dense charts, with a loop in validation scanning up to three hundred bars between pivots, which is efficient but could slow on very long histories. Known limits: Slight lag at pivot confirmation in trending markets; volatile RSI might rarely miss fine path violations; not ideal for gap-heavy assets where pivots skip.
Sensible Defaults & Quick Tuning
Start with defaults for balanced momentum and divergence on most timeframes. For too many signals (like the original), raise pivot left/right to eight and min bars to ten to filter noise. If sluggish in trends, shorten RSI length to nine and enable EMA smoothing for faster adaptation. In high-volatility assets, widen max bars to one hundred but disable hidden to focus essentials. For clean reversal hunts, set smoothing to none and lines on.
What this indicator is—and isn’t
RSI Remastered serves as a refined momentum and divergence visualization tool, enhancing the standard RSI for better signal quality in technical analysis setups. It is not a standalone trading system, nor does it predict price moves—pair it with volume, structure breaks, and risk rules for decisions. Use alongside position sizing and broader context, not in isolation.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Market Zone Analyzer[BullByte]Understanding the Market Zone Analyzer
---
1. Purpose of the Indicator
The Market Zone Analyzer is a Pine Script™ (version 6) indicator designed to streamline market analysis on TradingView. Rather than scanning multiple separate tools, it unifies four core dimensions—trend strength, momentum, price action, and market activity—into a single, consolidated view. By doing so, it helps traders:
• Save time by avoiding manual cross-referencing of disparate signals.
• Reduce decision-making errors that can arise from juggling multiple indicators.
• Gain a clear, reliable read on whether the market is in a bullish, bearish, or sideways phase, so they can more confidently decide to enter, exit, or hold a position.
---
2. Why a Trader Should Use It
• Unified View: Combines all essential market dimensions into one easy-to-read score and dashboard, eliminating the need to piece together signals manually.
• Adaptability: Automatically adjusts its internal weighting for trend, momentum, and price action based on current volatility. Whether markets are choppy or calm, the indicator remains relevant.
• Ease of Interpretation: Outputs a simple “BULLISH,” “BEARISH,” or “SIDEWAYS” label, supplemented by an intuitive on-chart dashboard and an oscillator plot that visually highlights market direction.
• Reliability Features: Built-in smoothing of the net score and hysteresis logic (requiring consecutive confirmations before flips) minimize false signals during noisy or range-bound phases.
---
3. Why These Specific Indicators?
This script relies on a curated set of well-established technical tools, each chosen for its particular strength in measuring one of the four core dimensions:
1. Trend Strength:
• ADX/DMI (Average Directional Index / Directional Movement Index): Measures how strong a trend is, and whether the +DI line is above the –DI line (bullish) or vice versa (bearish).
• Moving Average Slope (Fast MA vs. Slow MA): Compares a shorter-period SMA to a longer-period SMA; if the fast MA sits above the slow MA, it confirms an uptrend, and vice versa for a downtrend.
• Ichimoku Cloud Differential (Senkou A vs. Senkou B): Provides a forward-looking view of trend direction; Senkou A above Senkou B signals bullishness, and the opposite signals bearishness.
2. Momentum:
• Relative Strength Index (RSI): Identifies overbought (above its dynamically calculated upper bound) or oversold (below its lower bound) conditions; changes in RSI often precede price reversals.
• Stochastic %K: Highlights shifts in short-term momentum by comparing closing price to the recent high/low range; values above its upper band signal bullish momentum, below its lower band signal bearish momentum.
• MACD Histogram: Measures the difference between the MACD line and its signal line; a positive histogram indicates upward momentum, a negative histogram indicates downward momentum.
3. Price Action:
• Highest High / Lowest Low (HH/LL) Range: Over a defined lookback period, this captures breakout or breakdown levels. A closing price near the recent highs (with a positive MA slope) yields a bullish score, and near the lows (with a negative MA slope) yields a bearish score.
• Heikin-Ashi Doji Detection: Uses Heikin-Ashi candles to identify indecision or continuation patterns. A small Heikin-Ashi body (doji) relative to recent volatility is scored as neutral; a larger body in the direction of the MA slope is scored bullish or bearish.
• Candle Range Measurement: Compares each candle’s high-low range against its own dynamic band (average range ± standard deviation). Large candles aligning with the prevailing trend score bullish or bearish accordingly; unusually small candles can indicate exhaustion or consolidation.
4. Market Activity:
• Bollinger Bands Width (BBW): Measures the distance between BB upper and lower bands; wide bands indicate high volatility, narrow bands indicate low volatility.
• Average True Range (ATR): Quantifies average price movement (volatility). A sudden spike in ATR suggests a volatile environment, while a contraction suggests calm.
• Keltner Channels Width (KCW): Similar to BBW but uses ATR around an EMA. Provides a second layer of volatility context, confirming or contrasting BBW readings.
• Volume (with Moving Average): Compares current volume to its moving average ± standard deviation. High volume validates strong moves; low volume signals potential lack of conviction.
By combining these tools, the indicator captures trend direction, momentum strength, price-action nuances, and overall market energy, yielding a more balanced and comprehensive assessment than any single tool alone.
---
4. What Makes This Indicator Stand Out
• Multi-Dimensional Analysis: Rather than relying on a lone oscillator or moving average crossover, it simultaneously evaluates trend, momentum, price action, and activity.
• Dynamic Weighting: The relative importance of trend, momentum, and price action adjusts automatically based on real-time volatility (Market Activity State). For example, in highly volatile conditions, trend and momentum signals carry more weight; in calm markets, price action signals are prioritized.
• Stability Mechanisms:
• Smoothing: The net score is passed through a short moving average, filtering out noise, especially on lower timeframes.
• Hysteresis: Both Market Activity State and the final bullish/bearish/sideways zone require two consecutive confirmations before flipping, reducing whipsaw.
• Visual Interpretation: A fully customizable on-chart dashboard displays each sub-indicator’s value, regime, score, and comment, all color-coded. The oscillator plot changes color to reflect the current market zone (green for bullish, red for bearish, gray for sideways) and shows horizontal threshold lines at +2, 0, and –2.
---
5. Recommended Timeframes
• Short-Term (5 min, 15 min): Day traders and scalpers can benefit from rapid signals, but should enable smoothing (and possibly disable hysteresis) to reduce false whipsaws.
• Medium-Term (1 h, 4 h): Swing traders find a balance between responsiveness and reliability. Less smoothing is required here, and the default parameters (e.g., ADX length = 14, RSI length = 14) perform well.
• Long-Term (Daily, Weekly): Position traders tracking major trends can disable smoothing for immediate raw readings, since higher-timeframe noise is minimal. Adjust lookback lengths (e.g., increase adxLength, rsiLength) if desired for slower signals.
Tip: If you keep smoothing off, stick to timeframes of 1 h or higher to avoid excessive signal “chatter.”
---
6. How Scoring Works
A. Individual Indicator Scores
Each sub-indicator is assigned one of three discrete scores:
• +1 if it indicates a bullish condition (e.g., RSI above its dynamically calculated upper bound).
• 0 if it is neutral (e.g., RSI between upper and lower bounds).
• –1 if it indicates a bearish condition (e.g., RSI below its dynamically calculated lower bound).
Examples of individual score assignments:
• ADX/DMI:
• +1 if ADX ≥ adxThreshold and +DI > –DI (strong bullish trend)
• –1 if ADX ≥ adxThreshold and –DI > +DI (strong bearish trend)
• 0 if ADX < adxThreshold (trend strength below threshold)
• RSI:
• +1 if RSI > RSI_upperBound
• –1 if RSI < RSI_lowerBound
• 0 otherwise
• ATR (as part of Market Activity):
• +1 if ATR > (ATR_MA + stdev(ATR))
• –1 if ATR < (ATR_MA – stdev(ATR))
• 0 otherwise
Each of the four main categories shares this same +1/0/–1 logic across their sub-components.
B. Category Scores
Once each sub-indicator reports +1, 0, or –1, these are summed within their categories as follows:
• Trend Score = (ADX score) + (MA slope score) + (Ichimoku differential score)
• Momentum Score = (RSI score) + (Stochastic %K score) + (MACD histogram score)
• Price Action Score = (Highest-High/Lowest-Low score) + (Heikin-Ashi doji score) + (Candle range score)
• Market Activity Raw Score = (BBW score) + (ATR score) + (KC width score) + (Volume score)
Each category’s summed value can range between –3 and +3 (for Trend, Momentum, and Price Action), and between –4 and +4 for Market Activity raw.
C. Market Activity State and Dynamic Weight Adjustments
Rather than contributing directly to the netScore like the other three categories, Market Activity determines how much weight to assign to Trend, Momentum, and Price Action:
1. Compute Market Activity Raw Score by summing BBW, ATR, KCW, and Volume individual scores (each +1/0/–1).
2. Bucket into High, Medium, or Low Activity:
• High if raw Score ≥ 2 (volatile market).
• Low if raw Score ≤ –2 (calm market).
• Medium otherwise.
3. Apply Hysteresis (if enabled): The state only flips after two consecutive bars register the same high/low/medium label.
4. Set Category Weights:
• High Activity: Trend = 50 %, Momentum = 35 %, Price Action = 15 %.
• Low Activity: Trend = 25 %, Momentum = 20 %, Price Action = 55 %.
• Medium Activity: Use the trader’s base weight inputs (e.g., Trend = 40 %, Momentum = 30 %, Price Action = 30 % by default).
D. Calculating the Net Score
5. Normalize Base Weights (so that the sum of Trend + Momentum + Price Action always equals 100 %).
6. Determine Current Weights based on the Market Activity State (High/Medium/Low).
7. Compute Each Category’s Contribution: Multiply (categoryScore) × (currentWeight).
8. Sum Contributions to get the raw netScore (a floating-point value that can exceed ±3 when scores are strong).
9. Smooth the netScore over two bars (if smoothing is enabled) to reduce noise.
10. Apply Hysteresis to the Final Zone:
• If the smoothed netScore ≥ +2, the bar is classified as “Bullish.”
• If the smoothed netScore ≤ –2, the bar is classified as “Bearish.”
• Otherwise, it is “Sideways.”
• To prevent rapid flips, the script requires two consecutive bars in the new zone before officially changing the displayed zone (if hysteresis is on).
E. Thresholds for Zone Classification
• BULLISH: netScore ≥ +2
• BEARISH: netScore ≤ –2
• SIDEWAYS: –2 < netScore < +2
---
7. Role of Volatility (Market Activity State) in Scoring
Volatility acts as a dynamic switch that shifts which category carries the most influence:
1. High Activity (Volatile):
• Detected when at least two sub-scores out of BBW, ATR, KCW, and Volume equal +1.
• The script sets Trend weight = 50 % and Momentum weight = 35 %. Price Action weight is minimized at 15 %.
• Rationale: In volatile markets, strong trending moves and momentum surges dominate, so those signals are more reliable than nuanced candle patterns.
2. Low Activity (Calm):
• Detected when at least two sub-scores out of BBW, ATR, KCW, and Volume equal –1.
• The script sets Price Action weight = 55 %, Trend = 25 %, and Momentum = 20 %.
• Rationale: In quiet, sideways markets, subtle price-action signals (breakouts, doji patterns, small-range candles) are often the best early indicators of a new move.
3. Medium Activity (Balanced):
• Raw Score between –1 and +1 from the four volatility metrics.
• Uses whatever base weights the trader has specified (e.g., Trend = 40 %, Momentum = 30 %, Price Action = 30 %).
Because volatility can fluctuate rapidly, the script employs hysteresis on Market Activity State: a new High or Low state must occur on two consecutive bars before weights actually shift. This avoids constant back-and-forth weight changes and provides more stability.
---
8. Scoring Example (Hypothetical Scenario)
• Symbol: Bitcoin on a 1-hour chart.
• Market Activity: Raw volatility sub-scores show BBW (+1), ATR (+1), KCW (0), Volume (+1) → Total raw Score = +3 → High Activity.
• Weights Selected: Trend = 50 %, Momentum = 35 %, Price Action = 15 %.
• Trend Signals:
• ADX strong and +DI > –DI → +1
• Fast MA above Slow MA → +1
• Ichimoku Senkou A > Senkou B → +1
→ Trend Score = +3
• Momentum Signals:
• RSI above upper bound → +1
• MACD histogram positive → +1
• Stochastic %K within neutral zone → 0
→ Momentum Score = +2
• Price Action Signals:
• Highest High/Lowest Low check yields 0 (close not near extremes)
• Heikin-Ashi doji reading is neutral → 0
• Candle range slightly above upper bound but trend is strong, so → +1
→ Price Action Score = +1
• Compute Net Score (before smoothing):
• Trend contribution = 3 × 0.50 = 1.50
• Momentum contribution = 2 × 0.35 = 0.70
• Price Action contribution = 1 × 0.15 = 0.15
• Raw netScore = 1.50 + 0.70 + 0.15 = 2.35
• Since 2.35 ≥ +2 and hysteresis is met, the final zone is “Bullish.”
Although the netScore lands at 2.35 (Bullish), smoothing might bring it slightly below 2.00 on the first bar (e.g., 1.90), in which case the script would wait for a second consecutive reading above +2 before officially classifying the zone as Bullish (if hysteresis is enabled).
---
9. Correlation Between Categories
The four categories—Trend Strength, Momentum, Price Action, and Market Activity—often reinforce or offset one another. The script takes advantage of these natural correlations:
• Bullish Alignment: If ADX is strong and pointed upward, fast MA is above slow MA, and Ichimoku is positive, that usually coincides with RSI climbing above its upper bound and the MACD histogram turning positive. In such cases, both Trend and Momentum categories generate +1 or +2. Because the Market Activity State is likely High (given the accompanying volatility), Trend and Momentum weights are at their peak, so the netScore quickly crosses into Bullish territory.
• Sideways/Consolidation: During a low-volatility, sideways phase, ADX may fall below its threshold, MAs may flatten, and RSI might hover in the neutral band. However, subtle price-action signals (like a small breakout candle or a Heikin-Ashi candle with a slight bias) can still produce a +1 in the Price Action category. If Market Activity is Low, Price Action’s weight (55 %) can carry enough influence—even if Trend and Momentum are neutral—to push the netScore out of “Sideways” into a mild bullish or bearish bias.
• Opposing Signals: When Trend is bullish but Momentum turns negative (for example, price continues up but RSI rolls over), the two scores can partially cancel. Market Activity may remain Medium, in which case the netScore lingers near zero (Sideways). The trader can then wait for either a clearer momentum shift or a fresh price-action breakout before committing.
By dynamically recognizing these correlations and adjusting weights, the indicator ensures that:
• When Trend and Momentum align (and volatility supports it), the netScore leaps strongly into Bullish or Bearish.
• When Trend is neutral but Price Action shows an early move in a low-volatility environment, Price Action’s extra weight in the Low Activity State can still produce actionable signals.
---
10. Market Activity State & Its Role (Detailed)
The Market Activity State is not a direct category score—it is an overarching context setter for how heavily to trust Trend, Momentum, or Price Action. Here’s how it is derived and applied:
1. Calculate Four Volatility Sub-Scores:
• BBW: Compare the current band width to its own moving average ± standard deviation. If BBW > (BBW_MA + stdev), assign +1 (high volatility); if BBW < (BBW_MA × 0.5), assign –1 (low volatility); else 0.
• ATR: Compare ATR to its moving average ± standard deviation. A spike above the upper threshold is +1; a contraction below the lower threshold is –1; otherwise 0.
• KCW: Same logic as ATR but around the KCW mean.
• Volume: Compare current volume to its volume MA ± standard deviation. Above the upper threshold is +1; below the lower threshold is –1; else 0.
2. Sum Sub-Scores → Raw Market Activity Score: Range between –4 and +4.
3. Assign Market Activity State:
• High Activity: Raw Score ≥ +2 (at least two volatility metrics are strongly spiking).
• Low Activity: Raw Score ≤ –2 (at least two metrics signal unusually low volatility or thin volume).
• Medium Activity: Raw Score is between –1 and +1 inclusive.
4. Hysteresis for Stability:
• If hysteresis is enabled, a new state only takes hold after two consecutive bars confirm the same High, Medium, or Low label.
• This prevents the Market Activity State from bouncing around when volatility is on the fence.
5. Set Category Weights Based on Activity State:
• High Activity: Trend = 50 %, Momentum = 35 %, Price Action = 15 %.
• Low Activity: Trend = 25 %, Momentum = 20 %, Price Action = 55 %.
• Medium Activity: Use trader’s base weights (e.g., Trend = 40 %, Momentum = 30 %, Price Action = 30 %).
6. Impact on netScore: Because category scores (–3 to +3) multiply by these weights, High Activity amplifies the effect of strong Trend and Momentum scores; Low Activity amplifies the effect of Price Action.
7. Market Context Tooltip: The dashboard includes a tooltip summarizing the current state—e.g., “High activity, trend and momentum prioritized,” “Low activity, price action prioritized,” or “Balanced market, all categories considered.”
---
11. Category Weights: Base vs. Dynamic
Traders begin by specifying base weights for Trend Strength, Momentum, and Price Action that sum to 100 %. These apply only when volatility is in the Medium band. Once volatility shifts:
• High Volatility Overrides:
• Trend jumps from its base (e.g., 40 %) to 50 %.
• Momentum jumps from its base (e.g., 30 %) to 35 %.
• Price Action is reduced to 15 %.
Example: If base weights were Trend = 40 %, Momentum = 30 %, Price Action = 30 %, then in High Activity they become 50/35/15. A Trend score of +3 now contributes 3 × 0.50 = +1.50 to netScore; a Momentum +2 contributes 2 × 0.35 = +0.70. In total, Trend + Momentum can easily push netScore above the +2 threshold on its own.
• Low Volatility Overrides:
• Price Action leaps from its base (30 %) to 55 %.
• Trend falls to 25 %, Momentum falls to 20 %.
Why? When markets are quiet, subtle candle breakouts, doji patterns, and small-range expansions tend to foreshadow the next swing more effectively than raw trend readings. A Price Action score of +3 in this state contributes 3 × 0.55 = +1.65, which can carry the netScore toward +2—even if Trend and Momentum are neutral or only mildly positive.
Because these weight shifts happen only after two consecutive bars confirm a High or Low state (if hysteresis is on), the indicator avoids constantly flipping its emphasis during borderline volatility phases.
---
12. Dominant Category Explained
Within the dashboard, a label such as “Trend Dominant,” “Momentum Dominant,” or “Price Action Dominant” appears when one category’s absolute weighted contribution to netScore is the largest. Concretely:
• Compute each category’s weighted contribution = (raw category score) × (current weight).
• Compare the absolute values of those three contributions.
• The category with the highest absolute value is flagged as Dominant for that bar.
Why It Matters:
• Momentum Dominant: Indicates that the combined force of RSI, Stochastic, and MACD (after weighting) is pushing netScore farther than either Trend or Price Action. In practice, it means that short-term sentiment and speed of change are the primary drivers right now, so traders should watch for continued momentum signals before committing to a trade.
• Trend Dominant: Means ADX, MA slope, and Ichimoku (once weighted) outweigh the other categories. This suggests a strong directional move is in place; trend-following entries or confirming pullbacks are likely to succeed.
• Price Action Dominant: Occurs when breakout/breakdown patterns, Heikin-Ashi candle readings, and range expansions (after weighting) are the most influential. This often happens in calmer markets, where subtle shifts in candle structure can foreshadow bigger moves.
By explicitly calling out which category is carrying the most weight at any moment, the dashboard gives traders immediate insight into why the netScore is tilting toward bullish, bearish, or sideways.
---
13. Oscillator Plot: How to Read It
The “Net Score” oscillator sits below the dashboard and visually displays the smoothed netScore as a line graph. Key features:
1. Value Range: In normal conditions it oscillates roughly between –3 and +3, but extreme confluences can push it outside that range.
2. Horizontal Threshold Lines:
• +2 Line (Bullish threshold)
• 0 Line (Neutral midline)
• –2 Line (Bearish threshold)
3. Zone Coloring:
• Green Background (Bullish Zone): When netScore ≥ +2.
• Red Background (Bearish Zone): When netScore ≤ –2.
• Gray Background (Sideways Zone): When –2 < netScore < +2.
4. Dynamic Line Color:
• The plotted netScore line itself is colored green in a Bullish Zone, red in a Bearish Zone, or gray in a Sideways Zone, creating an immediate visual cue.
Interpretation Tips:
• Crossing Above +2: Signals a strong enough combined trend/momentum/price-action reading to classify as Bullish. Many traders wait for a clear crossing plus a confirmation candle before entering a long position.
• Crossing Below –2: Indicates a strong Bearish signal. Traders may consider short or exit strategies.
• Rising Slope, Even Below +2: If netScore climbs steadily from neutral toward +2, it demonstrates building bullish momentum.
• Divergence: If price makes a higher high but the oscillator fails to reach a new high, it can warn of weakening momentum and a potential reversal.
---
14. Comments and Their Necessity
Every sub-indicator (ADX, MA slope, Ichimoku, RSI, Stochastic, MACD, HH/LL, Heikin-Ashi, Candle Range, BBW, ATR, KCW, Volume) generates a short comment that appears in the detailed dashboard. Examples:
• “Strong bullish trend” or “Strong bearish trend” for ADX/DMI
• “Fast MA above slow MA” or “Fast MA below slow MA” for MA slope
• “RSI above dynamic threshold” or “RSI below dynamic threshold” for RSI
• “MACD histogram positive” or “MACD histogram negative” for MACD Hist
• “Price near highs” or “Price near lows” for HH/LL checks
• “Bullish Heikin Ashi” or “Bearish Heikin Ashi” for HA Doji scoring
• “Large range, trend confirmed” or “Small range, trend contradicted” for Candle Range
Additionally, the top-row comment for each category is:
• Trend: “Highly Bullish,” “Highly Bearish,” or “Neutral Trend.”
• Momentum: “Strong Momentum,” “Weak Momentum,” or “Neutral Momentum.”
• Price Action: “Bullish Action,” “Bearish Action,” or “Neutral Action.”
• Market Activity: “Volatile Market,” “Calm Market,” or “Stable Market.”
Reasons for These Comments:
• Transparency: Shows exactly how each sub-indicator contributed to its category score.
• Education: Helps traders learn why a category is labeled bullish, bearish, or neutral, building intuition over time.
• Customization: If, for example, the RSI comment says “RSI neutral” despite an impending trend shift, a trader might choose to adjust RSI length or thresholds.
In the detailed dashboard, hovering over each comment cell also reveals a tooltip with additional context (e.g., “Fast MA above slow MA” or “Senkou A above Senkou B”), helping traders understand the precise rule behind that +1, 0, or –1 assignment.
---
15. Real-Life Example (Consolidated)
• Instrument & Timeframe: Bitcoin (BTCUSD), 1-hour chart.
• Current Market Activity: BBW and ATR both spike (+1 each), KCW is moderately high (+1), but volume is only neutral (0) → Raw Market Activity Score = +2 → State = High Activity (after two bars, if hysteresis is on).
• Category Weights Applied: Trend = 50 %, Momentum = 35 %, Price Action = 15 %.
• Trend Sub-Scores:
1. ADX = 25 (above threshold 20) with +DI > –DI → +1.
2. Fast MA (20-period) sits above Slow MA (50-period) → +1.
3. Ichimoku: Senkou A > Senkou B → +1.
→ Trend Score = +3.
• Momentum Sub-Scores:
4. RSI = 75 (above its moving average +1 stdev) → +1.
5. MACD histogram = +0.15 → +1.
6. Stochastic %K = 50 (mid-range) → 0.
→ Momentum Score = +2.
• Price Action Sub-Scores:
7. Price is not within 1 % of the 20-period high/low and slope = positive → 0.
8. Heikin-Ashi body is slightly larger than stdev over last 5 bars with haClose > haOpen → +1.
9. Candle range is just above its dynamic upper bound but trend is already captured, so → +1.
→ Price Action Score = +2.
• Calculate netScore (before smoothing):
• Trend contribution = 3 × 0.50 = 1.50
• Momentum contribution = 2 × 0.35 = 0.70
• Price Action contribution = 2 × 0.15 = 0.30
• Raw netScore = 1.50 + 0.70 + 0.30 = 2.50 → Immediately classified as Bullish.
• Oscillator & Dashboard Output:
• The oscillator line crosses above +2 and turns green.
• Dashboard displays:
• Trend Regime “BULLISH,” Trend Score = 3, Comment = “Highly Bullish.”
• Momentum Regime “BULLISH,” Momentum Score = 2, Comment = “Strong Momentum.”
• Price Action Regime “BULLISH,” Price Action Score = 2, Comment = “Bullish Action.”
• Market Activity State “High,” Comment = “Volatile Market.”
• Weights: Trend 50 %, Momentum 35 %, Price Action 15 %.
• Dominant Category: Trend (because 1.50 > 0.70 > 0.30).
• Overall Score: 2.50, posCount = (three +1s in Trend) + (two +1s in Momentum) + (two +1s in Price Action) = 7 bullish signals, negCount = 0.
• Final Zone = “BULLISH.”
• The trader sees that both Trend and Momentum are reinforcing each other under high volatility. They might wait one more candle for confirmation but already have strong evidence to consider a long.
---
• .
---
Disclaimer
This indicator is strictly a technical analysis tool and does not constitute financial advice. All trading involves risk, including potential loss of capital. Past performance is not indicative of future results. Traders should:
• Always backtest the “Market Zone Analyzer ” on their chosen symbols and timeframes before committing real capital.
• Combine this tool with sound risk management, position sizing, and, if possible, fundamental analysis.
• Understand that no indicator is foolproof; always be prepared for unexpected market moves.
Goodluck
-BullByte!
---
MTF_DrawingsLibrary 'MTF_Drawings'
This library helps with drawing indicators and candle charts on all timeframes.
FEATURES
CHART DRAWING : Library provides functions for drawing High Time Frame (HTF) and Low Time Frame (LTF) candles.
INDICATOR DRAWING : Library provides functions for drawing various types of HTF and LTF indicators.
CUSTOM COLOR DRAWING : Library allows to color candles and indicators based on specific conditions.
LINEFILLS : Library provides functions for drawing linefills.
CATEGORIES
The functions are named in a way that indicates they purpose:
{Ind} : Function is meant only for indicators.
{Hist} : Function is meant only for histograms.
{Candle} : Function is meant only for candles.
{Draw} : Function draws indicators, histograms and candle charts.
{Populate} : Function generates necessary arrays required by drawing functions.
{LTF} : Function is meant only for lower timeframes.
{HTF} : Function is meant only for higher timeframes.
{D} : Function draws indicators that are composed of two lines.
{CC} : Function draws custom colored indicators.
USAGE
Import the library into your script.
Before using any {Draw} function it is necessary to use a {Populate} function.
Choose the appropriate one based on the category, provide the necessary arguments, and then use the {Draw} function, forwarding the arrays generated by the {Populate} function.
This doesn't apply to {Draw_Lines}, {LineFill}, or {Barcolor} functions.
EXAMPLE
import Spacex_trader/MTF_Drawings/1 as tf
//Request lower timeframe data.
Security(simple string Ticker, simple string New_LTF, float Ind) =>
float Value = request.security_lower_tf(Ticker, New_LTF, Ind)
Value
Timeframe = input.timeframe('1', 'Timeframe: ')
tf.Draw_Ind(tf.Populate_LTF_Ind(Security(syminfo.tickerid, Timeframe, ta.rsi(close, 14)), 498, color.purple), 1, true)
FUNCTION LIST
HTF_Candle(BarsBack, BodyBear, BodyBull, BordersBear, BordersBull, WickBear, WickBull, LineStyle, BoxStyle, LineWidth, HTF_Open, HTF_High, HTF_Low, HTF_Close, HTF_Bar_Index)
Populates two arrays with drawing data of the HTF candles.
Parameters:
BarsBack (int) : Bars number to display.
BodyBear (color) : Candle body bear color.
BodyBull (color) : Candle body bull color.
BordersBear (color) : Candle border bear color.
BordersBull (color) : Candle border bull color.
WickBear (color) : Candle wick bear color.
WickBull (color) : Candle wick bull color.
LineStyle (string) : Wick style (Solid-Dotted-Dashed).
BoxStyle (string) : Border style (Solid-Dotted-Dashed).
LineWidth (int) : Wick width.
HTF_Open (float) : HTF open price.
HTF_High (float) : HTF high price.
HTF_Low (float) : HTF low price.
HTF_Close (float) : HTF close price.
HTF_Bar_Index (int) : HTF bar_index.
Returns: Two arrays with drawing data of the HTF candles.
LTF_Candle(BarsBack, BodyBear, BodyBull, BordersBear, BordersBull, WickBear, WickBull, LineStyle, BoxStyle, LineWidth, LTF_Open, LTF_High, LTF_Low, LTF_Close)
Populates two arrays with drawing data of the LTF candles.
Parameters:
BarsBack (int) : Bars number to display.
BodyBear (color) : Candle body bear color.
BodyBull (color) : Candle body bull color.
BordersBear (color) : Candle border bear color.
BordersBull (color) : Candle border bull color.
WickBear (color) : Candle wick bear color.
WickBull (color) : Candle wick bull color.
LineStyle (string) : Wick style (Solid-Dotted-Dashed).
BoxStyle (string) : Border style (Solid-Dotted-Dashed).
LineWidth (int) : Wick width.
LTF_Open (float ) : LTF open price.
LTF_High (float ) : LTF high price.
LTF_Low (float ) : LTF low price.
LTF_Close (float ) : LTF close price.
Returns: Two arrays with drawing data of the LTF candles.
Draw_Candle(Box, Line, Offset)
Draws HTF or LTF candles.
Parameters:
Box (box ) : Box array with drawing data.
Line (line ) : Line array with drawing data.
Offset (int) : Offset of the candles.
Returns: Drawing of the candles.
Populate_HTF_Ind(IndValue, BarsBack, IndColor, HTF_Bar_Index)
Populates one array with drawing data of the HTF indicator.
Parameters:
IndValue (float) : Indicator value.
BarsBack (int) : Indicator lines to display.
IndColor (color) : Indicator color.
HTF_Bar_Index (int) : HTF bar_index.
Returns: An array with drawing data of the HTF indicator.
Populate_LTF_Ind(IndValue, BarsBack, IndColor)
Populates one array with drawing data of the LTF indicator.
Parameters:
IndValue (float ) : Indicator value.
BarsBack (int) : Indicator lines to display.
IndColor (color) : Indicator color.
Returns: An array with drawing data of the LTF indicator.
Draw_Ind(Line, Mult, Exe)
Draws one HTF or LTF indicator.
Parameters:
Line (line ) : Line array with drawing data.
Mult (int) : Coordinates multiplier.
Exe (bool) : Display the indicator.
Returns: Drawing of the indicator.
Populate_HTF_Ind_D(IndValue_1, IndValue_2, BarsBack, IndColor_1, IndColor_2, HTF_Bar_Index)
Populates two arrays with drawing data of the HTF indicators.
Parameters:
IndValue_1 (float) : First indicator value.
IndValue_2 (float) : Second indicator value.
BarsBack (int) : Indicator lines to display.
IndColor_1 (color) : First indicator color.
IndColor_2 (color) : Second indicator color.
HTF_Bar_Index (int) : HTF bar_index.
Returns: Two arrays with drawing data of the HTF indicators.
Populate_LTF_Ind_D(IndValue_1, IndValue_2, BarsBack, IndColor_1, IndColor_2)
Populates two arrays with drawing data of the LTF indicators.
Parameters:
IndValue_1 (float ) : First indicator value.
IndValue_2 (float ) : Second indicator value.
BarsBack (int) : Indicator lines to display.
IndColor_1 (color) : First indicator color.
IndColor_2 (color) : Second indicator color.
Returns: Two arrays with drawing data of the LTF indicators.
Draw_Ind_D(Line_1, Line_2, Mult, Exe_1, Exe_2)
Draws two LTF or HTF indicators.
Parameters:
Line_1 (line ) : First line array with drawing data.
Line_2 (line ) : Second line array with drawing data.
Mult (int) : Coordinates multiplier.
Exe_1 (bool) : Display the first indicator.
Exe_2 (bool) : Display the second indicator.
Returns: Drawings of the indicators.
Barcolor(Box, Line, BarColor)
Colors the candles based on indicators output.
Parameters:
Box (box ) : Candle box array.
Line (line ) : Candle line array.
BarColor (color ) : Indicator color array.
Returns: Colored candles.
Populate_HTF_Ind_D_CC(IndValue_1, IndValue_2, BarsBack, BullColor, BearColor, IndColor_1, HTF_Bar_Index)
Populates two array with drawing data of the HTF indicators with color based on: IndValue_1 >= IndValue_2 ? BullColor : BearColor.
Parameters:
IndValue_1 (float) : First indicator value.
IndValue_2 (float) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bear color.
IndColor_1 (color) : First indicator color.
HTF_Bar_Index (int) : HTF bar_index.
Returns: Three arrays with drawing and color data of the HTF indicators.
Populate_LTF_Ind_D_CC(IndValue_1, IndValue_2, BarsBack, BullColor, BearColor, IndColor_1)
Populates two arrays with drawing data of the LTF indicators with color based on: IndValue_1 >= IndValue_2 ? BullColor : BearColor.
Parameters:
IndValue_1 (float ) : First indicator value.
IndValue_2 (float ) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
IndColor_1 (color) : First indicator color.
Returns: Three arrays with drawing and color data of the LTF indicators.
Populate_HTF_Hist_CC(HistValue, IndValue_1, IndValue_2, BarsBack, BullColor, BearColor, HTF_Bar_Index)
Populates one array with drawing data of the HTF histogram with color based on: IndValue_1 >= IndValue_2 ? BullColor : BearColor.
Parameters:
HistValue (float) : Indicator value.
IndValue_1 (float) : First indicator value.
IndValue_2 (float) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
HTF_Bar_Index (int) : HTF bar_index
Returns: Two arrays with drawing and color data of the HTF histogram.
Populate_LTF_Hist_CC(HistValue, IndValue_1, IndValue_2, BarsBack, BullColor, BearColor)
Populates one array with drawing data of the LTF histogram with color based on: IndValue_1 >= IndValue_2 ? BullColor : BearColor.
Parameters:
HistValue (float ) : Indicator value.
IndValue_1 (float ) : First indicator value.
IndValue_2 (float ) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
Returns: Two array with drawing and color data of the LTF histogram.
Populate_LTF_Hist_CC_VA(HistValue, Value, BarsBack, BullColor, BearColor)
Populates one array with drawing data of the LTF histogram with color based on: HistValue >= Value ? BullColor : BearColor.
Parameters:
HistValue (float ) : Indicator value.
Value (float) : First indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
Returns: Two array with drawing and color data of the LTF histogram.
Populate_HTF_Ind_CC(IndValue, IndValue_1, BarsBack, BullColor, BearColor, HTF_Bar_Index)
Populates one array with drawing data of the HTF indicator with color based on: IndValue >= IndValue_1 ? BullColor : BearColor.
Parameters:
IndValue (float) : Indicator value.
IndValue_1 (float) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
HTF_Bar_Index (int) : HTF bar_index
Returns: Two arrays with drawing and color data of the HTF indicator.
Populate_LTF_Ind_CC(IndValue, IndValue_1, BarsBack, BullColor, BearColor)
Populates one array with drawing data of the LTF indicator with color based on: IndValue >= IndValue_1 ? BullColor : BearColor.
Parameters:
IndValue (float ) : Indicator value.
IndValue_1 (float ) : Second indicator value.
BarsBack (int) : Indicator lines to display.
BullColor (color) : Bull color.
BearColor (color) : Bearcolor.
Returns: Two arrays with drawing and color data of the LTF indicator.
Draw_Lines(BarsBack, y1, y2, LineType, Fill)
Draws price lines on indicators.
Parameters:
BarsBack (int) : Indicator lines to display.
y1 (float) : Coordinates of the first line.
y2 (float) : Coordinates of the second line.
LineType (string) : Line type.
Fill (color) : Fill color.
Returns: Drawing of the lines.
LineFill(Upper, Lower, BarsBack, FillColor)
Fills two lines with linefill HTF or LTF.
Parameters:
Upper (line ) : Upper line.
Lower (line ) : Lower line.
BarsBack (int) : Indicator lines to display.
FillColor (color) : Fill color.
Returns: Linefill of the lines.
Populate_LTF_Hist(HistValue, BarsBack, HistColor)
Populates one array with drawing data of the LTF histogram.
Parameters:
HistValue (float ) : Indicator value.
BarsBack (int) : Indicator lines to display.
HistColor (color) : Indicator color.
Returns: One array with drawing data of the LTF histogram.
Populate_HTF_Hist(HistValue, BarsBack, HistColor, HTF_Bar_Index)
Populates one array with drawing data of the HTF histogram.
Parameters:
HistValue (float) : Indicator value.
BarsBack (int) : Indicator lines to display.
HistColor (color) : Indicator color.
HTF_Bar_Index (int) : HTF bar_index.
Returns: One array with drawing data of the HTF histogram.
Draw_Hist(Box, Mult, Exe)
Draws HTF or LTF histogram.
Parameters:
Box (box ) : Box Array.
Mult (int) : Coordinates multiplier.
Exe (bool) : Display the histogram.
Returns: Drawing of the histogram.