Join today
Strategies / Trend / MACD SuperTrend Scalper

MACD SuperTrend Scalper: crossover entries with a tight fixed bracket

A MACD(12, 26, 9) crossover opens the trade, but only when price is on the matching side of SuperTrend(3, 10) and RSI(14) is not stretched. Every trade uses a fixed 12 point stop and 18 point target. The strategy has not been backtested on this site yet.

TrendLong & shortSwingNot yet tested
This strategy has not been backtested yet. The rules and code are published now, and the numbers will appear here after the first runs.

Entry rules, long

  1. Members only
  2. RSI(14) below 65
  3. Close above SuperTrend(3, 10)

Entry rules, short

  1. Members only
  2. RSI(14) above 35
  3. Close below SuperTrend(3, 10)

Exit rules

  1. Members only
  2. Profit target of 18 points

Parameters

positionSize
Contracts per trade
1
macdFast
MACD fast length
12
macdSlow
MACD slow length
26
macdSignalPeriod
MACD signal length
9
rsiPeriod
RSI length
14
longRsiMax
No longs when RSI is at or above this
65
shortRsiMin
No shorts when RSI is at or below this
35
stMultiplier
SuperTrend ATR multiplier
3
stPeriod
SuperTrend ATR length
10
stopLossPoints
Protective stop (points)
12
takeProfitPoints
Profit target (points)
18

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// MACD SuperTrend Scalper
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Not yet tested
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
macdFast = 12             // MACD fast length
macdSlow = 26             // MACD slow length
macdSignalPeriod = 9      // MACD signal length
rsiPeriod = 14            // RSI length
longRsiMax = 65           // no longs when RSI is at or above this
shortRsiMin = 35          // no shorts when RSI is at or below this
stMultiplier = 3          // SuperTrend ATR multiplier
stPeriod = 10             // SuperTrend ATR length
stopLossPoints = 12       // protective stop (points)
takeProfitPoints = 18     // profit target (points)

// --- Indicators ---
macdMain = MACDline[macdFast, macdSlow, macdSignalPeriod](close)
macdTrigger = ExponentialAverage[macdSignalPeriod](MACDline[macdFast, macdSlow, macdSignalPeriod](close))
rsiValue = RSI[rsiPeriod](close)
stValue = SuperTrend[stMultiplier, stPeriod]

16 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • No backtest has been run, so there are no results to judge it by.
  • A 12 point stop and 18 point target are small, so spread takes a large share of each trade.
  • An opposite signal reverses the open position, so choppy markets can produce a string of quick flips.

Indicators used

MACDRSISuperTrend

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Does it work in ProOrder?

The code is a standard ProOrder system, but it has not been compile checked or backtested. Test it in ProBacktest first.

Which instruments has it been tested on?

None yet. Point based stop and target values mean you should check they suit the instrument you pick.

How much do I risk per trade?

At the default of 1 contract the stop is 12 points plus spread. No drawdown figure exists yet because there is no backtest.

Why the RSI filter?

RSI(14) must be below 65 for longs and above 35 for shorts, which skips crossovers that happen after price has already run far.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Long-Term Moving Average Cross

Also a trend strategy.

12.31 PF · 61 trades

Eight Bar Trend Follower

Also a trend strategy.

5.19 PF · 280 trades

Get notified when new tests land. The ProRealAlgos community waitlist is open.

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