Indicators··8 min read

Wick Ratio Analyzer: Rejection Candles Quantified

4 references, link-verifiedEditor of record: Shane CantyStandards review editorial standard · audit log

Rejection candles form when price is pushed away from a particular level but fails to close substantially higher or lower, leaving long wicks on one or both sides of a small body. The wick ratio analyzer quantifies the relationship between wick size and body size, converting price action rejection into measurable ratios. Traders using price action techniques employ this metric to identify levels where demand or supply halted an advance, often signaling vulnerability in the prevailing trend and potential entry or confirmation zones.

//@version=6
indicator("Wick Ratio Analyzer: Rejection Candles Quantified", shorttitle="Wick Ratio", overlay=false)

// Inputs
rejectionThreshold = input.float(1.5, "Rejection Strength Threshold", minval=0.1, step=0.1,
                                 tooltip="Wick-to-body ratio to flag as rejection")
upperWickPeriod = input.int(14, "Upper Wick MA Period", minval=1)
lowerWickPeriod = input.int(14, "Lower Wick MA Period", minval=1)
showHistogram = input.bool(true, "Show Combined Strength Histogram")
highlightRejections = input.bool(true, "Highlight Rejection Candles")

// Calculate wick and body dimensions
bodySize = math.abs(close - open)
upperWick = high - math.max(close, open)
lowerWick = math.min(close, open) - low
trueRange = high - low

// Wick ratios: avoid division by zero
upperWickRatio = bodySize > 0 ? upperWick / bodySize : 0
lowerWickRatio = bodySize > 0 ? lowerWick / bodySize : 0
combinedRatio = bodySize > 0 ? (upperWick + lowerWick) / bodySize : 0

// Smoothed ratios for trend identification
upperWickMA = ta.sma(upperWickRatio, upperWickPeriod)
lowerWickMA = ta.sma(lowerWickRatio, lowerWickPeriod)

// Rejection detection: flag when single wick exceeds threshold
isUpperRejection = upperWickRatio > rejectionThreshold
isLowerRejection = lowerWickRatio > rejectionThreshold
isRejection = isUpperRejection or isLowerRejection

// Plots
plot(upperWickMA, title="Upper Wick Ratio (MA)", color=color.new(color.blue, 0), linewidth=2)
plot(lowerWickMA, title="Lower Wick Ratio (MA)", color=color.new(color.red, 0), linewidth=2)
plot(showHistogram ? combinedRatio : na, title="Combined Rejection Strength", 
     color=color.new(color.gray, 50), style=plot.style_histogram, linewidth=1)

// Reference lines
hline(rejectionThreshold, "Rejection Threshold", color.new(color.orange, 60), linestyle=hline.style_dashed)
hline(0, "Baseline", color.new(color.gray, 60), linestyle=hline.style_dotted)

// Background highlighting
bgcolor(highlightRejections and isUpperRejection ? color.new(color.blue, 85) : na, 
        title="Upper Rejection (Selling Rejection)")
bgcolor(highlightRejections and isLowerRejection ? color.new(color.red, 85) : na, 
        title="Lower Rejection (Buying Rejection)")

// Alerts (optional)
alertcondition(isRejection, title="Rejection Candle Detected", message="Wick rejection strength exceeded threshold")

How the code works

The indicator begins by extracting four price levels each candle: open, close, high, and low. From these, it calculates the body size as the absolute difference between close and open, representing actual price movement in the direction of closure. The upper wick is the distance from the high to whichever of open or close is higher, and the lower wick is the distance from whichever of open or close is lower down to the low. These wicks represent price movement that occurred but was then reversed.

The core calculation divides each wick by body size to create unitless ratios. When the body is zero (open equals close on a doji), the ratio is set to zero to avoid division errors. A ratio of 2.0 for the upper wick means the upper wick is twice as long as the body: price moved up aggressively, then reversed, closing nearly where it opened. This ratio is the quantified measure of rejection.

The code applies a simple moving average to each wick ratio separately over a configurable period, smoothing single-candle noise and revealing underlying rejection momentum. The combined ratio, shown as a histogram, sums both wicks and divides by body size, creating a composite strength metric useful for identifying candles with long wicks on both sides (hammers, inverted hammers, or spinning tops).

The rejection threshold input acts as a trigger: any candle where a single wick ratio exceeds this threshold is flagged and highlighted on the chart. The default of 1.5 means wicks at least 1.5 times the body size. All calculations avoid lookahead by using only the current candle's data at time of bar close.

Reading it on a chart

On the chart, the indicator appears in a separate window below price. The blue line represents upper wick ratios and the red line represents lower wick ratios, both smoothed. When either line spikes sharply above the orange dashed threshold line, the corresponding candle time on the price chart above will be highlighted: blue for upper rejections, red for lower rejections.

Upper rejections (blue highlights) occur when buyers push price higher during the candle but sellers return and close price near open. This suggests selling interest above the current level, often at a resistance zone. Lower rejections (red highlights) occur when sellers push price lower during the candle but buyers recover and close price near open. This suggests buying interest below the current level, often at a support zone.

Practitioners read clusters of rejection candles as areas where the market tested a price level and decided against further movement in that direction. A series of upper rejections near a level is a bearish signal suggesting the level acts as a ceiling. Likewise, lower rejections clustered at a price level signal bullish intent, as buyers consistently defend that floor. The smoothed moving averages of upper and lower wicks allow traders to observe whether rejection pressure is increasing or decreasing, even across multiple candles.

The combined histogram shows the total wick-to-body ratio and is useful for spotting candles with wicks on both sides that imply price uncertainty or reversal risk. A tall combined bar amid a trend warns that directional consensus may be weakening.

Limitations

The wick ratio analyzer measures rejection magnitude but does not predict price direction or the duration of holding power at a rejected level. A high upper wick ratio identifies selling pressure but does not guarantee price will reverse or continue downward; it only quantifies what already occurred. The indicator reacts to historical wicks and cannot foresee future movement. This is a descriptive tool, not a predictive one.

Wick ratios vary across assets and timeframes; the same threshold value performs differently on a stock, futures contract, or currency pair, and on one-minute versus daily charts. A 1.5 ratio that signals strong rejection on a daily chart may be unremarkable on a 15-minute chart. Users must calibrate the rejection threshold for their specific instrument and timeframe, and this calibration requires manual testing and observation, not provided by the indicator itself.

Small-body candles inflate wick ratios artificially. A candle with a 1-tick body and a 10-tick upper wick produces a 10.0 ratio regardless of absolute price levels. On illiquid instruments or near market open when bid-ask spreads are wide, these artificial spikes occur frequently and clutter the analysis. Liquidity and spread conditions significantly affect wick ratio reliability.

The moving average smoothing delays the visual signal; a true rejection appears on the current bar, but its contribution to the smoothed line is gradual. Traders expecting immediate confirmation will find the lag frustrating. Reducing the moving average period sharpens the response but increases false signals.

Wick formation also depends on bar duration. Longer timeframes (daily, weekly) accumulate more intrabar price action into a single candle, naturally producing wider wicks. Shorter timeframes (1-minute, 5-minute) capture tighter intrabar ranges. The same price action interpreted across different timeframes yields different wick ratios, so timeframe selection is not neutral.

Finally, rejection candles are a price action pattern, not a standalone system. A single rejection candle or even a cluster of rejections is raw information; context from trend direction, volume, risk-reward ratios, and entry/exit rules from the trader's broader plan is required for profitable use. The indicator alone cannot provide trading signals or risk management.

Key definitions

Wick: The thin line extending from a candlestick's body to the high (upper wick) or low (lower wick), representing the intrabar price range not included in the open-to-close movement.

Body: The thick portion of a candlestick between open and close, showing the net price change and direction of the candle.

Rejection candle: A candlestick with one or both wicks significantly longer than the body, indicating price was pushed in a direction then reversed, suggesting a level where demand or supply halted further movement.

Wick ratio: The ratio of wick length to body size, quantifying the strength of price rejection at a level relative to the actual directional movement achieved.

Support level: A price level where demand is historically strong enough to halt or reverse downward movement; appears as lower rejections in the indicator.

Resistance level: A price level where supply is historically strong enough to halt or reverse upward movement; appears as upper rejections in the indicator.

References


Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.

Last reviewed by the PropLedger research pipeline: 2026-10-04. Educational research on historical data, not financial advice.

Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard. Found an error? Email support@prop-ledger.org and the paper is corrected or withdrawn.