Detects three-candle range expansions, maps pullback zones, and tracks analytical stop and R-target geometry.
Published by AlgoNexa. AlgoNexa builds and documents evidence-first trading tools so you can inspect the logic before using it.About AlgoNexaIndicator library
Published Aug 18, 2026#ct3#candlestick-pattern#volatility#pullback#price-action#indicator#pinescript-v6#tradingview
How it works
Read the logic before you use it.
1
When it signals
A Rise or Fall setup requires a confirmed directional C3 with a range at least equal to **Minimum Range Ratio** times the combined C1+C2 range and a body at least **Minimum C3 Body %** of C3's range. Defaults are `1.5` and `40.0%` respectively.
2
What confirms it
Optional controls can require C1/C2 direction, similar candle ranges, a C3 close beyond the prior structure, ATR expansion limits, wick limits, and trend alignment. **Trend mode** defaults to `None`; optional EMA alignment uses length `50`, and confirmed pivots use strength `3` by default.
3
How risk is framed
The default `C1+C2 Zone` and midpoint **Reference Entry** create a pullback reference. The suggested stop is placed beyond the full CT3 extreme plus the selected buffer, and `1R to 6R` target lines are derived from that reference risk; these drawings are not trades.
Walkthrough
Watch how it reads the chart.
Live market chart
The logic on real candles.
Backtest evidence
What the numbers actually show.
This script's logic could not be confidently reconstructed into an automated reference backtest, so no performance figures are shown rather than estimated ones.
Verify it in TradingView's Strategy Tester (or the equivalent tool for tradingview) before relying on it.
Vision Grade
What was measured, and how confident we are in it.
Vision Grade requires a reference backtest with enough reconstructed entries to measure — not available for this script yet.
Full breakdown
How the script behaves.
About AlgoNexa
Published by AlgoNexa, an evidence-first platform for building, reviewing, and documenting algorithmic trading tools. This page explains the script's actual logic and intended use; it does not promise profitability or replace verification in TradingView.
What it does
AlgoNexta CT3 identifies a three-candle expansion pattern. It compares the current candle (C3) with the combined range of the prior two candles (C1 and C2), then marks either a bearish CT3 Fall or bullish CT3 Rise when C3 expands sufficiently and closes in the expected direction.
With the default Minimum Range Ratio of 1.5, C3 must have a range at least 1.5 times the combined C1+C2 range. C3 must also meet the default Minimum C3 Body % of 40.0. The script can then draw an analytical pullback zone, a reference entry, a suggested stop, and optional R-multiple target lines. It is an indicator only: it does not place or simulate orders.
What the pattern checks
A CT3 Fall requires a bearish C3; a CT3 Rise requires a bullish C3. By default, both Enable CT3 Fall and Enable CT3 Rise are on.
Core default requirements:
C3 range / combined C1+C2 range is at least 1.5 (Minimum Range Ratio).
C3 body is at least 40.0% of its own range (Minimum C3 Body %).
Zero-range candles are excluded when Exclude zero-range C1/C2/C3 is enabled (default true).
Signals are evaluated only once the bar is confirmed (barstate.isconfirmed).
Optional filters are off by default and can make detection more selective:
Require expected C1/C2 direction can require the first two candles to point opposite the C3 expansion; Allow neutral/doji in C1/C2 controls whether small-bodied candles can qualify.
Use C1/C2 similarity limits the range difference between C1 and C2 using Maximum range difference %.
Require C3 close beyond C1/C2 structure and Require C3 close near extreme add close-location requirements.
ATR and wick filters include Use C3 ATR expansion, Use maximum C3 ATR, Limit C1+C2 combined range, Limit total C3 wick, and Limit opposite C3 wick.
Trend mode defaults to None. Available alignment methods include EMA, EMA plus slope, market structure, and EMA plus market structure. The default EMA length is 50; the default EMA slope lookback is 3.
Use confirmed HTF EMA context is off by default. When enabled, it uses the last completed candle from the selected Higher timeframe (60 by default), with lookahead disabled.
The script also assigns a configurable CT3 Score from 0 to 100. Show CT3 Score is on by default, while Filter signals by score is off. The displayed grade is a score label, not a performance rating: A+ is 90+, A is 80+, B is 70+, C is 60+, and lower scores are Weak.
Reading the chart
CT3 RISE labels mark bullish expansion setups. Their default color is green (CT3 Rise).
CT3 FALL labels mark bearish expansion setups. Their default color is red (CT3 Fall).
The shaded box is the potential entry zone. Zone source defaults to C1+C2 Zone; choose Full CT3 Zone or Both to change the source. Displayed portion defaults to Entire Zone and can show top, bottom, midpoint, or a custom percentage band.
The dashed white line is the Reference Entry, set to Midpoint by default. It can instead use the zone high, zone low, or Reference Entry custom %.
The orange line is the suggested stop. By default, Stop buffer mode is Fixed Price and Stop buffer value is 1.0. Tick-based and ATR-based buffers are also available.
Blue dotted lines are optional R targets. R targets defaults to 1R to 6R; these are chart geometry derived from the reference entry and suggested stop, not orders or guaranteed targets.
Show SL / TP price labels is enabled by default. The optional C3 extreme and manual context target can add further target lines when directionally valid.
Setup status updates on closed bars, including Waiting, Zone Touched, target reached, Invalidated, Ambiguous, and Expired. Terminal setups are faded gray.
Show latest-setup dashboard is off by default. When enabled, the top-right table shows the latest setup's direction, quality, score grade, range ratio, and lifecycle status.
Lifecycle and alerts
By default, a setup is invalidated on a Close beyond its suggested stop. Change Invalidation to Wick for high/low-based invalidation, or Disabled to stop invalidation tracking.
Expiration defaults to After N Bars, with Expiration bars set to 50. It can instead be set to Never or Opposite CT3. If a bar reaches both a target and the stop, Same-bar SL/target resolution defaults to Ambiguous, because OHLC data does not reveal the intrabar sequence. Conservative and Optimistic alternatives are available.
Standard TradingView alert conditions are available for new Qualified, Standard, and Strong Rise/Fall patterns; zone touches; invalidations; same-bar ambiguity; TP1 through TP6; manual context targets; and expiration. Enable dynamic alert() events is off by default; when enabled, dynamic alerts fire once per confirmed bar. Include expiration in dynamic alerts controls whether expiry is included in those dynamic messages.
Markets, timeframes, and limitations
The code does not restrict the symbol or chart timeframe, so it can be applied to any TradingView market with OHLC data. Because it evaluates three completed candles and may draw zones for up to Drawing extension bars (200 by default), use a timeframe where individual candle ranges are meaningful for your market and review the instrument's tick size before using a fixed-price stop buffer.
CT3 is a candle-range pattern detector, not an execution strategy, trend predictor, or complete trade plan.
Signals appear only after the C3 bar closes, so they cannot be known during that candle's formation.
Market-structure mode uses confirmed pivots. With the default Confirmed pivot strength of 3, pivots become usable only on their confirmation bar, three bars late.
Confirmed HTF EMA context uses prior completed higher-timeframe values with lookahead disabled; it does not use an unfinished HTF candle.
Stop, entry, and target drawings are analytical references. They do not account for spreads, slippage, fills, commissions, liquidity, or intrabar order sequencing.
Same-bar stop/target events remain inherently uncertain from OHLC data; the script explicitly marks the default case as Ambiguous.
This indicator is not financial advice. Use TradingView Strategy Tester or an independently specified strategy as the source of truth for historical and live execution results.
It detects a third candle whose range expands relative to the combined ranges of the prior two candles. A CT3 Rise requires a bullish C3 and a CT3 Fall requires a bearish C3, subject to the enabled range, body, trend, ATR, wick, and close-location filters.
Does CT3 repaint?▾
The CT3 pattern is evaluated only on confirmed bars, so a signal is not produced until C3 closes. Market-structure filters use confirmed pivots and are delayed by the selected Confirmed pivot strength; optional HTF context uses completed higher-timeframe candles with lookahead disabled.
Does this script place trades or backtest results?▾
No. It is an overlay indicator and does not call strategy entry or exit functions. Its entry, stop, and R-target lines are analytical geometry, not orders or simulated fills.
How are the entry zone, stop, and targets calculated?▾
The zone defaults to the C1+C2 range, with the Reference Entry at its Midpoint. The suggested stop sits beyond the full three-candle extreme plus the selected Stop buffer value, while optional targets are calculated as 1R through 6R from the entry-to-stop distance.
Which markets and timeframes can I use with CT3?▾
The code does not impose a symbol or timeframe restriction, so it can run on TradingView charts with OHLC data. Select a timeframe where candle ranges are meaningful for the instrument, and consider tick size when using the default Fixed Price stop buffer.
How do alerts work, and is this financial advice?▾
TradingView alert conditions cover new CT3 setups, zone touches, invalidations, targets, ambiguity, and expiry; Enable dynamic alert() events optionally sends confirmed-bar dynamic messages. This is not financial advice, and TradingView Strategy Tester or an equivalent execution-aware test is the source of truth for live results.
Want a version tuned to your market?
Describe the change in plain English and AlgoNexta rebuilds it as a fresh Pine v6 script — with its own explanation, evidence, and walkthrough.