Join today
Strategies / Breakout / Quadrant Channel

Quadrant Channel: buying the lower quarter of a wide range

When the 15 bar channel is more than 60 points wide, the strategy places a buy stop one quarter up from the channel bottom, provided the MACD histogram is rising. The target is the channel midpoint and the stop is the channel bottom. It takes at most one trade per day and has not been backtested yet.

BreakoutLong onlySwingNot 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. No position open and no trade closed yet today
  2. The 15-bar channel is more than 60 points wide
  3. Members only
  4. The MACD histogram is rising
  5. Buy stop at the entry line

Exit rules

  1. Members only
  2. Stop at the channel bottom
  3. After any closed trade no new entry until the next day

Parameters

positionSize
Base contracts per trade
3
channelPeriod
Donchian channel length
15
minChannelWidth
Channel must be at least this many points wide
60
quadrantDivisor
Entry line sits one quarter up from the channel bottom
4
targetDivisor
Target sits at 1/targetDivisor of the channel (2 = midpoint)
2
lossMultiplier
Order size multiplier after a losing trade
2.5
winDivisor
Order size divisor after a winning trade
1.5
macdFast
MACD fast length
12
macdSlow
MACD slow length
26
macdSignalPeriod
MACD signal length
9

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.

// ============================================================
// Quadrant Channel
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: Not yet tested
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false
DEFPARAM PreloadBars = 50000

// --- Parameters ---
positionSize = 3          // base contracts per trade
channelPeriod = 15        // Donchian channel length
minChannelWidth = 60      // channel must be at least this many points wide
quadrantDivisor = 4       // entry line sits one quarter up from the channel bottom
targetDivisor = 2         // target sits at 1/targetDivisor of the channel (2 = midpoint)
lossMultiplier = 2.5      // order size multiplier after a losing trade
winDivisor = 1.5          // order size divisor after a winning trade
macdFast = 12             // MACD fast length
macdSlow = 26             // MACD slow length
macdSignalPeriod = 9      // MACD signal length

// --- Indicators ---
// Size cap as in the original: two losses in a row on top of the base size.
maxOrderSize = lossMultiplier * lossMultiplier * positionSize + positionSize

ONCE orderSize = positionSize
ONCE bestProfit = 0
ONCE entryBlocked = 0

newDay = 0
IF Date <> Date[1] THEN
  newDay = 1
ENDIF

// Daily reset: back to base size only when equity is at a new high.
IF newDay THEN
  IF StrategyProfit > bestProfit THEN
    orderSize = positionSize
    bestProfit = StrategyProfit
  ENDIF
  entryBlocked = 0
ENDIF

42 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • No backtest has been run, so there is no evidence the idea works.
  • Position size grows by 2.5 times after a loss and shrinks by 1.5 after a win. That martingale sizing can turn a losing streak into a very large loss.
  • Default size starts at 3 contracts rather than 1, which raises risk from the first trade.

Indicators used

Donchian ChannelMACD

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

Can Quadrant Channel trade live in ProOrder?

The code uses ProOrder with a buy stop entry, but it is untested and not compile checked. Backtest it first and consider removing the martingale sizing.

What has it been tested on?

Nothing yet. The 60 point width filter is sized for a large index such as the DAX.

How much capital does it need?

There is no drawdown figure yet. Because size starts at 3 contracts and rises after losses, the capital needed can grow quickly.

Why only one trade a day?

After any closed trade the system waits for the next day, which limits how often the martingale steps up in a single session.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Breakout Regime Filter

Also a breakout strategy.

6.28 PF · 70 trades

Bollinger Band Walk

Also a breakout strategy.

3.10 PF · 148 trades

New systems like this get tested with the community. Get on the ProRealAlgos 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