This strategy identifies trending breakouts by comparing total candle ranges to the overall high-low channel over a set period alongside a Simple Moving Average.
1Copy the scriptPress Copy script above, or the copy button on the code below.
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
60 lines of Pine Script v5 from 策略/Trend Catcher 策略.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Long trades enter when the range efficiency ratio crosses above a threshold while the SMA rises, while short trades trigger when the SMA falls. Exits include configurable percentage-based stop loss and take profit orders for a partial position size, plus full position closures whenever the SMA changes direction. The strategy plots the moving average, entry benchmarks, and target zones directly on the price chart.
Range efficiency ratio calculation
SMA trend direction filter
Configurable percentage take-profit and stop-loss levels
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Start Date
time
timestamp("1 Jan 2022 00:00:00")
startDate
End Date
time
timestamp("1 Jan 2030 00:00:00")
endDate
len
int
10
len
tp
float
2.5
tp
sl
float
2.5
sl
malen
int
5
malen
limit
int
50
limit
qty_balance
int
50
qty_balance
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 plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos
This strategy executes trades based on crossovers between a 12-period and a 26-period exponential moving average (EMA). Long positions can be filtered by pivot resistance breakouts and RSI boundary ranges. For trade management, it provides two configurable par
This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the
This strategy executes trades on short-term cryptocurrency charts using a combination of pivot support and resistance levels and a multi-pole smoothed trend filter. Entries trigger when price crosses the smoothed trend line and confirms above or below a short-
This strategy trades longs and shorts on the price chart. Long entries require a close above the prior Donchian high, a close above a long-term SMA, and RSI above a threshold, with size set as a percentage of equity. Long exits use a stop at the prior Donchian
This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr