Join waitlist
Strategies / Trend / Pullback Candle MA Filter

Pullback Candle MA Filter

On a day when the close is above the 7-period SMA but the candle is red so far, it buys. When price is below the SMA and the candle is green, it sells short. It is always in the market after the first trade, with calendar filters that skip longs on Thursdays and in January and shorts on Tuesdays and in April.

TrendLong & shortSwingEUR/USDDaily
1.49Profit factor
328,432Net profit USD
41.71%Win rate
1,050Trades
-47,802Max drawdown
313Avg trade

Best run of 18. EUR/USD, Daily, spread 1, from run pf:2026-09-24-EURUSD-D.tsv:3.

Entry rules, long

  1. Close is above the 7-period SMA
  2. Not a Thursday and not in January

Entry rules, short

  1. Close is below the 7-period SMA
  2. Not a Tuesday and not in April

Exit rules

  1. No stop loss, target or other exit

Test conditions

PeriodUp to 2026-09-25
InstrumentEUR/USD, Daily
Spread1 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-25
Parameters (6)
positionSize
Size per point
1
maPeriod
Moving average the oscillator is measured against
7
noLongDay
No new longs on this day of week (4 = Thursday)
4
noLongMonth
No new longs in this month (1 = January)
1
noShortDay
No new shorts on this day of week (2 = Tuesday)
2
noShortMonth
No new shorts in this month (4 = April)
4

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest runDaily1.49 1,05041.71328,432 USD-47,802
GBP/USDDaily1.27 1,10840.1629,657 USD-5,040
USD/JPYDailyn/a 1,11338.362,080,130 JPY-628,300
USD/JPY1 minn/a 49173.93127,020 JPY-61,820
EUR/USD1 hourn/a 4,82656.2262,713 USD-62,052
EUR/USD10 minn/a 2,02066.8857,941 USD-27,877
EUR/USD5 minn/a 1,32770.4655,064 USD-50,974
EUR/USD3 minn/a 97371.6350,869 USD-27,883
DAX 40Dailyn/a 88238.2113,376 EUR-7,351
Dow JonesDailyn/a 1,24835.6611,959 EUR-9,263
US Crude OilDailyn/a 96240.0211,817 EUR-8,909
Nasdaq 1003 minn/a 1,06273.9210,572 EUR-4,506
GBP/USD4 hoursn/a 1,65846.869,457 USD-8,538
Nasdaq 1001 minn/a 57481.716,677 EUR-3,815
Nasdaq 1002 minn/a 84176.935,768 EUR-4,263
DAX 401 minn/a 66980.723,481 EUR-3,332
GoldDailyn/a 1,19438.192,397 EUR-1,621
FTSE 1001 minn/a 63574.961,251 EUR-870

Charts

Results by run

Top 10 of 18 runs. The full list is in the table above.

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder, rewritten to house standard

// ============================================================
// Pullback Candle MA Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // size per point
maPeriod = 7              // moving average the oscillator is measured against
noLongDay = 4             // no new longs on this day of week (4 = Thursday)
noLongMonth = 1           // no new longs in this month (1 = January)
noShortDay = 2            // no new shorts on this day of week (2 = Tuesday)
noShortMonth = 4          // no new shorts in this month (4 = April)

// --- Indicators ---
priceMA = Average[maPeriod](close)
maOscillator = close - priceMA
redDay = (DClose(0) - DOpen(0)) < 0
greenDay = (DClose(0) - DOpen(0)) > 0

15 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SMA
Read this firstKnown weaknesses4 points
  • There is no stop loss or target. Only the opposite signal closes a trade, so a trend against the position runs until the reversal.
  • The best run's max drawdown was USD 47,802 at 1 contract, on a strategy that is always exposed.
  • The weekday and month filters are specific choices that may be fitted to past data.
  • The calendar filters were chosen on EUR/USD. GBP/USD daily was weaker, with a profit factor of 1.27.

Questions

About this strategy

Can this run in ProOrder?

Yes, it is a simple stop-and-reverse system. The code was rewritten after testing and was not compile-checked, so backtest it first.

How did it do on other markets?

Every listed run was profitable. GBP/USD daily recorded a profit factor of 1.27 over 1,108 trades, and USD/JPY daily made JPY 2,080,130 in a sweep with a JPY 628,300 drawdown.

What capital does 1 contract need?

The EUR/USD daily best run had a max drawdown of USD 47,802 at position size 1. Your broker's contract value decides the actual exposure.

Why daily bars?

The rule looks at the colour of today's daily candle, so the daily chart is its natural home and gave the best recorded result.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

Trend Pullback Reversal

A similar profit factor.

1.47 PF · 849 trades

Always-in-the-market systems need company. See the ProRealAlgos portfolio approach by joining the waitlist.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs