Backtesting Forex

Strategy Templates

Ready-made educational strategy templates, organised as a learning path from Foundation to Advanced. Each one shows the indicators it uses, how it manages stop loss and take profit, its suggested timeframe and how many variations it includes.

These templates are educational starting points for learning how trading strategies are constructed — not investment advice or a recommendation to trade. Always do your own research.

See the full strategy rules

Register free to unlock every template’s complete rules and backtest them on real historical data.

Register free

Foundation

Foundation

Allow Concurrent Trades

Demonstrates running a strategy that does NOT skip entry while already in a trade. With the skip-entry setting off, the strategy can open a new trade on an instrument even while another trade on the same instrument is still open, so several overlapping trades can run on the same instrument at once (the default keeps to one trade per instrument at a time). A classic EMA(9)/EMA(21) moving-average crossover is the entry trigger (long on the up-cross, short on the down-cross), so the only thing this template showcases is the concurrent-trade behaviour - compare it with a strategy that skips entry while already in a trade to see the difference. An ATR stop loss and a risk-to-reward take profit manage each trade.

Foundation

Bollinger Band Bounce

The Bollinger Band bounce, a mean-reversion setup. It goes long when price closes back above the lower band (bouncing up off the oversold edge) and short when price closes back below the upper band (bouncing down off the overbought edge), using the standard 20-period, 2-standard-deviation bands. Each trade uses an ATR stop loss and a risk-to-reward take profit, with a variation that tightens the bands to a 10-period length and a variation on the reward ratio.

Foundation

Bollinger Band Breakout

The Bollinger Band breakout, a volatility-expansion setup. It goes long when price closes above the upper band and short when price closes below the lower band, using the standard 20-period, 2-standard-deviation bands. Each trade uses an ATR stop loss and a risk-to-reward take profit, with a variation that tightens the bands to a 10-period length and a variation on the reward ratio to give breakouts more room to run.

Foundation

Close Trades Before the Weekend

Demonstrates running a strategy that does NOT hold trades over the weekend. A trade still open when the forex market closes on Friday is closed before the weekend, instead of being carried across the weekend gap where the price can jump on the Sunday/Monday reopen. A classic EMA(9)/EMA(21) moving-average crossover is the entry trigger (long on the up-cross, short on the down-cross), so the only thing this template showcases is the weekend behaviour - compare it with a strategy that holds trades over the weekend to see the difference. An ATR stop loss and a risk-to-reward take profit manage each trade.

Foundation

EMA Crossover

A fast/slow Exponential Moving Average crossover. It goes long when the 9-period EMA crosses above the 21-period EMA and short when it crosses back below, protected by an ATR stop loss and a risk-to-reward take profit. Because the EMA reacts faster than the SMA, entries trigger earlier. A variation uses the 12/26 EMA pair for a steadier, slightly slower version.

Foundation

Golden Cross / Death Cross

Trades the famous Golden Cross and Death Cross. It goes long when the 50-period SMA crosses above the 200-period SMA and goes short when the 50 crosses back below the 200, with an ATR stop loss and a risk-to-reward take profit. A variation swaps the slow 200-period SMA for a faster 100-period one so you can compare the classic long-term cross against a more responsive version.

Foundation

MA Crossover

A moving-average (MA) crossover trend strategy. It enters long when the fast SMA crosses above the slow SMA while price holds above a long-term SMA trend filter, and takes the mirrored setup to go short; every trade is protected by an ATR-based stop loss and closed at a risk-to-reward take profit. The template includes variations across the crossover moving-average lengths, the stop-loss ATR multiple, and the take-profit reward ratio, so you can compare several configurations and tune it to your own style.

Foundation

MA Crossover — Custom ATR(20) SL/TP

Shows custom indicator-driven risk control: a 20/50 EMA crossover whose stop loss and take profit are both custom values built from a 20-period ATR (the built-in ATR rule is fixed to length 14). The custom value is read in pips and ATR is already in pips, so the stop is 1.5x ATR(20) and the target 3x ATR(20) (2:1). It goes long when the 20-EMA crosses above the 50-EMA and short on the opposite cross.

Foundation

MA Crossover — Fixed-Pips SL/TP

A demonstration of fixed-pips risk control on EUR/USD: a 20/50 EMA crossover with the stop loss and take profit set as flat pip distances instead of from ATR. It goes long when the 20-EMA crosses above the 50-EMA and short on the opposite cross, with a 50-pip stop and a 75-pip target (1.5:1). On H4, ~1x ATR ≈ 30 pips on EUR/USD, so 50 pips ≈ a 1.5x ATR stop. Pinned to EUR/USD, since a fixed pip distance only suits one instrument's volatility.

Foundation

MACD Crossover — Custom ATR(20) Target

Shows a custom indicator-driven take profit on its own, behind a standard ATR stop. The entry is a MACD signal-line crossover — long when the MACD line crosses above its signal, short on the opposite cross. The stop loss is the built-in 1.5x ATR rule (ATR length 14); the take profit is a custom 3x ATR(20) value, read directly in pips, using a longer 20-period ATR for the target than the stop.

Foundation

MACD Crossover — Fixed-Pips SL/TP

A MACD signal-line crossover on EUR/USD demonstrating fixed-pips risk control with a tunable stop. It goes long when the MACD line crosses above its signal and short on the opposite cross, with a flat 75-pip take profit and a flat 50-pip stop loss that a variation tightens to 30 pips. On H4, ~1x ATR ≈ 30 pips on EUR/USD, so the two stops are about 1.5x ATR (50 pips) and 1x ATR (30 pips). Pinned to EUR/USD, since a fixed pip distance only suits one instrument's volatility.

Foundation

MACD Signal-Line Crossover

The MACD signal-line crossover, a widely used momentum signal. It goes long when the MACD line crosses above its signal line and short when it crosses back below, with an ATR stop loss and a risk-to-reward take profit. It uses the standard 12/26/9 MACD settings, and a variation uses a faster 8/21/5 configuration for quicker signals.

Foundation

MACD Zero-Line Cross

The MACD zero-line cross, which signals momentum turning outright bullish or bearish. It goes long when the MACD line crosses above zero and short when it crosses below zero, with an ATR stop loss and a risk-to-reward take profit. It uses the standard 12/26/9 MACD, and a variation shortens the slow length to 17 for an earlier zero cross.

Foundation

Parabolic SAR Flip

The Parabolic SAR flip, a trend-following setup. It goes long when price closes above the SAR (the dots flip below price into an uptrend) and short when price closes below the SAR, with an ATR stop loss and a risk-to-reward take profit. The SAR uses the standard 0.02 step and 0.2 maximum, and a variation accelerates the step to 0.04 so it tracks price more tightly.

Foundation

Price vs 200 MA Trend

Uses a single long-term moving average as the line between an uptrend and a downtrend. It goes long when the closing price crosses above the 200-period SMA and short when it crosses below, with an ATR stop loss and a risk-to-reward take profit. A variation uses a faster 100-period SMA so you can compare a slower and a quicker trend filter.

Foundation

RSI Overbought/Oversold Reversal

The classic RSI mean-reversion setup. It goes long when the 14-period RSI crosses back above 30 (leaving oversold) and short when it crosses back below 70 (leaving overbought), with an ATR stop loss and a risk-to-reward take profit. A variation uses a faster 7-period RSI for earlier, more frequent reversal signals.

Foundation

RSI Reversal — Custom ATR(20) Stop

Shows a custom indicator-driven stop loss on its own. The entry is the classic RSI mean-reversion — long when the 14-period RSI crosses back above 30, short when it crosses back below 70. The stop loss is a custom 1.5x ATR(20) value (the built-in ATR stop is fixed to length 14), read directly in pips, and the take profit is a standard 1.5:1 risk-to-reward off that stop.

Foundation

RSI Reversal — Fixed-Pips SL/TP

The classic RSI mean-reversion entry on EUR/USD, shown with fixed-pips risk control. It goes long when the 14-period RSI crosses back above 30 (leaving oversold) and short when it crosses back below 70, with a flat 50-pip stop loss and a flat 75-pip take profit (1.5:1). On H4, ~1x ATR ≈ 30 pips on EUR/USD, so 50 pips ≈ a 1.5x ATR stop. Pinned to EUR/USD, since a fixed pip distance only suits one instrument's volatility.

Foundation

Stochastic Overbought/Oversold

The Stochastic Oscillator overbought/oversold setup. It goes long when the %K line crosses above the %D line while still oversold (below 20) and short when %K crosses below %D while overbought (above 80); requiring the cross in the extreme zone filters out mid-range noise. Trades use an ATR stop loss and a risk-to-reward take profit, and a variation uses a slower 21-period %K.

Foundation

Trade by Day of Week

Demonstrates the Day of Week indicator, which limits a strategy to chosen days of the week. A Day of Week rule decides which weekdays a trade is allowed on, while a simple EMA(9)/EMA(21) crossover acts as the entry trigger (long on the up-cross, short on the down-cross). The base strategy permits every day; a variation restricts it to Monday and Thursday only, so you can see how trading on fewer days affects the results. An ATR stop loss and a risk-to-reward take profit manage each trade.

Foundation

Trade by Hour of Day

Demonstrates the Hour of Day indicator, which limits a strategy to chosen hours of the day in UTC (the backtesting server time zone, not your local time). An Hour of Day rule decides which hours a trade is allowed on, while a simple EMA(9)/EMA(21) crossover acts as the entry trigger (long on the up-cross, short on the down-cross). The base strategy permits every hour; a variation restricts it to the 09:00 and 13:00 UTC candles (around the London and New York sessions), so you can see how trading at fewer hours affects the results. An ATR stop loss and a risk-to-reward take profit manage each trade.

Foundation

Williams %R Reversal

The Williams %R reversal setup. Williams %R runs from 0 to -100, with below -80 oversold and above -20 overbought. It goes long when %R crosses back above -80 (leaving oversold) and short when %R crosses back below -20 (leaving overbought), with an ATR stop loss and a risk-to-reward take profit. A variation uses a faster 9-period lookback.

Intermediate

Intermediate

Aroon Up/Down Crossover

The Aroon Up/Down crossover, which flags when a fresh trend takes over. It goes long when Aroon-Up crosses above Aroon-Down (recent highs dominating) and short when Aroon-Up crosses below Aroon-Down. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a longer 25-period Aroon.

Intermediate

Bollinger Band + RSI Reversion

A higher-conviction mean reversion that fades a stretched move only when the band and the oscillator agree. It goes long when price closes below the lower Bollinger Band and RSI is below 30, and short when price closes above the upper band and RSI is above 70. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a faster 7-period RSI.

Intermediate

Buy the London Open

Buys EUR/USD at the London open with no directional view, using only two time filters and no entry indicator. A Day of Week rule limits it to Tuesday, Wednesday and Thursday (the calmer midweek days, away from the Monday open gap and the Friday weekend close) and an Hour of Day rule pins entries to the 08:00 UTC candle, just after the London open. When both line up it opens a long - it is buy-only, with no sell side - betting on the upward drift that often follows the open rather than on any indicator. The stop loss is 1.5x ATR and the take profit is 2x that risk. Trades are closed before the weekend, and skip-entry-while-in-a-trade keeps to one open trade at a time. Three martingale variations run side by side - none (the baseline), a 3-step x2 and a 4-step x2 - so you can compare how chasing losses changes the outcome.

Intermediate

DMI / ADX Directional System

Wilder's Directional Movement system. It goes long when +DI crosses above -DI with ADX > 20 (a strong-enough trend), and short when +DI crosses below -DI with the same ADX confirmation. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the reward ratio.

Intermediate

EMA Crossover + ADX Filter

An EMA crossover gated by an ADX trend-strength filter, which cuts the whipsaws a plain cross suffers in choppy markets. It goes long when the 9-period EMA crosses above the 21-period EMA while ADX > 25 (a real trend), and short on the mirrored cross with the same filter. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the EMA pair (12/26) and a variation on the reward ratio.

Intermediate

Ichimoku TK Cross

The Ichimoku Tenkan/Kijun cross. It goes long when the fast Tenkan line (9) crosses above the Kijun line (26) while price holds above the Kijun, and short when the Tenkan crosses below the Kijun with price below it. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a longer 52-period Kijun.

Intermediate

MA Envelope Reversion

A moving-average envelope reversion confirmed by RSI. It goes long when price closes below the lower envelope and RSI is below 30, and short when price closes above the upper envelope and RSI is above 70. Envelopes are set 1% from a 20-period average. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a faster 7-period RSI.

Intermediate

MACD + RSI Confirmation

Requires a MACD signal and RSI to agree before entering. It goes long when the MACD line crosses above its signal line while RSI is above 50, and short when MACD crosses below signal while RSI is below 50. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a faster 8/21/5 MACD configuration.

Intermediate

Martingale with Variations

Demonstrates martingale and its variations. With martingale, after a losing trade the next trade's size is multiplied by the multiplier factor, for up to the configured number of steps before resetting to the base size. A plain EMA(9)/EMA(21) crossover is the entry trigger (long on the up-cross, short on the down-cross) and never changes, so every variation is identical apart from its martingale. Three variations run side by side so you can compare them directly: one WITHOUT martingale as the baseline, one with a 3-step ×2 martingale, and one with a 4-step ×2 martingale. Martingale is applied to each instrument independently - a loss only grows the next trade on the same instrument. An ATR stop loss and a risk-to-reward take profit manage each trade.

Intermediate

RSI-2 Pullback in Trend

A Connors-style RSI-2 pullback that buys shallow dips inside an established trend. It goes long when price is above its 200-period SMA and a fast 2-period RSI drops below 10, and short when price is below the 200-SMA and RSI(2) pushes above 90. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a 100-period trend SMA.

Intermediate

Stochastic + MA Trend Filter

Takes Stochastic crossovers only in the direction of the 200-period EMA, using the oscillator for timing and the moving average to pick the side. It goes long when price is above the 200-EMA and %K crosses above %D, and short when price is below the 200-EMA and %K crosses below %D. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a slower 21-period %K.

Intermediate

Supertrend + EMA Filter

Follows the Supertrend flip, but only in the direction of the 200-period EMA, which avoids counter-trend flips during pullbacks. It goes long when price crosses above the Supertrend while above the 200-EMA, and short when price crosses below the Supertrend while below it. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a tighter Supertrend factor of 2.0.

Intermediate

Triple MA Alignment

Trades only when three EMAs are fully stacked, demanding an unambiguous trend. It goes long when price > 10-EMA > 50-EMA > 100-EMA (all pointing up in order) and short when the stack is fully inverted. Uses an ATR stop loss and a risk-to-reward take profit; a variation extends the slowest leg to a 200-EMA for a stricter filter.

Advanced

Advanced

Aroon DMI Trend Onset

Catches a trend at its onset by requiring two directional indicators to turn together. It goes long when Aroon Up crosses above Aroon Down (a fresh uptrend) and +DI is above -DI (directional movement agrees); the short side mirrors that, with Aroon Up crossing below Aroon Down and -DI dominant. Uses an ATR stop loss and a risk-to-reward take profit; a variation widens the Aroon lookback to 25.

Advanced

Bollinger Squeeze Breakout

A squeeze-release breakout. While ADX is below 25 (a quiet, low-trend regime — the practical signature of a coiled market), it goes long when price closes above the upper Bollinger Band and short when it closes below the lower band, catching the expansion as it starts. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the reward ratio.

Advanced

EMA Trend Ride — EMA-Cross Exit

A trend ride closed by an exit rule rather than a fixed target. It enters long on a 20/50 EMA bullish cross and rides the move until the faster 10/20 EMA crosses down (the active exit), and mirrors that on the short side. The 3x ATR stop loss is a wide safety net — the EMA-cross exit normally closes the trade first. A variation tightens the safety-net stop to 2x ATR.

Advanced

Elder Triple-Screen (approx.)

A single-timeframe approximation of Elder's Triple Screen: trade with the trend but enter on a pullback. It goes long when price is above the 200-EMA, the MACD line is above zero, and Stochastic %K is oversold (< 20); the short side mirrors all three. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a slower 21-period %K.

Advanced

Ichimoku Trend Ride — Kijun-Break Exit

An Ichimoku trend ride exited on a price event rather than a fixed target. It enters long when the Tenkan (9) crosses above the Kijun (26) and holds until price closes back below the Kijun (the active exit), mirroring that on the short side. The 2.5x ATR stop loss is a wide safety net behind the Kijun-break exit. A variation tightens the safety-net stop to 2x ATR.

Advanced

MACD Momentum Ride — Signal-Cross Exit

Rides a MACD momentum impulse and exits on the same oscillator. It enters long when the MACD line crosses above its signal while price is above the 200-EMA, and holds until the MACD line crosses back below its signal (the active exit); the short side mirrors that. The 2.5x ATR stop loss is a wide safety net behind the signal-cross exit. A variation tightens the safety-net stop to 2x ATR.

Advanced

Multi-Indicator Confluence

A four-filter confluence stack that enters only when trend, strength, momentum and timing agree. It goes long when price is above the 200-EMA, ADX > 25, the MACD line is above zero, and Stochastic %K crosses above %D; the short side mirrors all four. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the reward ratio.

Advanced

Range Trading

Range trading that fades the edges of a sideways market. While ADX is below 20 (a flat, directionless regime), it buys when Stochastic %K crosses back above 20 (turning up off the range floor) and sells when %K crosses back below 80 (turning down off the range ceiling). Uses an ATR stop loss with a variation on the stop multiple, and a risk-to-reward take profit with a variation on the reward ratio.

Advanced

Range-Filtered Mean Reversion

A mean-reversion setup that fires only when the market is not trending, using ADX as a regime filter to avoid fading a strong trend. It goes long when ADX < 20 (range-like) and RSI is below 30, and short when ADX < 20 and RSI is above 70. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the reward ratio.

Advanced

Supertrend DMI Power Trend

A trend-following entry that needs two confirmations before riding a Supertrend flip. It goes long when price crosses above the Supertrend line while +DI is above -DI (buyers dominate) and ADX is above 25 (the trend is strong); the short side requires a downward flip with -DI dominant and the same ADX gate. Uses an ATR stop loss and a risk-to-reward take profit, with a variation on the reward ratio.

Advanced

Williams %R Trend Pullback

A buy-the-dip-in-an-uptrend setup that times the pullback with Williams %R. It goes long when price is above the 50-EMA and the 50-EMA is above the 200-EMA (an intact uptrend) and Williams %R crosses back above -80 (momentum turning up out of oversold); the short side mirrors that against a falling EMA stack, selling a rally back below -20. Uses an ATR stop loss and a risk-to-reward take profit; a variation uses a faster 9-period %R.

See the full strategy rules

Register free to unlock every template’s complete rules and backtest them on real historical data.

Register free