OPEN-SOURCE SCRIPT

CRT (MTF)

3 644
CRT Strategy — Indicator Guide

Overlay: Yes (box, lines, and signals drawn directly on the price chart)

What Is This Indicator?
CRT Strategy is a price structure tool based on Candle Range Theory (CRT). It automatically marks the high and low of the previous candle on any selected timeframe, projects those levels forward as key reference lines, and detects when price sweeps through them — a signature institutional move that frequently precedes a sharp reversal in the opposite direction.
Unlike fixed-timeframe versions, this indicator lets you freely choose any timeframe in the settings — from 1-minute to Monthly — while keeping your chart on any other timeframe. This makes it flexible for all trading styles, from scalping to swing trading.

The Core Concept — What Is a CRT Sweep?
In Candle Range Theory, the high and low of the previous candle are treated as liquidity pools — areas where stop orders from retail traders accumulate above highs and below lows. Institutional participants frequently drive price beyond these levels to collect that liquidity before reversing sharply in the opposite direction. This move is called a sweep.
A Sweep High occurs when a candle's wick pushes above the previous high but the candle closes back below it — with the open also below it. This signals that liquidity above the high was grabbed and rejected, shifting the bias bearish.
A Sweep Low is the mirror: the wick dips below the previous low but the candle closes and opens above it, signaling that liquidity below was swept and rejected, shifting the bias bullish.

Visual Outputs
Source Box
A shaded blue rectangle drawn over the previous candle's full range on the selected timeframe — from its high to its low, spanning exactly the time boundaries of that candle. The box width automatically adjusts to match the actual duration of the selected timeframe, so it always appears correctly whether you are using a 1-hour, Daily, or Weekly reference candle.
CRH Line (Candle Range High)
A red horizontal line extending forward from the right edge of the source box, projecting the previous candle's high into the future. This is the upper liquidity level — the zone where stop orders from short sellers accumulate.
CRL Line (Candle Range Low)
A green horizontal line projecting the previous candle's low forward. This is the lower liquidity level — the zone where stop orders from long traders accumulate.
EQ Line (Equilibrium — 50%)
A dotted gray line at the exact midpoint between CRH and CRL. The equilibrium level is a common rebalancing target after a sweep — price frequently returns to the 50% level of the previous candle's range before continuing in the new direction.
Sweep Signals
A small downward triangle appears above the bar when a Sweep High is detected. A small upward triangle appears below the bar when a Sweep Low is detected. Both are black by default and kept small to avoid cluttering the chart.

Settings Reference
Timeframe (default: 240 / 4-Hour) — the most important setting. This determines which candle's high and low are used as the reference range. Set it to any timeframe higher than your chart for macro context, or the same as your chart for same-timeframe CRT analysis. Common choices are 1H, 4H, Daily, and Weekly depending on your trading style.
Show Source Box — toggles the shaded rectangle marking the previous candle's range on and off.
Show EQ (50%) — toggles the dotted midpoint line between CRH and CRL.
Show Signals (Sweep) — toggles the triangle markers that appear when a sweep is detected.
CRH Line Color — color of the projected high line (default red).
CRL Line Color — color of the projected low line (default green).
EQ Line Color — color of the dotted midpoint line (default gray).
Box Background Color — fill color of the source box (default light blue).
Signal Triangle Color — color of the sweep signal triangles (default black).

How to Use It — Trading Workflow
Step 1 — Choose your reference timeframe. Select the timeframe whose candle range you want to monitor. For day trading on a 5-minute or 15-minute chart, the 1-hour or 4-hour timeframe works well. For swing trading on a 1-hour chart, use the Daily or Weekly. For scalping, you can set the reference to the same or one timeframe above your chart.
Step 2 — Mark the key levels. At the start of each new candle on the selected timeframe, the source box and projected lines update to reflect the new previous candle's range. CRH and CRL are your two active liquidity targets for the current period.
Step 3 — Watch for a sweep. As price approaches CRH or CRL, monitor closely for a wick violation followed by a close back inside the range. The indicator will mark the event automatically with a triangle. This is the setup — not the entry signal itself, but the setup that shifts the directional bias.
Step 4 — Look for confirmation and enter. After a Sweep High triangle, the bias shifts bearish. Wait for a bearish confirmation candle, a break of a recent structure low, or any other entry trigger you use. The EQ line is the first natural target, followed by CRL. After a Sweep Low, the bias shifts bullish with EQ and then CRH as upside targets.
Step 5 — Place your stop. Use the extreme of the swept wick as your stop reference. For a short entry after a Sweep High, a stop above the wick high is logical. For a long entry after a Sweep Low, a stop below the wick low protects the trade.

Timeframe Pairing Guide
The indicator works on any chart timeframe — the reference timeframe in settings should generally be equal to or higher than your chart timeframe. Some practical pairings:
For scalping on 1-minute or 5-minute charts, set the reference to 15-minute or 1-hour. For intraday trading on 15-minute charts, use 1-hour or 4-hour as the reference. For day trading on 1-hour charts, use 4-hour or Daily. For swing trading on 4-hour charts, use Daily or Weekly.

Alert Setup
The indicator includes two built-in alerts. CRT Sweep High fires when a bearish sweep of the previous high is detected. CRT Sweep Low fires when a bullish sweep of the previous low is detected.
To activate in TradingView, open the Alerts panel, click Create Alert, select CRT Strategy as the condition, choose either CRT Sweep High or CRT Sweep Low, set your notification method, and click Create. Repeat for the other direction.

Tips
The most powerful CRT setups occur when the sweep happens during a high-liquidity session transition — particularly at the London open or the New York open. A sweep that forms during these windows and aligns with the higher timeframe trend direction tends to produce the cleanest and fastest reversals.
The EQ line is frequently underestimated. After a confirmed sweep and reversal, price almost always rebalances to the 50% midpoint of the previous candle's range before continuing. Using EQ as a partial take-profit level improves the consistency of results.
Running two instances of the indicator simultaneously — one on a higher reference timeframe for context and one on a lower reference timeframe for precise entries — gives a powerful multi-layered view of active liquidity zones.

Limitations
The indicator always shows the single most recent completed candle on the selected timeframe. Historical sweep signals from previous candles are not stored or displayed — only the current period's levels are active. On very high reference timeframes such as Weekly or Monthly, the source box will span a large portion of the chart visually, which is normal and expected behavior.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。