1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
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.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
品种(BTC / GOLD / Custom)
string
BTC
preset
🔧 覆盖预设(使用下方手动参数)
bool
false
overridePreset
允许多头信号
bool
true
allowLong
允许空头信号
bool
true
allowShort
EMA 快线周期
int
20
maFastLen
EMA 中线周期
int
60
maMidLen
ATR 周期
int
14
atrLen
波段点左侧 K 线数(Custom 使用)
int
3
swingLeft_i
波段点右侧 K 线数(Custom 使用)
int
3
swingRight_i
滚动极值窗口 N(Custom 使用)
int
20
rollLen_i
启用 HTF 共振过滤
bool
true
enHTF_i
HTF 周期(Custom 使用)
timeframe
240
htfTF_i
Show all 40 settings
Setting
Type
Default
Variable
⭐⭐ 交易量放大过滤
bool
true
useVolFilter_i
⭐⭐ 突破 K 线量 ≥ 20EMA 均量 × N
float
1.3
minVolMult_i
⭐ 强趋势棒 body/range 下限
float
0.60
minBodyRatio_i
⭐ 强趋势棒 range ≥ N × ATR
float
0.8
minRangeATR_i
⭐ 收盘价至少超突破位 N × ATR
float
0.08
minBreakATR_i
⭐⭐⭐ 启用突破前盘整压缩过滤
bool
true
useConsolid_i
⭐⭐⭐ 盘整观察 N 根 K 线
int
10
consolidBars_i
⭐⭐⭐ 盘整 N 根 K 线极差 ≤ M × ATR
float
2.2
maxConsolidATR_i
⭐⭐⭐ 强制结构:多头需 close>EMA60、空头反之
bool
true
requireAboveMA60_i
⭐⭐⭐ 要求突破前有回撤触碰 EMA20
bool
true
requirePullback_i
⭐⭐⭐ 回撤在最近 N 根内出现
int
10
pullbackLookback_i
⭐⭐ 突破前连续同向强棒上限(防追高)
int
2
maxConsecStrong_i
RSI 周期
int
14
rsiLen
⭐⭐ 多头 RSI 下限
float
45
rsiMinLong_i
⭐⭐ 多头 RSI 上限(防超买追高)
float
72
rsiMaxLong_i
⭐⭐ 空头 RSI 下限(防超卖追空)
float
28
rsiMinShort_i
⭐⭐ 空头 RSI 上限
float
55
rsiMaxShort_i
EMA20 斜率阈值
float
0.0008
minSlope_i
⭐ 两次同向信号最少间隔 N 根
int
15
minBarsBetween_i
SL 在参考低/高点外再扩 N × ATR
float
0.35
slBufATR_i
⭐⭐ SL 距入场最大 N × ATR(硬上限)
float
2.0
maxSLATR_i
SL 参考最近 N 根极值
int
3
slLookback_i
TP1 = N × R
float
1.5
rr1_i
TP2 = N × R
float
2.5
rr2_i
显示三角箭头 BUY / SELL
bool
true
showSignals
最多保留最近 N 个三角箭头
int
50
maxRecentTriangles
显示 SL / TP 水平线
bool
false
showSLTP
保留最近 N 笔信号的 SL/TP
int
3
maxRecentSLTP
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.
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
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
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
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
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
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