A long-only strategy that uses an EMA ribbon built from the 144-period EMA of highs and lows as the trend filter, with an optional rising-slope requirement and a set of Fibonacci-length EMAs for alignment.
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
After a shallow pullback into the ribbon it stores the recent swing high and enters when price closes above it. The stop is anchored to the ribbon with a minimum distance, and the target uses a reward-to-risk ratio. Ribbons and active levels are drawn.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Green Ribbon EMA Length
int
144
greenLen
Require Rising Ribbon (slope filter)
bool
true
useSlopeFilter
Slope Lookback (bars)
int
10
slopeLookback
Min Ribbon Slope Over Lookback (%)
float
0.0
minSlopePct
Fib EMA 1 (fastest)
int
21
fibLen1
Fib EMA 2
int
34
fibLen2
Fib EMA 3
int
55
fibLen3
Fib EMA 4 (RED - alignment filter)
int
89
fibLen4
Swing High Detection
string
SWING_PIVOT
swingMode
Pivot Left Bars
int
5
pivotLeft
Pivot Right Bars
int
2
pivotRight
Highest-High Lookback (bars)
int
20
swingLookback
Show all 25 settings
Setting
Type
Default
Variable
Max Pullback Depth Below Ribbon Low (%)
float
0.5
pullbackDepthPct
Re-target On Newer Swing Highs
bool
true
trackNewPivots
Stop Loss Anchor
string
SL_RIBBON
slMode
Risk : Reward Ratio
float
2.0
rrr
Extra SL Buffer Below Anchor (%)
float
0.0
slBufferPct
Minimum Stop Distance (%)
float
0.5
minStopPct
Show Green Ribbon
bool
true
showGreen
Show Orange Ribbon
bool
true
showFib
Show Armed Swing-High Lines
bool
true
showSwingLines
Show Active SL / TP
bool
true
showTradeLevels
Limit Backtest Window
bool
false
useDateFilter
Start
time
timestamp("2020-01-01T00:00:00+0000")
startTime
End
time
timestamp("2030-01-01T00:00:00+0000")
endTime
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