Linear Regression Candles replaces each candle on your MT4 or MT5 chart with a smoothed version of itself, and puts a moving average of the smoothed close on top. Two settings, one line, no arrows.

Four regressions, not one average
This is the part that makes it different from a moving average, and it's simple.
A linear regression over the last linreg_length bars is fitted to the open series, and its value at the current bar becomes the candle's open. The same fit is done separately on the high series, the low series and the close series. Those four numbers are drawn as one candle.
So you are not looking at a line through price. You are looking at price itself, redrawn โ body and wick โ with each component independently smoothed. A single spike bar doesn't leave a spike; it leaves a slightly longer wick spread over several bars.
The default length is 11. Higher smooths harder and lags more, in the ordinary way.
The colour is decided by the smoothed values: aqua when the smoothed close is above the smoothed open, red when it isn't. Because those are regressions, the colour flips later than the raw candle's does, and it stays flipped through the small counter-bars that would break up a run of real candles.
What was wrong, and what I changed
Worth stating plainly, because it changes what you get.
The build I inherited computed all four regressions and then drew the raw candle anyway, using the smoothed values only to pick the colour. So the smoothing was invisible: you got ordinary price bars in two colours, from an indicator named after the smoothed candles. Both platforms did it.
That's fixed. The drawn candle is now the regression candle, on MT4 and MT5. If you actually wanted the old look โ real price action with the regression's directional read as the colour โ set draw_raw to true and you have it back as a deliberate choice.
Two smaller fixes came with it. The moving average line was clrBlack, which is invisible on MetaTrader's default dark chart; it's now blue. And because the four series are regressed independently, the smoothed high can land below the smoothed body โ the wick is now clamped so a candle can't draw inside out.
The moving average
signal_length (11) and signal_type give you an SMA, EMA, RMA or WMA of the smoothed close, not of the raw close. That matters: it's an average of an average, so it's considerably slower than a same-length average on price, and it's much less inclined to change direction.
Turn it off with signal_show if you only want the candles.

| Moving average | Heikin Ashi | This | |
|---|---|---|---|
| What you see | A line | Recomputed candles | Recomputed candles |
| How it smooths | One average of one price | Averages within and across bars | A separate regression per OHLC component |
| Wicks | n/a | Recomputed | Regressed independently |
| Reacts to a single spike | Somewhat | Somewhat | Very little |
| Extra plot | n/a | None | An average of the smoothed close |
Where it's weak
Your chart's own candles are still underneath. This draws its candles as an overlay; it can't hide the ones MetaTrader is already drawing. Set the chart's own candle colours to None if you want to see only the smoothed ones. On the screenshots above both are visible on purpose, so you can see how far the smoothing moves them.
The smoothed prices are not prices. A regression value is a fitted number, not something that traded. Don't measure a stop from a smoothed wick, and don't read a smoothed high as a level anyone defended.
There are no signals. Despite what a name like this often implies elsewhere, there are no arrows, no alerts and no notification block at all. Colour and a line, that's the output.
Lag is doubled on the average. The moving average smooths an already-smoothed series, so at length 11 it behaves like something considerably slower on raw price.
One length for all four components. linreg_length applies to open, high, low and close alike. You can't smooth the wicks harder than the bodies.
Nothing adapts. 11 and 11 are the same numbers on every symbol and timeframe.
lin_reg off makes it a colouring tool. Setting that input to false skips the regressions entirely and the candles become raw price, coloured by whether the raw close beat the raw open โ which is what your chart already told you. It exists for comparison, not for use.
Questions you'll have
How is this different from a moving average? An average gives you one line. This gives you four regressions, one per OHLC component, drawn back as a candle, so you keep the shape of the bar.
Does it repaint? The regression at a closed bar uses only bars up to that bar, so closed candles don't change. The forming candle moves as its bar develops.
Why do I see two sets of candles? Yours and the indicator's. Set the chart's own candle colours to None to see only the smoothed set.
What is draw_raw for? It restores the older behaviour: raw price candles coloured by the regression's direction. Off by default, because the smoothed candles are what the indicator is named after.
Is the moving average taken on price? No, on the smoothed close. That's why it's slower than a same-length average would normally be.
Are there alerts? No. There is no notification block in this indicator at all.
Can I use the smoothed high as a level? No. It's a fitted value, not a traded price.
What should I set the length to? Start at 11 and compare against 21 on your own chart. Longer holds colour through more noise and turns later.
Can an EA read it? Yes, the four candle buffers and the moving average are plotted buffers.
Best timeframe? Any, but it earns its keep where the raw candles are noisy โ M15 to H1 on a fast instrument.
MT4? Both platforms are included, one download each. Same four regressions, same average, same draw_raw switch.
Support
Send me a message with a screenshot, the symbol and the timeframe, and I'll tell you what the tool was doing on that bar.
Analysis tool. It places no trades and makes no profitability claim. Past price behaviour is not a guide to future price behaviour.