A strategy that takes trades from a confirmed trend and regime engine using ZLEMA, a slow baseline, HMA, ADX, choppiness, efficiency, RSI and gap or shock filters.
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
Each trade gets a drawn box, a latched initial stop loss, three partial take profit brackets and a confirmed ATR and structure trailing stop. Pyramiding is zero, position size defaults to 10 percent of equity, and orders fill on the next available bar.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Price source
source
close
src
Responsive ZLEMA length
int
14
zlemaLen
Slow baseline length
int
55
slowLen
HMA structure length
int
34
hmaLen
ATR length
int
14
atrLen
Maximum entry extension x ATR
float
1.2
maxEntryExtensionAtr
ADX/DMI length
int
14
adxLen
Trend ADX threshold
float
22.0
adxTrendEnter
Range ADX threshold
float
17.0
adxRangeEnter
Release-range ADX
float
20.0
adxTrendRelease
Choppiness length
int
14
chopLen
Range choppiness
float
61.8
chopRangeEnter
Show all 40 settings
Setting
Type
Default
Variable
Trend-release choppiness
float
55.0
chopTrendRelease
Efficiency length
int
12
effLen
Range efficiency
float
0.28
effRangeEnter
Trend-release efficiency
float
0.35
effTrendRelease
ATR baseline length
int
50
atrBaseLen
Pause entries above ATR ratio
float
2.2
panicAtrRatio
Pause entries above candle range x ATR
float
2.8
shockAtrMult
Pause entries after abnormal gaps
bool
true
useGapFilter
Gap threshold x previous ATR
float
1.5
gapAtrMult
Micro-range window
int
20
microWindowBars
Micro-range maximum width x ATR
float
2.4
microBoxMaxAtr
Decisive breakout buffer x ATR
float
0.15
breakoutBufferAtr
Confirmed trend bars before entry
int
2
entryConfirmBars
Breakout lookback
int
12
breakLen
Pullback distance from ZLEMA x ATR
float
0.35
pullbackAtr
RSI length
int
14
rsiLen
Bullish RSI floor
float
53.0
rsiBullLevel
Bearish RSI ceiling
float
47.0
rsiBearLevel
MACD fast
int
12
macdFastLen
MACD slow
int
26
macdSlowLen
MACD signal
int
9
macdSignalLen
Minimum entry score
int
7
minScore
Use volume when available
bool
true
useVolume
Volume average length
int
20
volumeLen
Volume confirmation x average
float
1.15
volumeFactor
Use higher-timeframe permission
bool
true
useHtf
Auto-select higher timeframe
bool
true
autoHtf
Manual higher timeframe
timeframe
240
manualHtfTf
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 strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi
This overlay strategy targets one-minute ES futures and plots volume-weighted moving-average bands from the open, scaled by a standard-deviation multiple, plus a slower band from ten-minute opens. A higher-timeframe exponential moving average can filter trades
This strategy uses multiple VWAP anchors and a custom Lull indicator to generate buy and sell signals on the Nasdaq price chart. It plots the VWAP trend line and three VWAP anchors with customizable colors and mitigation methods. The Lull indicator produces si
STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions
This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.
This overlay strategy plots a two-timeframe Ichimoku setup on the price chart, with Tenkan, Kijun, Chikou, and Kumo from a base higher timeframe and an optional highest-timeframe cloud. It allows two entries in the same direction and uses ATR-based trailing st