Join today
Strategies / Pattern / Six Candle Run

Six Candle Run: Trading Long Streaks of Same-Colour Candles

After six candles in a row close in the same direction, the system trades with that run, long after six up candles and short after six down candles. It has not been backtested yet, so no performance numbers exist.

PatternLong & 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. Entered when flat, or while in a trade if at least 6 bars have passed since the last order

Entry rules, short

  1. Members only
  2. Entered when flat, or while in a trade if at least 6 bars have passed since the last order

Exit rules

  1. Stop loss of 20 points
  2. Members only
  3. An opposite run can reverse the position

Parameters

positionSize
Contracts per trade
1
patternLength
Consecutive same-colour candles needed
6
minBarsBetween
Bars since the last order before a new one while in a trade
6
stopLossPoints
Protective stop in points
20
takeProfitPoints
Target in points
10

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.

// ============================================================
// Six Candle Run
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: Not yet tested
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
patternLength = 6         // consecutive same-colour candles needed
minBarsBetween = 6        // bars since the last order before a new one while in a trade
stopLossPoints = 20       // protective stop in points
takeProfitPoints = 10     // target in points

// --- Indicators ---
bearRun = (Summation[patternLength](close < open) = patternLength)
bullRun = (Summation[patternLength](close > open) = patternLength)

30 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no backtest, so it is unknown whether six candle runs carry any edge on any market.
  • The 20 point stop is twice the 10 point target, so it would need a high win rate just to break even.
  • It can add a trade while already in a position once 6 bars have passed, which raises exposure during long runs.

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

Is the code ready for ProOrder?

The system is written for automated trading with 1 contract, a 20 point stop and a 10 point target. It has not been compile checked or tested.

What markets was it tested on?

None yet. The page will show results once a backtest has been run.

How much risk does each trade carry?

At 1 contract the fixed stop is 20 points per trade. There is no drawdown figure yet because it has not been backtested.

Which timeframe fits a six candle pattern?

That is still open. The fixed point stop and target mean the right chart depends on how far the instrument usually moves in a few bars.

Related

Strategies like this one

Winter Only

Also a pattern strategy.

14.53 PF · 49 trades

Turn Of The Month

Also a pattern strategy.

4.86 PF · 47 trades

Negated Hammer

Also a pattern strategy.

3.20 PF · 372 trades

Get notified when new pattern tests land. Join 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