Bateson

Wu Wei Candles

Category: Indicators By: Bateson Created: September 16, 2026, 8:30 AM
September 16, 2026, 8:30 AM
Indicators
0 Comments
Wu Wei Candles

A simple tool for converting the level of a past candlestick into a dynamic, smoothed level, to better visualise the market structure.

The idea is to be able to select precisely which historical level you wish to track, then smooth it using a moving average.

Features:

  • Free choice of the reference candlestick: -1, -2, -3… up to as many candlesticks as required.
  • Selection of the candlestick level: nbCandles1 = 1

// 1 = Open

// 2 = High

// 3 = Low

// 4 = Close

  • An independent moving average for each level.
  • Selection of the type of moving average:
  • SMA
  • EMA
  • WMA… etc.
  • Option to display two levels simultaneously, with completely independent parameters.
  • Works on intraday timeframes as well as on higher timeframes.

What is it used for?

The indicator allows you, in particular, to:

→ identify significant historical levels;

→ smooth levels to reduce market noise;

→ compare two different historical levels;

→ observe the dynamics of a level rather than just its raw price;

→ build custom reference points for intraday trading.

For example:

Close of the -1 candlestick → 10-period EMA

compared to

High of the -3 candlestick → 20-period SMA

This allows you to very quickly create set-ups tailored to your own trading method.

A deliberately simple indicator: no automatic signals, no market interpretation. It provides only customisable reference levels and their smoothed versions, leaving the interpretation and decision-making to the trader

DEFPARAM DrawOnLastBarOnly = False

//==================================================
// NIVEAU 1 - PARAMETRES
//==================================================

nbBougies1 = 1

// 1 = Open
// 2 = High
// 3 = Low
// 4 = Close

typeReference1 = 4

periodeMM1 = 10

// 1 = Simple
// 2 = Exponentielle
// 3 = Weighted

typeMM1 = 1


//==================================================
// NIVEAU 1 - SELECTION
//==================================================

IF typeReference1 = 1 THEN
   referenceUn = Open[nbBougies1]
ENDIF

IF typeReference1 = 2 THEN
   referenceUn = High[nbBougies1]
ENDIF

IF typeReference1 = 3 THEN
   referenceUn = Low[nbBougies1]
ENDIF

IF typeReference1 = 4 THEN
   referenceUn = Close[nbBougies1]
ENDIF


//==================================================
// NIVEAU 1 - MM
//==================================================

IF typeMM1 = 1 THEN
   niveauUn = Average[periodeMM1](referenceUn)
ENDIF

IF typeMM1 = 2 THEN
   niveauUn = ExponentialAverage[periodeMM1](referenceUn)
ENDIF

IF typeMM1 = 3 THEN
   niveauUn = WeightedAverage[periodeMM1](referenceUn)
ENDIF


//==================================================
// NIVEAU 2 - PARAMETRES
//==================================================

nbBougiesDeux = 2

// 1 = Open
// 2 = High
// 3 = Low
// 4 = Close

typeReferenceDeux = 2

periodeMMDeux = 10

// 1 = Simple
// 2 = Exponentielle
// 3 = Weighted

typeMMDeux = 1


//==================================================
// NIVEAU 2 - SELECTION
//==================================================

IF typeReferenceDeux = 1 THEN
   referenceDeux = Open[nbBougiesDeux]
ENDIF

IF typeReferenceDeux = 2 THEN
   referenceDeux = High[nbBougiesDeux]
ENDIF

IF typeReferenceDeux = 3 THEN
   referenceDeux = Low[nbBougiesDeux]
ENDIF

IF typeReferenceDeux = 4 THEN
   referenceDeux = Close[nbBougiesDeux]
ENDIF


//==================================================
// NIVEAU 2 - MM
//==================================================

IF typeMMDeux = 1 THEN
   niveauDeux = Average[periodeMMDeux](referenceDeux)
ENDIF

IF typeMMDeux = 2 THEN
   niveauDeux = ExponentialAverage[periodeMMDeux](referenceDeux)
ENDIF

IF typeMMDeux = 3 THEN
   niveauDeux = WeightedAverage[periodeMMDeux](referenceDeux)
ENDIF


//==================================================
// AFFICHAGE
//==================================================

RETURN niveauUn AS "Ligne 1", niveauDeux AS "Ligne 2"

Download
Filename: Wu-Wei-Candles.itf
Downloads: 18
Bateson
Bateson Junior
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

ProRealCode ProRealCode
Loading...