Indicator · Pine Script v6 · On the chart

Trend Break Indicator

by Chovy-King

An indicator version of a trend breakout strategy with BTC, gold and custom presets.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code814
Settings40inputs
LicenceNone stated
Last update6 months ago30 Apr 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Trend Break Indicator plots 20 and 60 EMAs and marks a triangle when a strong candle breaks the latest swing in the direction of the trend, after filters for higher-timeframe agreement, volume, consolidation, a pullback to the fast EMA, RSI range and EMA slope. Stop and target lines are drawn, tooltips explain each signal, and a top-right panel and alerts are included.

Details

Published by

Chovy-King on GitHub

Draws

On the price chart

Category

Breakout, Trend

Markets

Crypto, Gold

Timeframes

M15-H1, H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
品种(BTC / GOLD / Custom)stringBTCpreset
🔧 覆盖预设(使用下方手动参数)boolfalseoverridePreset
允许多头信号booltrueallowLong
允许空头信号booltrueallowShort
EMA 快线周期int20maFastLen
EMA 中线周期int60maMidLen
ATR 周期int14atrLen
波段点左侧 K 线数(Custom 使用)int3swingLeft_i
波段点右侧 K 线数(Custom 使用)int3swingRight_i
滚动极值窗口 N(Custom 使用)int20rollLen_i
启用 HTF 共振过滤booltrueenHTF_i
HTF 周期(Custom 使用)timeframe240htfTF_i
Show all 40 settings
SettingTypeDefaultVariable
⭐⭐ 交易量放大过滤booltrueuseVolFilter_i
⭐⭐ 突破 K 线量 ≥ 20EMA 均量 × Nfloat1.3minVolMult_i
⭐ 强趋势棒 body/range 下限float0.60minBodyRatio_i
⭐ 强趋势棒 range ≥ N × ATRfloat0.8minRangeATR_i
⭐ 收盘价至少超突破位 N × ATRfloat0.08minBreakATR_i
⭐⭐⭐ 启用突破前盘整压缩过滤booltrueuseConsolid_i
⭐⭐⭐ 盘整观察 N 根 K 线int10consolidBars_i
⭐⭐⭐ 盘整 N 根 K 线极差 ≤ M × ATRfloat2.2maxConsolidATR_i
⭐⭐⭐ 强制结构:多头需 close>EMA60、空头反之booltruerequireAboveMA60_i
⭐⭐⭐ 要求突破前有回撤触碰 EMA20booltruerequirePullback_i
⭐⭐⭐ 回撤在最近 N 根内出现int10pullbackLookback_i
⭐⭐ 突破前连续同向强棒上限(防追高)int2maxConsecStrong_i
RSI 周期int14rsiLen
⭐⭐ 多头 RSI 下限float45rsiMinLong_i
⭐⭐ 多头 RSI 上限(防超买追高)float72rsiMaxLong_i
⭐⭐ 空头 RSI 下限(防超卖追空)float28rsiMinShort_i
⭐⭐ 空头 RSI 上限float55rsiMaxShort_i
EMA20 斜率阈值float0.0008minSlope_i
⭐ 两次同向信号最少间隔 N 根int15minBarsBetween_i
SL 在参考低/高点外再扩 N × ATRfloat0.35slBufATR_i
⭐⭐ SL 距入场最大 N × ATR(硬上限)float2.0maxSLATR_i
SL 参考最近 N 根极值int3slLookback_i
TP1 = N × Rfloat1.5rr1_i
TP2 = N × Rfloat2.5rr2_i
显示三角箭头 BUY / SELLbooltrueshowSignals
最多保留最近 N 个三角箭头int50maxRecentTriangles
显示 SL / TP 水平线boolfalseshowSLTP
保留最近 N 笔信号的 SL/TPint3maxRecentSLTP
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Sideway Zones Live

by dearvn
257 stars

Sideway Zones Live is an overlay indicator that estimates inner and outer sideways bands from recent highs and lows with a rational quadratic kernel. It tracks swing pivots over a loopback period and counts bars that remain between the outer high and low. Afte

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Sideway Zones Live
114 stars

This indicator adapts Michael Chalek's Dual Thrust trading concept to plot breakout levels and overlay bands directly on the price chart. It calculates lookback ranges based on historical price action and provides two algorithmic variations along with multiple

Indicator v4 TrendBreakout Repaints
Updated 1 year ago · None stated GitHub repository of Dual Thrust Trading Algorithm
56 stars

This indicator calculates dynamic upper and lower trendlines from pivot highs and pivot lows across a specified bar length. Trendline slopes are derived using ATR, standard deviation, or linear regression methods. It plots trendlines and breakout signal labels

Indicator v5 TrendSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Trendlines With Breaks [LUX]

Reversal Breakout System

by TamaraKGreen
46 stars

This indicator detects inside candles inside larger parent candles on the price chart. It plots colored boxes around inside and parent candles, fills them with user-adjustable transparency, draws Fibonacci retracement lines and mother candle range lines, and d

Indicator v6 Candlestick patternsBreakout
Updated 7 weeks ago · None stated GitHub repository of Reversal Breakout System

RSC Trend Trading Study

by readysetcryptocodes
43 stars

This indicator plots Donchian Channels alongside fast and slow simple moving averages directly on the price chart. It generates bullish breakout signals when the high reaches the upper channel while the close is above the 50 SMA (and optionally the 200 SMA). B

Indicator v4 TrendBreakout
Updated 2 years ago · None stated GitHub repository of RSC Trend Trading Study

Candle Stage Analysis

by ChartsLector
41 stars

This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend

Indicator v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of Candle Stage Analysis

More Breakout scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers