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 strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
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
When a run breaks, the script plots measured move projection arrows, high-water mark lines, and Fibonacci levels directly on the price chart. It executes long positions on bullish reversal breaks and short positions on bearish reversal breaks. Strategy exits are managed via a risk and profit framework including stop loss and take profit rules. Configurable inputs adjust run length, candle body filtering, ATR filters, and visual elements.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Run length
int
5
length
Directional candles only
bool
false
require_dir
Doji invalidates run
bool
false
doji_breaks
└ Max body %
float
5
doji_max_body
Use candle bodies
bool
false
use_body
Break candle must engulf
bool
false
require_engulf
Break near pivot
bool
false
limit_break_dist
└ Max bars
int
0
break_max_bars
Big bar invalidates run
bool
false
atr_filter
└ ATR
int
14
atr_filter_len
×
float
2.0
atr_filter_mult
Sequential extremes
bool
false
require_extend
Show all 40 settings
Setting
Type
Default
Variable
Break clears pivot extreme
bool
true
break_clears_pivot
Trend line
bool
true
show_trend
Projection
bool
true
show_proj
Reversal marker
bool
true
show_rev
Hide realized legs
bool
true
skip_realized
High-water mark
bool
true
show_hwm
Target label
bool
true
show_target
Price
bool
true
lbl_price
Points
bool
true
lbl_points
%
bool
true
lbl_pct
Text size
int
12
lbl_size
Bullish
color
#54a0ff
up_proj_col
Bearish
color
#B53471
down_proj_col
Line width
int
2
line_w
Fib level grid
bool
true
show_fibs
Include extensions
bool
false
fib_show_ext
Level labels
bool
true
fib_lbl
Line style
string
Dotted
fib_style_sel
Transparency
int
55
fib_transp
Stats table
bool
true
show_stats
Reach levels (Fib)
string
0.786
stat1_sel
stat1_cust
float
0.786
stat1_cust
stat2_sel
string
0.618
stat2_sel
stat2_cust
float
0.618
stat2_cust
stat3_sel
string
0.5
stat3_sel
stat3_cust
float
0.5
stat3_cust
Default Unit
string
PnL
i_global_unit
ATR Period
int
14
i_atr_period
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.
This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr
This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos
Calculates multi-period logarithmic regression trend channels and deviation bands across up to twenty selectable lookback lengths directly on the price chart. It evaluates channel slopes and Pearson's correlation coefficient to detect market trends and generat
This trend breakout strategy plots Donchian Channels consisting of upper, lower, and middle bands directly on the main price chart. Long positions enter when price touches the upper channel and pulls back to or below the middle band, placing a stop loss at the
This strategy executes trades on short-term cryptocurrency charts using a combination of pivot support and resistance levels and a multi-pole smoothed trend filter. Entries trigger when price crosses the smoothed trend line and confirms above or below a short-
This strategy trades Donchian breakouts measured on weekly bars while orders execute on the chart timeframe. It allows long and short entries when price breaks the prior weekly channel and exits against the shorter weekly channel. Position size risks a set per