Cardwell Range
- 指标
- 版本: 1.0
- 激活: 5
Cardwell Range Analyze reads trend from the range the RSI holds, not from a fixed overbought or oversold line. Andrew Cardwell's observation was that in a genuine uptrend the RSI oscillates inside a higher band and rarely breaks below it, while in a downtrend it works a lower band and rarely breaks above — so the band the RSI is respecting is itself the trend signal. This indicator turns that reading into a confirmed regime, colours the chart by it, and projects a full ATR trade the moment the regime flips. It is an indicator for chart analysis only: it draws on the chart, it does not place, modify or close trades, it does not send orders, and it does not manage positions or accounts.
It pairs a trend filter with the RSI range so the two have to agree, adds a confirmation delay so a single bar cannot flip the state, and offers optional higher-timeframe and ADX filters for traders who want fewer, cleaner signals. Native MQL5, no DLLs, closed-bar signals, on forex, gold and metals, indices and crypto across any timeframe.
=== HOW IT WORKS ===
Two conditions define the regime, and both must hold. First the trend filter: price is compared to a moving average, giving an up or a down bias. Second the RSI range: the RSI must sit inside its bull band (40 to 80 by default) for a bull reading, or inside its bear band (20 to 60) for a bear reading. A bull regime needs an up bias and the RSI in the bull band; a bear regime needs a down bias and the RSI in the bear band. When the two disagree, the regime is neutral.
A raw reading is not enough. The regime must hold for a set number of closed bars — the confirmation delay — before it is accepted, which filters out the one-bar pokes that make range reading noisy. Only when the accepted regime changes does the indicator treat it as a signal.
On that flip it builds the trade from volatility, not from guesswork. The entry is taken at the breakout close, the stop is placed an ATR multiple away, and three targets are set at further ATR multiples, so every level scales with the instrument and every target is a clean multiple of the entry-to-stop risk. The risk and reward space is shaded so the geometry of the setup is readable at a glance, and dotted target lines with price tags trail to the right of the chart.
Two optional filters tighten the signal further. Higher-timeframe confirmation requires the same Cardwell regime to agree on a larger timeframe before a signal is allowed, read from closed higher-timeframe bars so it never repaints. The chop filter requires ADX to be above a floor, so signals only fire when the market is actually trending rather than grinding sideways.
=== WHAT IS INCLUDED ===
| Module | What it does |
|---|---|
| Cardwell regime engine | Trend bias from a moving average combined with the RSI's bull or bear range, confirmed over a set number of closed bars. The heart of the tool: it names the market bullish, bearish or neutral by the range the RSI is holding. |
| HTF confirmation | Optional filter that requires the same regime to agree on a higher timeframe, evaluated from closed bars so the confirmation never repaints. |
| ADX chop filter | Optional floor on trend strength; signals are suppressed while ADX is below the threshold, keeping the tool quiet in sideways markets. |
| Buy / Sell signals | An arrow and label print on the closed bar where the confirmed regime flips — below the bar for a buy, above it for a sell. |
| ATR trade projection | Entry at the flip close, an ATR-scaled stop, and TP1/TP2/TP3 at ATR multiples, drawn as dotted lines that extend to the right with a price tag on each level. |
| Risk & reward zones | The space between entry and stop shaded as risk, entry to the final target shaded as reward, tuned to sit softly over a dark chart. |
| Heatmap candles | Optional candle colouring by regime — bullish, bearish or neutral — for traders who want the whole chart to carry the read. Off by default, leaving your themed candles in place. |
| Status table | A compact panel listing regime, RSI, both ranges, trend, ADX, the two filters, the confirmation progress, ATR, last price and the reward-to-risk ratio, each with its own strength bar. |
| Neuron signal panel | The Neuron panel: regime with a bar count, RSI and ADX meters, and the live trade — entry, stop and three targets in price, pips and R. A sun/moon icon re-themes the panel and the chart together. |
| Chart theme | An optional dark scheme applied on attach, with configurable background and candle colours. Your original chart colours are saved and restored when the indicator is removed. |
| Alerts | Optional popup and push notification on each new buy or sell signal. |
=== HOW TO READ IT ===
Start with the regime. Bullish means price is above its trend filter and the RSI is working its higher band — the condition Cardwell associated with trends that continue. Bearish is the mirror. Neutral means the trend and the RSI range disagree, which is exactly when range reading is least reliable, so the tool stays out of the way.
Treat a flip as the event, not the RSI level. Because the regime has to clear the confirmation delay, a printed signal is a range that has already proven itself for several bars, not a single spike across a line. When it fires, the projection lays out the trade for you: the stop is where the idea is wrong, and the three targets are graded multiples of that risk, so you can size and scale without measuring.
Use the filters to match the market to your style. Turn on HTF confirmation when you only want to trade in the direction of the larger trend, and turn on the chop filter when you want to sit out quiet, directionless sessions. Both simply gate the signal; the regime read itself is always on the chart.
=== INPUTS ===
| Setting | Default | What it does |
|---|---|---|
| Core Settings | ||
| RSI Length | 14 | Period of the RSI whose range defines the regime. |
| RSI Source | Close | Applied price the RSI is built from. |
| Trend MA Length | 50 | Period of the moving average that sets the trend bias. |
| Trend Source | Close | Applied price compared to the trend MA. |
| Filters | ||
| Bull Range Low / High | 40 / 80 | The RSI band that, in an uptrend, marks a bull regime. |
| Bear Range Low / High | 20 / 60 | The RSI band that, in a downtrend, marks a bear regime. |
| Regime Confirm Bars | 2 | Closed bars the regime must hold before it is accepted. Higher is slower but cleaner. |
| Use HTF Confirmation | false | Require the same regime to agree on a higher timeframe. |
| HTF Timeframe | H4 | The higher timeframe used for confirmation. |
| Use Chop Filter | false | Require ADX above a floor before signals fire. |
| ADX Length | 14 | Period of the ADX used by the chop filter and dashboard. |
| ADX Min Strength | 20 | Minimum ADX for a signal when the chop filter is on. |
| Trade Tools | ||
| ATR Length | 14 | ATR period used to size the stop and targets. |
| SL ATR Mult | 1.5 | Stop distance from entry, in ATR. This distance is one R. |
| TP1 / TP2 / TP3 ATR Mult | 1.0 / 2.0 / 3.0 | Target distances from entry, in ATR. Each target's R is its multiple divided by the SL multiple. |
| Level Line Extend Bars | 50 | How far to the right the trade lines are drawn. |
| Visuals | ||
| Color Candles | false | Colour candles by regime (the heatmap). Off shows your themed candles. |
| Show Buy/Sell Signals | true | Print the arrow and label on the flip bar. |
| Show Trade Levels | true | Draw the entry, stop, targets, zones and tags. |
| Dashboard | ||
| Show Dashboard | true | Show the status table. |
| Dashboard Position | Top Right | One of four chart corners. |
| Signal Panel | ||
| Show Neuron signal panel | true | Show the regime / RSI / ADX / trade panel. |
| Panel position | Bottom Left | One of nine chart anchors. |
| Start in dark mode | true | Initial theme; the sun/moon icon toggles it live. |
| Chart Theme (applied on attach) | ||
| Recolor chart on attach | true | Apply the theme to the chart; your original colours are restored on removal. |
| Background dark grey | dark grey | Chart background in dark mode. |
| Bull candle | dark blue | Up-candle body and wick. |
| Bear candle | black | Down-candle body and wick. |
| Alerts | ||
| Popup alert on signal | true | Fire a terminal alert on each new signal. |
| Push notification on signal | false | Mirror the alert to the MetaTrader app on your phone. |
The colours of every element — signals, lines, zones and candles — are exposed as inputs so the tool can be matched to any chart.
=== GOOD TO KNOW ===
- Closed-bar signals — the regime is confirmed on closed bars and signals fire on the bar close, so a printed arrow does not move. The forming bar updates live, so the dashboard and panel read the current bar while the candle is still open.
- Indicator, not an EA — Cardwell Range Analyze analyses and draws. It does not place, modify or close orders; the projection is guidance you act on yourself.
- Platform — MetaTrader 5, any symbol and timeframe. Rendered through the built-in Canvas, with no DLLs. Everything overlays the price chart; no sub-window is used.
- Light & dark — the sun/moon icon re-themes the panel and the chart together. Your original chart colours are saved on attach and restored when you remove the indicator.
- Tune it to the market — widen the confirmation delay or add the HTF and ADX filters for fewer, stronger signals; narrow them for a faster, more active read.
