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
A sharp drop or pump followed by a slow recovery or decline, filtered by a daily EMA, creates a long or short setup. Risk is expressed in R multiples with an ATR-based stop, staged targets at one, two and three R, a ratcheting stop and a trailing runner. It plots the daily EMA, shows entry and exit labels, a dashboard and a regime read-out.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Drop/Pump Window (4H bars)
int
120
drop_window
Min Drop/Pump %
float
13.0
min_drop_pct
Rise/Decline Window (4H bars)
int
75
rise_window
Min Directional Bars Ratio
float
0.25
min_up_bars_ratio
Max Single Up Bar %
float
10.0
max_single_up
Max Single Down Bar %
float
-5.0
max_single_down
Min Total Move %
float
3.5
min_rise_pct
Daily EMA Period
int
6
daily_ema_len
ATR Period
int
14
atr_period
Fixed Stop ATR Mult (= 1R)
float
3.0
atr_fixed_mult
Runner Trail ATR Mult
float
3.9
atr_trailing_mult
Fallback Trailing %
float
6.0
trailing_pct_fb
Show all 22 settings
Setting
Type
Default
Variable
Fallback Fixed Stop %
float
4.0
fixed_stop_pct_fb
Risk Per Trade %
float
3.0
risk_pct
Enable Long Entries
bool
true
enable_longs
Enable Short Entries
bool
true
enable_shorts
Show R-Target Lines
bool
true
show_r_lines
Show Entry Labels
bool
true
show_trade_labels
Show Exit Labels
bool
true
show_exit_labels
Show Dynamic Stop Line
bool
true
show_stop_line
Show Drop/Pump Labels
bool
true
show_drop_labels
Account Equity ($)
float
10000
account_equity
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 indicator identifies mean-reversion setups by combining Bollinger Bands with Fair Value Gaps (FVGs). It tracks FVGs that print outside the upper or lower Bollinger Bands and counts them toward an alert threshold. Signals trigger upon gap mitigation (by to
Leptokurtic Directional Bias is an overlay indicator that measures kurtosis on a chosen source and marks directional bias on the price chart. The source can be a moving average, ATR, volume, close, or a Bollinger-band trend stop. Bias mode switches among RSI m
Commodity Heat Reversal plots score-based mean-reversion reversal markers on the price chart for commodity futures, aimed at the four-hour timeframe. It builds separate long and short heat scores from ATR distance to a mean moving average, ATR expansion, RSI e
Dynamic Extreme Channels & Reversals tracks evolving price highs and lows to plot adaptive channel bands and a midline directly on the price chart. When no new extremes occur within the specified lookback window, the channel boundaries interpolate toward price
This indicator plots directional trade signals, ATR-based target and stop-loss boxes, and SuperSmoother reversal bands directly on the price chart. It evaluates market conditions across selectable technical strategies, displaying confidence scores alongside an
This overlay indicator recreates short-setup conditions and audits their later outcomes on the price chart. It scores optional percent-surge, RSI overbought rollover, Bollinger exhaustion, volume spike, and EMA trend filters, then marks BASE or STRONG signals