This strategy calculates 50-period and 200-period exponential moving averages alongside a standard Moving Average Convergence Divergence (MACD) oscillator.
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
5min Scalping EMA50, EMA200, MACD plots the moving averages and the MACD histogram directly on the price chart. The strategy opens a long position when the MACD histogram falls to or below -40, and opens a short position when it reaches or exceeds 40. Moving average crosses are calculated but not used in the entry logic. It contains no predefined stop-loss, take-profit, or independent exit conditions, relying entirely on opposing entry signals to reverse positions.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Fast Length
int
12
fast_length
Slow Length
int
26
slow_length
Source
source
close
src
Signal Smoothing
int
9
signal_length
Oscillator MA Type
string
EMA
sma_source
Signal Line MA Type
string
EMA
sma_signal
Above Grow
color
#26A69A
col_grow_above
Fall
color
#B2DFDB
col_fall_above
Below Grow
color
#FFCDD2
col_grow_below
Fall
color
#FF5252
col_fall_below
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 overlays three exponential moving averages on the price chart, with periods of 9, 50, and 200. It calculates a MACD histogram from a 1-minute timeframe, applies Bollinger Bands to the histogram, and tracks two RSI oscillators of different lengths
This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th
This strategy plots on the price chart and enters from a moving-average filter, ADX and Gann colours. Price above a 200-period EMA allows only longs; price below allows only shorts. A Gann aqua colour with ADX above a key level opens a long, and a Gann brown c
The Reverse RSI Strategy is a scalping system designed for forex pairs during specific trading sessions. It combines a smoothed RSI indicator with five Exponential Moving Averages to identify mean-reversion trade opportunities. Position sizing dynamically adju
This long-only strategy calculates three exponential moving averages with lengths of 50, 100, and 150 periods, plotting them directly on the price chart. It also calculates a 14-period RSI and MACD. The strategy opens long positions when the moving averages al
This strategy goes long when RSI is below the oversold level and short when RSI is above the overbought level, and it can require price to agree with a 200-period EMA. It opens only when flat and, on the entry bar, sets a fixed take profit and stop loss from t