A strategy that detects fair value gaps and trades only those scoring high on a five-point quality check covering gap size, impulse strength versus ATR, candle body ratio and volume.
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
Optional filters include a 200 EMA trend filter, premium and discount zone, session and trading hours. Entries use limit orders at the gap midpoint or another chosen level, with a stop buffer, a fixed reward-to-risk target, optional breakeven and trailing stop, risk-based sizing, a cap on simultaneous trades and optional end-of-day closing.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Min Gap Size (%)
float
0.06
min_gap_pct
Min Impulse (x ATR-14)
float
1.2
impulse_atr
Min Body/Range Ratio
float
0.55
body_ratio_min
Volume Confirmation
bool
true
use_volume
Volume Multiplier
float
1.2
vol_mult
Min Score to Trade (1-5)
int
4
min_score
EMA Trend Filter
bool
true
use_ema
EMA Length
int
200
ema_len
Premium/Discount Zone Filter
bool
true
use_pd
Zone Lookback (bars)
int
50
pd_lookback
Session Filter
bool
false
use_session
Allowed Session
session
0800-1700
sess_input
Show all 37 settings
Setting
Type
Default
Variable
Boost Size on Stacked FVG
bool
true
use_stacked
Stacked Within (bars)
int
5
stacked_bars
Risk Per Trade (%)
float
1.0
risk_pct
R:R Ratio
float
2.5
rr_ratio
SL Buffer (%)
float
0.08
sl_buf_pct
Move SL to Breakeven at 1R
bool
true
use_be
Use Trailing Stop
bool
false
use_trail
Trail Distance (%)
float
0.5
trail_pct
Max Simultaneous Trades
int
2
max_trades
Entry At
string
EQ (50%)
entry_at
Order Type
string
Limit Order
entry_mode
Restrict Trading Hours
bool
true
use_time
Start Hour (0-23)
int
8
hour_start
End Hour (0-23)
int
20
hour_end
Close All Trades at EOD
bool
true
close_eod
Close at Hour
int
21
eod_hour
Show FVG Boxes
bool
true
show_boxes
Show Entry/SL/TP
bool
true
show_levels
Show EQ Line
bool
true
show_eq
Bullish Fill
color
color.new(#00C896, 80)
bull_bg
Bearish Fill
color
color.new(#FF4560, 80)
bear_bg
Stacked Gold
color
color.new(#FFD700, 55)
stk_col
Enable PineConnector Alerts
bool
false
use_pc
PineConnector License ID
string
12345
pc_id
PineConnector Risk %
float
1.0
pc_risk
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.
Donald - AI Futures 5M 15M Timeframe is an overlay trading strategy designed for intraday futures trading. It utilizes rational quadratic kernel regression to construct dynamic momentum zones and smoothed price boundaries on the main price chart. The strategy
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 identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC
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 strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters
This strategy is titled for Bitcoin on the four-hour chart and is set to draw on the price chart. It detects three-candle fair value gaps and inverted gaps, and it defines a check for price near a gap midpoint within a percentage tolerance. An optional filter