Dserg - LinRegression Breakout:
The indicator for automatic drawing of consolidation areas and channels based on the linear regression
Fig.1 Dserg - LinRegression Breakout
Author: Nikolay Kositsin
Trading the Break (adapted from dailyfx article)
Since future price movements are, in essence, unpredictable; identifying
with and trading in the direction of the trend gives the trader the
chance to jump on the side of any bias that may have been seen in the
market. And if those biases (trends) are to continue, the trader can
potentially make three, four, or five times the amount they put up to
Unfortunately, trends don’t always exist. More common is the condition
with which prices aren’t displaying some element of a bias; when prices
move in a range-bound fashion for an extended period of time. And
because there is a lack of a bias, knowing how to trade in these
situations can be quite a bit more difficult. But traders have two
choices: They can trade as if the range is going to continue, or they
can trade the range in the expectation of a breakout of those
When prices do break-out from a range, the movement can be fast,
violent, and extremely large. Imagine a rubber band being pulled all the
way back, until eventually it pops; that’s somewhat similar to what can
happen when a breakout takes place.
Trading a breakout is not for the faint of heart. Often the breakout
will come from a news event, or a data announcement, or some other
reason that causes traders to push prices being the previously defined
support and resistance levels.
It often takes more than one attempt to catch a breakout
It’s this extreme pickup in volatility that makes trading breakouts so
difficult; as the accompanying price movements can swing dangerously in
both directions, and there will be many instances in which support
and/or resistance get broken, only to see prices reverse and move in the
opposite direction. This is the dreaded ‘false breakout.’
Because of the heightened volatility around such events, and given the
risk of false breakouts; traders often need to focus more heavily on
risk and reward while being more aggressive: cutting losers even quicker
while also looking for larger profit targets when they find themselves
on the right side of the trade.
ProbabilitiesTraders will often assign a lower probability of success to breakout
strategies because of the aforementioned reasons. If a trader thinks
they can usually win 1 out of every two trend trades, they will often
look to win 1 of every 4 breakout trades.
And because breakouts have a lower probability of success, traders need
to adjust risk-reward ratios accordingly: Looking at even tighter stops,
and even larger profit targets.
So, we’ve warned you against the risks of trading breakouts; a logical
question that follows is often ‘why would anyone trade breakouts when
there might be a trend somewhere that can be traded?’
Well, the beauty of the breakout is in the potential. When a breakout
does work, the upside can potentially be huge (just like the downside is
huge, but can be addressed or offset with tighter stops).
New trends often form from an initial breakout; and this is a very
natural life-cycle in financial markets. Let’s look at an example to
How to Trade Breakouts
The key ingredient to trading a breakout is Support and/or Resistance.
These levels that may see changes in order flow are the same prices that
traders can look to enter upon breaks.
Pivot Points are an extremely common option for breakout traders.
Traders can look to these price levels for potential breakout moves,
while placing entry orders just outside of these prices so that once a
pivot point yields to a price surge, the entry is initiated and the
trader is in the position.
Another common option for trading breakouts is including the Price
Channels indicator (often called ‘Donchian Channels,’ after famed
breakout-trader Richard Donchian). Price Channels will show the highest
high, and the lowest low over the past x periods (x being the number of
candles input by the trader). When prices approach these levels, they
may go on to make higher highs, or lower lows; and this is the essence
of a breakout entry.
The same type of logic can be utilized around psychological whole
numbers, or round levels like 1.3500 on EURUSD or .9000 on AUDUSD. These
round-number price levels will often see a large number of stops or
limits, and this can stop a trend dead in its tracks, at least
temporarily. But when a subsequent approach towards that level takes
place, the number of stops or limits may not be able to hold back the
surge of selling (or buying in the case of an up-trend).
This leads to one of the more common ways of trading breakouts;
incorporating price action and previous market movements into the
The indicator works really well on a live chart but when testing in the Startegy Tester it doesn't paint the arrows, something seems to be wrong with the way the Linear Regression is drawn. I've also tried to use it with iCustom in an EA and the painting is incorrect.
Any ideas how this could be fixed?