מעודכן

EMA30 Band Breakout by EL COBER

17 028
A trend-following indicator that wraps price in a band built from two EMAs, 30-period EMA of highs and 30-period EMA of lows, and signals when price breaks out to a new swing beyond its previous one. A 200-period EMA acts as the trend filter.

How it works

The band. The space between the EMA30 High and EMA30 Low is shaded according to where price is closing:

Green: close is above the EMA30 High (bullish pressure)
Yellow: close is inside the band (neutral / consolidation)
Red: close is below the EMA30 Low (bearish pressure)

LONG signal. While price is trading above the EMA30 High, the script tracks the peak of that excursion. When it falls back inside the band, that peak is stored as the reference high. A LONG label prints when a later push above the band breaks above that previous peak, and the close is above the EMA200.

SHORT signal. The exact mirror: price trades below the EMA30 Low, the lowest point of that excursion is stored, and a SHORT label prints when a later move breaks below that previous trough, with the close below the EMA200.

Staying in the trade. A signal won’t repeat while the position is considered open. A long is considered finished only after two consecutive closes below the EMA30 Low (a short, after two consecutive closes above the EMA30 High), so single-bar dips don’t end the move early.

Small dotted lines on the chart mark the stored previous peak and trough, so you can see exactly which level a breakout has to clear.

Settings

EMA band length and trend EMA length
EMA200 trend filter on/off
Breakout confirmation by close or by high/low touch
Show/hide SHORT signals
Number of consecutive closes required to end a position
Band fill: on/off, opacity, and a custom color for each zone

Notes

Signals are calculated on bar close; the band color can change while a bar is still forming and settles when it closes.
Works on any market and timeframe, but the parameters are best tuned to the instrument you trade.
This is a charting tool, not a strategy, and it does not place orders or show backtest results.
Not financial advice. Always test on your own markets and use proper risk management.
הערות שחרור
Update notes: EMA30 Band Breakout

What’s new

Pine Script v6. The script has been migrated to version 6.
Now a pure indicator. The strategy layer has been removed: no order placement, no backtest results, no strategy on/off toggle. It only draws the band and the signals.
Colored band. The area between the EMA30 High and EMA30 Low is now shaded by where price closes: green above the band, yellow inside it, red below it. Fill opacity, each zone’s color, and the fill itself can be adjusted or switched off in the settings.
LONG / SHORT labels. Signal labels now read LONG and SHORT instead of BUY and SELL.
Alternating signals. Signals now strictly alternate: after a LONG, the next signal can only be a SHORT, and vice versa. The same direction never prints twice in a row. If SHORT signals are turned off, this rule is disabled so LONG signals can still appear repeatedly.

What’s removed

The “consecutive closes to exit” setting. Since a position is now closed only by the opposite signal, the exit rule no longer applies.

Unchanged

Breakout logic: a signal prints when price pushes beyond the previous swing outside the band, with the EMA200 trend filter and the close/high-low confirmation option.
The dotted reference lines showing the stored previous peak and trough.
הערות שחרור
Optional EMA50. A 50-period EMA can now be plotted on the chart. It is off by default and can be switched on in the settings under the “EMA50” group, where you can also change its length and color. It is for visual reference only and does not affect the signals.
הערות שחרור
Update notes

What’s new

Reversal signals. The indicator now also prints a signal when price closes on the opposite side of the band for several bars in a row:
If the last signal was LONG and price closes below the EMA30 Low for 2 consecutive bars, a SHORT is printed.
If the last signal was SHORT and price closes above the EMA30 High for 2 consecutive bars, a LONG is printed.
This catches strong one-directional moves that never break a previous swing, which the original breakout rule could miss.
New settings. A toggle to turn reversal signals on or off (on by default), and a setting for the number of consecutive closes required (default 2). Raising it to 3 gives later but cleaner signals in choppy markets.
Trend filter applies to reversals too. With the EMA200 filter enabled, a reversal LONG requires the close to be above the EMA200, and a reversal SHORT requires it to be below. With the filter off, nothing changes.

Good to know

Signals still strictly alternate: LONG, SHORT, LONG, SHORT. The same direction never prints twice in a row.
Reversal signals need “Show SHORT signals” to be enabled.
In sideways, choppy markets the extra signals can increase the number of false signals. Test on your own instruments and adjust the number of closes accordingly.
הערות שחרור
This script is outdated and no longer maintained. Please use the latest version here:

EMA30 Band Breakout v2 by EL COBER

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.