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
HFTAlgo - Micro-Trend Reversal Strategy (Simulated) enters long when a fast EMA crosses above a slow EMA while a 2-period RSI is oversold, and enters short on a bearish EMA cross while the RSI is overbought. Exits are handled with bracket orders using Average True Range multipliers for stop loss and take profit. The script plots the EMAs, entry markers, and background trend highlights directly on the main price chart.
Fast micro-trend detection with short EMA crosses
2-period RSI momentum reversal filter
ATR-based fixed stop-loss and take-profit bracket exits
On-chart visual signals and background trend coloring
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Enable Strategy
bool
true
enableStrategy
Fast EMA Length
int
3
fastEmaLength
Slow EMA Length
int
5
slowEmaLength
RSI Length (Momentum Reversal)
int
2
rsiLength
RSI Oversold Level
float
10.0
rsiOversold
RSI Overbought Level
float
90.0
rsiOverbought
ATR Period
int
14
atrLength
Stop Loss (ATR Multiplier)
float
1.5
slMultiplier
Take Profit (ATR Multiplier)
float
1.0
tpMultiplier
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 mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir
This strategy draws on the price chart and combines Stochastic RSI, the Money Flow Index, and an exponential moving average to open long or short trades. Longs use the lower oscillator thresholds and shorts use the upper ones, with direction limited to longs,
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 combines multi-timeframe RSI analysis with exponential moving average filters to execute trades on price bounces. It evaluates daily and weekly RSI levels alongside pip-distance thresholds between fast, slow, and long-term EMAs. Position entries
This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra
Burgle Bounce is a price-chart strategy that treats a move toward one of up to four simple or exponential moving averages as a test when price comes within a user-set percentage of ATR, then exits toward a target average under a separate error margin. Longs an