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
Long positions open on bullish MACD crossovers when price is above the trend EMA and histogram momentum is rising. Short positions open on bearish crossovers below the trend EMA with falling histogram momentum. Position risk is managed via ATR-based stop loss and take profit orders. Configurable inputs include MACD lengths, EMA trend filter settings, and ATR risk multipliers. It operates directly on the price chart and renders a top-right HUD table showing current regime and volatility status.
MACD crossover entries with histogram slope validation
Configurable EMA trend regime filter
ATR-based dynamic stop loss and take profit targets
On-chart HUD table displaying regime, slope, and volatility
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
快線週期
int
12
fastLen
慢線週期
int
26
slowLen
信號線週期
int
9
sigLen
啟用 200 EMA 趨勢過濾
bool
true
useTrend
趨勢 EMA 週期
int
200
trendLen
ATR 週期
int
14
atrLen
止損 ATR 倍數
float
2.0
slMult
獲利 ATR 倍數
float
3.5
tpMult
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 long-only trend-following strategy combines Ichimoku Kinko Hyo components with higher timeframe moving average filters. It triggers long entries when price trades above a higher timeframe EMA and a bullish Tenkan-Sen cross above Kijun-Sen occurs under fav
This strategy calculates trend direction across three user-defined higher timeframes using dual Simple Moving Averages, filtered by On-Balance Volume and Commodity Channel Index conditions alongside fractal pivot swings. Entries trigger when multi-timeframe tr
This strategy executes gold trades by combining multiple exponential moving averages with RSI, Stochastic oscillator, and ATR indicators alongside Fibonacci zones. It triggers confirmed buy or sell positions and optional scalp legs based on trend direction and
This strategy automatically adapts its moving average lengths and types based on the chart's timeframe, covering scalping, intraday, and swing styles. It generates entry signals when a fast moving average crosses a slow moving average, provided price is on the
2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the
This strategy plots on the price chart and opens long or short positions when a weighted score from MACD, Stochastic RSI, RSI, Supertrend and a moving-average crossover exceeds a user-set trigger. Each component has its own weight and candle delay. Entries can