Polarity Divergence Scanner [JOAT]Polarity Divergence Scanner
Introduction
The Polarity Divergence Scanner is an open-source advanced market polarity detection system that measures bullish and bearish pressure across four distinct market dimensions: price action, volume flow, momentum dynamics, and volatility expansion. This sophisticated oscillator integrates multiple pressure measurement techniques to detect polarity shifts, divergences, and pressure extremes with visual heatmap representation.
The indicator is designed for traders who understand that market movements are driven by the constant battle between bullish and bearish forces across multiple dimensions. By synthesizing price polarity, volume polarity, momentum polarity, and volatility polarity into a composite index, this tool helps identify structural market turning points where pressure imbalances create high-probability reversal opportunities.
Why This Integration Exists
This indicator combines four distinct polarity measurement frameworks that complement each other:
Price Polarity Analysis: Measures directional pressure from pure price action using range-normalized calculations
Volume Polarity Tracking: Analyzes buying versus selling pressure through volume flow dynamics
Momentum Polarity Detection: Combines RSI and MACD analysis to measure acceleration-based pressure
Volatility Polarity Assessment: Tracks expansion versus contraction pressure through ATR analysis
Each component addresses different aspects of market pressure dynamics. Price polarity reveals directional bias, volume polarity shows institutional flow, momentum polarity indicates acceleration changes, and volatility polarity measures market energy. Together, they create a comprehensive view of market pressure that traditional single-dimension indicators cannot provide.
Core Components Explained
1. Price Polarity Engine
Measures directional pressure from price movement:
Price Change = close - close
Price Range = highest(high, polarity_period) - lowest(low, polarity_period)
Price Polarity = (Price Change / Price Range) * 100
Smoothed Price Polarity = ema(Price Polarity, smoothing)
This calculation normalizes price movement against the recent range, providing a -100 to +100 scale where positive values indicate bullish pressure and negative values indicate bearish pressure.
2. Volume Polarity System
Analyzes buying versus selling pressure through volume flow:
Bull Volume = close > open ? volume : 0
Bear Volume = close < open ? volume : 0
Volume Polarity = ((sma(Bull Volume, period) - sma(Bear Volume, period)) / sma(Total Volume, period)) * 100
This reveals institutional flow direction by comparing accumulation (buying) volume against distribution (selling) volume over the specified period.
3. Momentum Polarity Calculator
Combines RSI and MACD for comprehensive momentum analysis:
RSI Polarity = (RSI - 50) * 2 // Scale to -100 to +100
MACD Histogram Normalized = (MACD Histogram / stdev(MACD Histogram, period)) * 30
Momentum Polarity = (RSI Polarity + MACD Normalized) / 2
This dual-momentum approach captures both relative strength (RSI) and trend acceleration (MACD) components.
4. Volatility Polarity Tracker
Measures expansion versus contraction pressure:
ATR Change = current ATR - ATR
ATR Average = sma(ATR, polarity_period)
Volatility Polarity = (ATR Change / ATR Average) * 100
Positive values indicate expanding volatility (energy building), while negative values show contracting volatility (energy dissipating).
5. Composite Polarity Index
Weighted combination of all polarity dimensions:
Composite Polarity = (Price Polarity * 0.35) + (Volume Polarity * 0.25) + (Momentum Polarity * 0.30) + (Volatility Polarity * 0.10)
Final Polarity = ema(Composite Polarity, smoothing) * sensitivity
The weighting emphasizes price and momentum while incorporating volume flow and volatility context.
6. Pressure Zone Classification
The system defines seven distinct pressure zones:
Extreme Bull Zone: Polarity ≥ 70 (Intense bullish pressure)
Strong Bull Zone: Polarity 40-69 (Solid bullish pressure)
Weak Bull Zone: Polarity 1-39 (Mild bullish pressure)
Neutral Zone: Polarity = 0 (Equilibrium state)
Weak Bear Zone: Polarity -1 to -39 (Mild bearish pressure)
Strong Bear Zone: Polarity -40 to -69 (Solid bearish pressure)
Extreme Bear Zone: Polarity ≤ -70 (Intense bearish pressure)
7. Polarity Shift Detection
The system identifies four types of polarity shifts:
Polarity Flips: Crosses zero line with sufficient strength (>30)
Polarity Acceleration: Increasing momentum in extreme zones (>50 or <-50)
Polarity Exhaustion: Weakening momentum in extreme zones (>80 or <-80)
Pressure Temperature: Volatility-adjusted intensity measurement
8. Advanced Divergence Detection
Uses pivot-based analysis to identify polarity divergences:
Bullish Polarity Divergence: Price makes lower low while polarity makes higher low
Bearish Polarity Divergence: Price makes higher high while polarity makes lower high
Divergences are filtered by minimum polarity strength to ensure significance.
Visual Elements
Composite Polarity Wave: Main oscillator with advanced gradient coloring and triple-layer glow effect
Individual Polarity Lines: Price, volume, and momentum polarity components
Polarity Strength Histogram: Background columns showing absolute polarity strength
Pressure Zone Backgrounds: Dynamic gradient backgrounds based on polarity intensity
Reference Lines: Critical levels at ±40, ±70, and ±100 with neutral zone highlighting
Polarity Shift Markers: Circles for flips, triangles for acceleration, X-crosses for exhaustion
Divergence Diamonds: Large diamond markers for confirmed polarity divergences
Dashboard: Comprehensive real-time display of all polarity components and signal status
How Components Work Together
The integration creates a multi-dimensional pressure analysis:
Layer 1 - Price Pressure: Directional bias from pure price movement
Layer 2 - Volume Pressure: Institutional flow through buying/selling volume
Layer 3 - Momentum Pressure: Acceleration and relative strength dynamics
Layer 4 - Volatility Pressure: Energy expansion/contraction context
Layer 5 - Composite Analysis: Weighted combination revealing overall market polarity
Layer 6 - Shift Detection: Identification of polarity transitions and extremes
Layer 7 - Divergence Analysis: Price-polarity disconnects signaling potential reversals
Example scenario: Price makes a new high (Layer 1) but volume polarity weakens (Layer 2), momentum polarity diverges (Layer 3), and volatility contracts (Layer 4). The composite polarity (Layer 5) shows bearish divergence (Layer 7) with exhaustion signals (Layer 6), indicating high reversal probability.
Input Parameters
Polarity Core:
Polarity Period: Base period for polarity calculations (default: 14)
Smoothing: Smoothing factor for polarity waves (default: 3)
Sensitivity: Signal sensitivity multiplier (default: 1.5)
Divergence Detection:
Pivot Lookback: Bars for pivot detection (default: 5)
Min Divergence Strength: Minimum polarity strength for signals (default: 60)
Visual Settings:
Show Polarity Waves: Toggle main polarity display
Show Pressure Zones: Toggle background zone coloring
Show Divergence Markers: Toggle divergence signals
Show Polarity Shifts: Toggle shift detection markers
How to Use This Indicator
Step 1: Assess Overall Polarity
Check the composite polarity level and current pressure zone classification in the dashboard.
Step 2: Identify Pressure Extremes
Look for extreme bull (>70) or extreme bear (<-70) zones where reversals are more likely.
Step 3: Monitor Polarity Shifts
Watch for polarity flips (zero line crosses), acceleration in extreme zones, or exhaustion signals.
Step 4: Analyze Component Divergences
Check if individual polarity components (price, volume, momentum) are aligned or diverging.
Step 5: Detect Polarity Divergences
Look for diamond markers indicating price-polarity divergences - these often precede major reversals.
Step 6: Confirm with Pressure Temperature
High pressure temperature (volatility-adjusted intensity) adds conviction to polarity signals.
Step 7: Wait for Confluence
Best setups occur when multiple factors align: extreme zones + polarity shifts + divergences + high temperature.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal polarity detection
Focus on extreme zones (>70 or <-70) for highest probability reversals
Polarity flips provide early trend change signals with good risk:reward
Divergences in extreme zones offer exceptional reversal opportunities
Acceleration signals in extreme zones often precede explosive moves
Exhaustion signals warn of potential polarity reversals before they occur
High pressure temperature adds conviction to all polarity signals
Component analysis helps understand the source of polarity changes
Indicator Limitations
Polarity can remain extreme longer than expected during strong trends
Divergences may take time to resolve - patience is required
Extreme zones don't guarantee immediate reversals - timing is crucial
Component polarity may conflict, requiring interpretation skills
Pressure temperature can spike during news events, creating false signals
Polarity shifts may be brief and require quick decision-making
Performance varies across different market conditions and volatility regimes
Requires understanding of multi-dimensional pressure analysis concepts
Technical Implementation
Built with Pine Script v6 using:
Multi-dimensional polarity calculation across four market aspects
Advanced gradient coloring system with triple-layer glow effects
Pivot-based divergence detection with strength filtering
Dynamic pressure zone classification with background visualization
Real-time polarity shift detection with multiple signal types
Comprehensive dashboard with component breakdown and signal status
Anti-overlap filtering to prevent signal clustering
Pressure temperature calculation for volatility-adjusted intensity
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its multi-dimensional polarity approach. While individual components (RSI, MACD, volume analysis, ATR) are established concepts, this integration is justified because:
It synthesizes four distinct polarity dimensions that address different market pressure aspects
The composite polarity index provides a unified view of market pressure across multiple dimensions
Advanced polarity shift detection identifies transitions before they become obvious in price
Polarity divergence analysis reveals price-pressure disconnects that traditional indicators miss
Pressure zone classification provides quantitative framework for market state assessment
Pressure temperature adds volatility context to polarity intensity measurements
Each component contributes unique polarity information: price polarity shows directional bias, volume polarity reveals institutional flow, momentum polarity indicates acceleration, and volatility polarity measures energy. The integration's value lies in identifying moments when these pressure dimensions align or diverge, creating high-probability trading opportunities.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Polarity analysis and divergence detection are analytical concepts that do not guarantee future price movement. Past performance and backtested results do not guarantee future results. Market conditions change, and polarity patterns that worked historically may not work in the future.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Delta Hedging PressureDelta Hedging Pressure – Cumulative Volume Delta Proxy
This open-source indicator calculates and displays a simple proxy for **net hedging / directional pressure** using volume-weighted candle direction (often called cumulative delta or cumulative volume delta in order-flow analysis).
Core Concept
In many markets (especially futures, forex, crypto, indices), large players (institutions, market makers, hedgers) tend to accumulate directional exposure over time. When aggressive buying or selling occurs, it often shows up as sustained volume in one direction.
This script approximates that pressure by:
- Assigning +volume to bullish candles (close > open)
- Assigning –volume to bearish candles (close < open)
- Neutral (0) for doji-type bars
- Cumulatively summing this "delta" over a user-defined lookback or since the start of each trading day
The result is a running total line that drifts up during net buying pressure (potential bullish bias / short covering / hedging demand) and down during net selling pressure (potential bearish bias / long liquidation / hedging supply).
Why this is useful
- Acts as a **sentiment / bias filter** — helps traders see whether underlying participation supports the current price move.
- Session reset option (default: true) makes it particularly effective on intraday charts (1m–1h), where daily resets align with institutional session flows (e.g., Asian, London, NY).
- Background coloring (green/red/gray) provides instant visual context for current net pressure without cluttering the price chart.
- Zero-line crossovers and divergence from price can highlight exhaustion or absorption points.
Calculation Details
1. Per-bar delta = volume × direction
direction = +1 (green candle), –1 (red candle), 0 (doji)
2. Cumulative sum (cumHedge):
- Resets to current bar's delta on new day if "Reset on New Day" is enabled
- Otherwise runs continuously across all history
3. Sentiment label (last bar only):
- Bullish if cumHedge > 0
- Bearish if cumHedge < 0
- Neutral if exactly 0
Key Features
- Cumulative Hedge Pressure line (blue) — main plot
- Zero line (gray) — reference for net buying vs selling
- Optional background coloring (green = bullish bias, red = bearish, gray = neutral)
- Last-bar label showing current "Hedge Bias" (Bullish / Bearish / Neutral)
How to Use
- Best on lower timeframes (1m–15m) for intraday bias or higher (1h–4h) for swing context.
- Keep "Reset on New Day" enabled for daily institutional reset alignment (most common use case).
- Interpretation examples:
→ Rising cumulative delta + rising price = strong bullish participation (healthy uptrend)
→ Falling cumulative delta + rising price = bearish divergence (possible distribution / weak rally)
→ Cumulative delta near zero = balanced / choppy market
→ Strong divergence near extremes often precedes reversals or absorption
- Combine with price action, support/resistance, or volume profile — never use in isolation.
- Toggle background off if it distracts from price reading.
Inputs
- Cumulative Length: controls smoothing / memory when reset is disabled (default 50)
- Reset on New Day: true = daily reset (recommended for intraday), false = continuous
- Show Background Bias: toggle green/red/gray session coloring
Publishing Recommendation
- Apply to a clean chart (no other indicators needed for basic use).
- Recommended symbols: futures (ES, NQ, GC), forex majors, BTC/USD, XAUUSD — any instrument with reliable volume data.
- Use default settings for initial testing.
This is a lightweight, educational tool built for transparency — fully open-source. It is not a standalone signal generator and does not predict price direction with certainty. Trading involves significant risk.
Feedback welcome — happy charting! Indicator

Indicator

Indicator

RSI Divergence[UgurTash] – Real-Time📈 RSI Divergence – Real-Time, Adaptive, and Intelligent RSI Divergence Detection
🚀 What Does This Indicator Do?
RSI Divergence is a real-time divergence detection tool that helps traders identify bullish and bearish divergences between price and the Relative Strength Index (RSI). Unlike traditional RSI-based indicators, this script offers:
✅ Real-time detection – No need to wait for bar closes or repainting.
✅ Dynamic time-frame adaptation – The script automatically adjusts RSI settings based on the selected chart time frame.
✅ Multi-layered divergence analysis – Supports short-term, medium-term, and long-term divergence detection with an optional all-term mode that dynamically selects the best configuration.
🛠 How Does It Work?
Pivot-Based Divergence Detection:
The script analyzes pivot points on both price and RSI to determine valid divergences.
Bullish divergence occurs when price forms a lower low but RSI trends higher, indicating potential upward momentum.
Bearish divergence occurs when price forms a higher high but RSI trends lower, signaling possible weakness.
Adaptive RSI Calculation:
The RSI length is dynamically adjusted based on the chosen time frame:
Short-Term: RSI (7) for 1-5 min charts.
Medium-Term: RSI (14) for 15-60 min charts.
Long-Term: RSI (28) for 4H+ charts.
In All-Term Mode, the script automatically determines the best RSI length based on the active chart timeframe.
Smart Visualization & Alerts:
Bullish divergences are marked with green lines & labels.
Bearish divergences are highlighted in red.
Users can customize symbol size, divergence labels, and colors.
Instant alerts notify traders as soon as a divergence is detected.
🎯 How to Use This Indicator?
📌 For Trend Reversals: Look for bullish divergences at key support levels and bearish divergences at resistance zones.
📌 For Trend Continuation: Combine divergence signals with moving averages, volume analysis, or price action strategies to confirm trades.
📌 For Scalping & Swing Trading: Adjust the time-frame settings to match your trading style.
🏆 What Makes This Indicator Original?
🔹 Unlike standard RSI divergence indicators, this script features real-time analysis with no repainting, allowing for instant trading decisions.
🔹 The time-frame adaptive RSI makes it dynamic and suitable for any market condition.
🔹 The multi-term divergence detection offers flexibility, giving traders a precise view of both short-term & long-term market structure.
⚠ Note: No indicator guarantees 100% accuracy. Always use additional confirmations and sound risk management strategies.
If you find this tool useful, don’t forget to support & share! 🚀 Indicator

Candlestick Structure [LuxAlgo]The Candlestick Structure indicator detects major market trends and displays various candlestick patterns aligning with the detected trend, filtering out potentially unwanted patterns as a result. Multiple trend detection methods are included and can be selected by the users.
A dashboard showing the alignment percentage of each individual pattern is also provided.
🔶 USAGE
By distinguishing major and minor trend detection, we can still detect patterns based on minor trends, yet filter out the patterns that do not align with the major trend.
By detecting candlestick patterns that align with a major trend, we can effectively detect the ending points of retracements, potentially providing various entry points of interest within a trend.
Users are able to track the alignment of each candlestick pattern in the dashboard to reveal which patterns typically align with the trend and which may not.
Note: Alignment % only checks if the pattern's direction is the same as the current trend direction. These are only raw readings and not any type of confidence score.
🔶 DETAILS
In this indicator, we are identifying and tracking 16 different Candlestick Patterns.
🔹 Bullish Patterns
Hammer: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Inverted Hammer: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bullish Engulfing: A 2 bar pattern identified by a large bullish candle body fully encapsulating (opening lower and closing higher) the previous small (bearish) candle body.
Rising 3: A 5 bar pattern identified by an initial full-bodied bullish candle, followed by 3 bearish candles that trade within the high and low of the initial candle, followed by another full-bodied bullish candle closing above the high of the initial candle.
3 White Soldiers: Identified by 3 full-bodied bullish candles, each opening within the body and closing below the high, of the previous candle.
Morning Star: A 3 bar pattern identified by a full-bodied bearish candle, followed by a small-bodied bearish candle, followed by a full-bodied bullish candle that closes above the halfway point of the first candle.
Bullish Harami: A 2 bar pattern, identified by an initial bearish candle, followed by a small bullish candle whose range is entirely contained within the body of the initial candle.
Tweezer Bottom: A 2 bar pattern identified by an initial bearish candle, followed by a bullish candle, both having equal lows.
🔹 Bearish Patterns
Hanging Man: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Shooting Star: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bearish Engulfing: A 2 bar pattern identified by a large bearish candle body fully encapsulating (opening higher and closing lower) the previous small (bullish) candle body.
Falling 3: A 5 bar pattern identified by an initial full-bodied bearish candle, followed by 3 bullish candles that trade within the high and low of the initial candle, followed by another full-bodied bearish candle closing below the low of the initial candle.
3 Black Crows: Identified by 3 full-bodied bearish candles, each open within the body and closing below the low, of the previous candle.
Evening Star: A 3 bar pattern identified by a full-bodied bullish candle, followed by a small-bodied bullish candle, followed by a full-bodied bearish candle that closes below the halfway point of the first candle.
Bearish Harami: A 2 bar pattern, identified by an initial bullish candle, followed by a small bearish candle whose range is entirely contained within the body of the initial candle.
Tweezer Top: A 2 bar pattern identified by an initial bullish candle, followed by a bearish candle, both having equal highs.
🔹 Trend Types
Major trend is displayed at all times, the display will change depending on the trend method selected.
The minor trend can also be visualized; to avoid confusion, the minor trend can optionally be displayed through the candle colors.
Supertrend: Displays Upper and Lower SuperTrend, When we break above the upper, it is considered an Uptrend. When we break below the lower, it is considered a Downtrend.
EMAs: Displays Fast and Slow EMAs, When Fast>Slow, it is considered an Uptrend. When Fast Indicator

CandleStick [TradingFinder] - All Reversal & Trend Patterns🔵 Introduction
"Candlesticks" patterns are used to predict price movements. We have included 5 of the best candlestick patterns that are common and very useful in "technical analysis" in this script to identify them automatically. The most important advantage of this indicator for users is saving time and high precision in identifying patterns.
These patterns are "Pin Bar," "Dark Cloud," "Piercing Line," "3 Inside Bar," and "Engulfing." By using these patterns, you can predict price movements more accurately and therefore make better decisions in your trades.
🔵 How to Use
Pin Bar : This pattern consists of a Candle where "Open Price," "Close Price," "High Price," and "Low Price" form the "Candle Body," and it also has "Long Shadow" and "Short Shadow." In the visual appearance of the Pin Bar pattern, we have a candle body and a pin bar shadow, where the candle body is smaller relative to the shadow.
Just as the candle body plays an important role in analysis, the pin bar shadow can also be influential. The larger the pin bar shadow, the stronger the expectation of a trend reversal.
When a "bearish pin bar" occurs at resistance or the chart ceiling, it can be predicted that the price trend will be downward. Similarly, at support points and the chart floor, a "bullish pin bar" can indicate an upward price movement.
Additionally, patterns like "Hammer," "Shooting Star," "Hanging Man," and "Inverted Hammer" are types of pin bars. Pin bars are formed in two ways: bullish pin bars have a long lower shadow, and bearish pin bars have a long upper shadow. Important: Displaying "Bullish Pin Bar" is labeled "BuPB," and "Bearish Pin Bar" is labeled "BePB."
Dark Cloud : The Dark Cloud pattern is one type of two-candle patterns that occurs at the end of an uptrend. The 2-candle pattern indicates the shape of this pattern, which actually consists of 2 candles, one bullish and one bearish. This pattern indicates a trend reversal and is quite powerful.
The Dark Cloud pattern is seen when, after a bullish candle at the end of an uptrend, a bearish candle opens at a higher level (weakly, equal, or higher) than the closing point of the bullish candle and finally closes at a point approximately in the middle of the previous candle. In this indicator, the Dark Cloud pattern is identified as "Wick" and "Strong" .
The difference between these two lies in the strictness of their conditions. Important: Strong Dark Cloud is labeled "SDC," and Weak Dark Cloud is labeled "WDC."
Piercing Line : The Piercing candlestick pattern consists of 2 candles, the first being bearish and consistent with the previous trend, and the second being bullish. The conditions of the pattern are such that the first candle is bearish and a price gap is created between the two candles upon the opening of the next candle because its opening price is below (weakly equal to or less than) the closing price of the previous candle.
Additionally, its closing price must be at least 50% above the red candle.
This means that the second candle must penetrate at least 50% into the first candle. Important: Strong Piercing Line is labeled "SPL," and Weak Piercing Line is labeled "WPL."
3 Inside Bar (3 Bar Reversal) : The 3 Inside Bar pattern is a reversal pattern. This pattern consists of 3 consecutive candles and can be either bullish or bearish. In the bullish pattern (Inside Up) formed at the end of a downtrend, the last candle must be bullish, and the third candle from the end must be bearish.
Additionally, the close price must be more than 50% of the third candle from the end. In the bearish pattern (Inside Down) formed at the end of an uptrend, the last candle must be bearish, and the third candle from the end must be bullish. Additionally, the close price must be less than 50% of the third candle from the end. Important: Bullish 3 Inside Bar is labeled "Bu3IB," and Bearish 3 Inside Bar is labeled "Be3IB."
Engulfing : The Engulfing candlestick pattern is a reversal pattern and consists of at least two candles, where one of them completely engulfs the body of the previous or following candle due to high volatility.
For this reason, the term "engulfing" is used for this pattern. This pattern occurs when the price body of a candle encompasses one or more candles before it. Engulfing candles can be bullish or bearish. Bullish Engulfing forms as a reversal candle at the end of a downtrend.
Bullish Engulfing indicates strong buying power and signals the beginning of an uptrend. This pattern is a bullish candle with a long upward body that completely covers the downward body before it. Bearish Engulfing, as a reversal pattern, is a long bearish candle that engulfs the upward candle before it.
Bearish Engulfing forms at the end of an uptrend and indicates the pressure of new sellers and their strong power. Additionally, forming this pattern at resistance levels and the absence of a lower shadow increases its credibility. Important: Bullish Engulfing is labeled "BuE," and Bearish Engulfing is labeled "BeE."
🔵 Settings
This section, you can use the buttons "Show Pin Bar," "Show Dark Cloud," "Show Piercing Line," "Show 3 Inside Bar," and "Show Engulfing" to enable or disable the display of each of these candlestick patterns.
Indicator

Indicator

{Gunzo} Bulls Power vs. Bears PowerBulls Power vs. Bears Power is a unique tool that displays on each candle the balance between the bears (sellers) and the bulls (buyers).
OVERWIEW :
This indicator is mainly based on the popular indicator “Elder ray” made by Dr. Alexander Elder in 1989. This indicator has been developed in order to determine the strength of the competing groups of buyers and sellers in the markets.
CALCULATION :
To measure the competing power of bulls and bears, the indicator compares the current high (maximum power of the bulls) and current low (maximum power of the bears) to the average price using a exponential moving average.
Bull Power = Current High – EMA 13 (closing)
Bear Power = Current Low – EMA 13 (closing)
This Elder ray indicator can also tell us more information about market conditions :
If the current high and current low are above the EMA 13, the bulls are totally in control on the market
If the current high and current low are under the EMA 13, the bears are totally in control of the market
If the EMA 13 is in between of the current high and current low, there is strong fight about controlling the market, there is possible reversal in this configuration
SETTINGS :
Fast MA Period : Fast moving average period (only used for buy sell signal)
Slow MA Period : Slow moving average period (only used for buy sell signal)
Display candle labels : Show/hide candle labels on the chart
Display only bear labels above X : Exclude all top candle labels on the chart below the value specified.
Display only bull labels above X : Exclude all bottom candle labels on the chart below the value specified.
Display opposite values : Show all candle labels on top (bearish) and bottom (bullish) or only show the candle labels for the winning force on the candle.
Display box for last candle : Show/hide the dominance boxes (red and blue) after last candle showing the last bear and bull power.
Display box after X candles : How many candles in the future the dominance boxes should be displayed.
Display slow / fast crossover (o) : Display crossover signals (circles) between fast line and slow line.
Display bear / bull fighting (x) : Display fighting signals (crosses) between bull and bears.
VISUALIZATIONS :
This indicator has 3 possible complementary visualizations:
Candle labels : The labels on top are the percentage of the bears on the candle, while the labels on the bottom are the percentage of the bulls on the candle. When the bulls are winning the labels are blue, when the bears are winning the labels are red, silver otherwise.
Box after last candle : The blue and red boxes after the last candle are the percentage of bears and bulls on the last candle of the chart. That boxes can be disabled in the settings if you feel it is redundant with the labels.
Signals : The signals are displayed at the bottom of the main area of trading. The orange “x” represents an area where bulls and bears are fighting hard. The blue “o” represents a buy signal (fast line crosses over the slow line) and the red “o” represents a sell sinal (fast line crosses under the slow line).
USAGE :
The most important rule in the usage of this indicator is :
“The higher the current bull power is (or bear power), the higher the chances are the next candle will also be bullish (or bearish).”
When the prices is increasing, it is very interesting to follow the bull power to verify that it is either stable or increasing. If the bull power keeps decreasing candle after candle, there is chances that in the next candles there will be a reversal.
When there is orange crosses in the signal area (bottom of the screen), it means that there is a big fight between bulls and bears and that the current price of the asset is probably stable. During these fighting areas, reversals are more likely to happen.
When there is a blue circle in the signal area (or red signal), it can be considered as a buy signal (or sell signal). These signals are determined by the crossover of the fast and slow lines of the total power of the bulls plus the bears.
LIMITATIONS :
As Pine script only allows to display about 50 drawings on the chart, the labels on the candles can not be printed on all the historical candles. The option “Display opposites” could be useful to hide unnecessary labels and then be able to display more older labels.
As the Elder ray indicator uses an average price (EMA 13 of closing price), the indicator may be lagging in some situations, but most of the time it will help to filter the bad signals contrary to the indicators that are too reactive.
Indicator

Universal Longs Vs. Shorts - Ratio (Any Symbol)Hello again all my Trading View friends!
This script is a variation of my other script "Universal Longs Vs. Shorts - Percentage (Any Symbol)"
It allows you to choose ANY symbol and plot the ratio against ANY other symbol, as an indicator on your given pair. It is primarily used as an indicator of longs/shorts as well as shorts/longs as a ratio to each other.
For example, you could plot BITFINEX:BTCUSDLONGS against BITFINEX:BTCUSDSHORTS.
It plots the ratio of longs/shorts or shorts/longs. For example:
If there are more longs than shorts open, the long ratio will be great than 1 with no upper limit.
If there are less longs than shorts open, the ratio will be less than 1 but greater than 0.
The same is true when comparing shorts to longs. You can choose to view Longs Ratio only, Shorts Ratio only, or Both.
This is useful to see how many more longs there are than shorts, and visa versa, at any given time interval. It does not take into consideration total volume of longs + shorts to get an absolute number, but rather a relative ratio to each other.
If there are many more positions open in one direction over the other, the ratio will rise higher and higher away from 1, which lets you know generally that there is a lot greater volume of that position open compared to its reverse.
If you found this script helpful please remember to FOLLOW and press LIKE!!
More useful scripts to come :-D Indicator

Indicator
