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
Tn Adaptive Risk Regime v6 compares ATR to its SMA over a lookback to classify high or low volatility. Low volatility triggers mean reversion by fading range extremes detected over a set length. High volatility activates breakout momentum on range breaks. Volume confirmation can filter signals. Risk uses ATR-based stops scaled by regime-specific risk-reward ratios with a base multiple. The strategy overlays signals on the price chart and sizes positions as a percentage of equity.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Length
int
14
atrLen
Volatility Lookback (SMA)
int
50
lookback
Range Length
int
20
rangeLen
Base Stop ATR Mult
float
1.5
baseStopMult
R:R (Low Vol)
float
2.0
rrLowVol
R:R (High Vol)
float
3.0
rrHighVol
Volume Confirmation
bool
true
useVolConf
Volume Multiplier
float
1.3
volMult
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.
Calculates standard Bollinger Bands and identifies band expansion breakouts where upper and lower bands move in opposite directions. It enters long positions when price breaks above the upper band with a high candle body percentage, and enters short positions
This strategy executes pullback trades based on internally computed Bollinger Bands and candle price action directly on the main price chart. It tracks breakout and pullback states to trigger long and short entries. Users can select among three distinct take p
This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a
This strategy fades opening gaps on ES during the New York regular session and draws on the price chart. It checks the gap against a minimum percentage, a minimum point size, and an optional ATR multiple, then uses a five-, fifteen-, or thirty-minute opening r
KC Integration is a trading strategy that calculates multiple sets of Keltner Channels tailored for both trend-following and counter-trend conditions. It plots upper, middle, and lower channel bands directly on the main price chart to identify potential breako
The strategy detects range expansion by comparing the previous bar's range to its ATR multiple. It places pending stop entries above highs of up bars or below lows of down bars. On trigger it enters positions with take profit and stop loss in ticks using OCA g