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
Either or both can be enabled, and signals combine as either-fires, both-must-agree, or one engine only. Risk uses either an ATR based stop with a reward multiple or a percentage stop and target. Size is a percent of equity with commission, slippage and no pyramiding set. Boxes, lines and labels are drawn on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Enable JAT+BSM Engine
bool
true
en_jat
Enable POI Scalp Engine
bool
true
en_poi
Signal Combination Mode
string
OR – Either signal fires
sig_comb
Use JAT ATR-based SL/TP (off = POI %-based)
bool
true
use_jat_risk
Base Volatility Coeff
float
1.5
b_cf
Common Period
int
14
al_pr
HTF Background Box
timeframe
15
hf_in
Layer 1 Length (Micro)
int
20
c_l1
Layer 2 Length (Macro)
int
40
c_l2
Layer 3 Length (Global)
int
80
c_l3
Volume Profile Buckets
int
10
vp_bk
Breakout Synergy Multiplier (Fib)
float
1.618
bk_ml
Show all 40 settings
Setting
Type
Default
Variable
Show Candlestick Labels
bool
true
sh_cp
Draw Macro Chart Patterns (Lines)
bool
true
sh_mp
Structure Pivot Lookback
int
10
pv_lb
Pattern Tolerance (%)
float
0.02
st_tl
Bullish Pattern Color
color
color.new(color.lime, 0)
p_clB
Bearish Pattern Color
color
color.new(color.red, 0)
p_clR
Forecast Horizon (Bars)
int
20
fc_hz
Feedback Learning Rate
float
0.1
lr_rt
Bayes Lookback Period
int
500
by_lb
Enable Mean Reversion Gravity
bool
true
en_mr
Model Weight Matrix
text
1.0 0.5 0.2
0.2 1.0 0.5
0.5 0.2 1.0
wt_in
Require Synergy
bool
true
rq_syn
Relaxed MACD
bool
true
rl_md
Fast Len
int
12
f_ln
Slow Len
int
26
s_ln
Sig Len
int
9
sg_ln
Primary Sec 1
symbol
NASDAQ:AAPL
s_1
Sec 2 (Corr)
symbol
NASDAQ:MSFT
s_2
Sec 3 (Corr)
symbol
NASDAQ:GOOG
s_3
Max Trades
int
3
mx_tr
Roll Window
int
5
rl_dy
CI Mult SL
float
1.1
rk_bf
Target RR
float
2.0
rw_ml
Risk-Free Rate
float
0.05
rf_rt
Days to Exp
float
30.0
t_ex
Strike Mult
float
1.0
st_ml
Smooth Polyline Curves
bool
true
curvePath
Show Monte Carlo Random Paths
bool
true
showMC
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 overlay strategy marks short-term turning points on the price chart and enters SPY option-style trades from them. It plots simple moving averages of highs and lows, draws up and down reversal arrows, and colors bars when a short-term extreme coincides wit
This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R
This strategy combines Smart Money Concepts (BOS and CHoCH) with moving average trend filtering and volume spikes to generate trade signals. It checks for 20 EMA and 50 EMA alignment, along with volume 20% above its 20-period SMA. Long entries require a bullis
This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis
This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail