Trend & Structure Analyzer

Category: Indicators By: Ugo Blanco Created: May 13, 2026, 6:01 PM
May 13, 2026, 6:01 PM
Indicators
0 Comments

This comprehensive indicator combines trend tracking using moving averages with market structure analysis. It is designed to provide a clear view of price dynamics whilst automatically identifying key pivot points (peaks and troughs).

Key features:

  • The Price Action Channel (PAC): A channel based on exponential moving averages of the high, low and close. It serves as an immediate dynamic support/resistance zone.
  • Structure Analysis (Fractals):
  • The indicator automatically detects highs and lows.
  • It displays smart labels to identify the structure: HH (Higher High), LH (Lower High), HL (Higher Low) and LL (Lower Low).
  • Ideal for spotting trend reversals or pattern continuations.
  • Ribbon System and Long-Term EMAs:
  • Includes a fast ribbon (EMA 12/36) for momentum.
  • Includes three long-term EMAs (75, 180, 540) to place the price in its overall context, particularly effective on the 1-minute timeframe.
  • Candle Colours:
    • Blue: Uptrend confirmed above the PAC.
    • Red: Downtrend confirmed below the PAC.
    • Grey: Zone of indecision or neutrality within the channel.

Tips for use

This tool is particularly effective for scalping and day trading. It allows you to trade only in the direction of the trend (candle colour) whilst waiting for structural breaks (HH/LL) to validate entries.

Technical note: The spacing of the labels (offset) is calculated automatically via the ATR to ensure a clean, non-overlapping display across all assets.

// --- PARAMÈTRES ---
HiLoLen = 10

// --- 1. PAC ---
pacU = ExponentialAverage[HiLoLen](high)
pacL = ExponentialAverage[HiLoLen](low)
pacC = ExponentialAverage[HiLoLen](close)

// --- 2. Ruban ---
e12 = ExponentialAverage[12](close)
e36 = ExponentialAverage[36](close)

// --- 3. EMAs Long Terme (Configuration 1min par défaut) ---
emaF = ExponentialAverage[75](close)
emaM = ExponentialAverage[180](close)
emaS = ExponentialAverage[540](close)

// --- 4. Logique des Fractales et Pivots ---
// On utilise l'ATR pour un espacement automatique propre
offset = AverageTrueRange[14]

// --- FRACTALE HAUTE (Sommets) ---
IF high[2] > high[1] AND high[2] > high[0] AND high[2] > high[3] AND high[2] > high[4] THEN
   vTopPrev = vTopCurr
   vTopCurr = high[2]
   
   // Affichage du Triangle Rouge
   drawtext("▼", barindex[2], high[2] + offset * 0.5) coloured(255,0,0)
   
   // Affichage du texte HH ou LH au-dessus du triangle
   IF vTopCurr > vTopPrev THEN
      drawtext("HH", barindex[2], high[2] + offset * 1.2) coloured(128,0,0)
   ELSE
      drawtext("LH", barindex[2], high[2] + offset * 1.2) coloured(128,0,0)
   ENDIF
ENDIF

// --- FRACTALE BASSE (Creux) ---
IF low[2] < low[1] AND low[2] < low[0] AND low[2] < low[3] AND low[2] < low[4] THEN
   vBotPrev = vBotCurr
   vBotCurr = low[2]
   
   // Affichage du Triangle Vert
   drawtext("▲", barindex[2], low[2] - offset * 0.5) coloured(0,255,0)
   
   // Affichage du texte HL ou LL au-dessous du triangle
   IF vBotCurr > vBotPrev THEN
      drawtext("HL", barindex[2], low[2] - offset * 1.2) coloured(0,128,0)
   ELSE
      drawtext("LL", barindex[2], low[2] - offset * 1.2) coloured(0,128,0)
   ENDIF
ENDIF

// --- 5. Coloration Bougies ---
IF close >= pacU THEN
   drawcandle(open, high, low, close) coloured(30, 144, 255) // Bleu
ELSIF close <= pacL THEN
   drawcandle(open, high, low, close) coloured(178, 34, 34) // Rouge feu
ELSE
   drawcandle(open, high, low, close) coloured(128, 128, 128) // Gris
ENDIF

// --- Ligne RETURN ---
RETURN pacU as "PAC High", pacL as "PAC Low", pacC as "PAC Close", e12 as "EMA 12", e36 as "EMA 36", emaF as "EMA Fast", emaM as "EMA Medium", emaS as "EMA Slow"

Download
Filename: scalping-V6.itf
Downloads: 34
Ugo Blanco 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

Logo Logo
Loading...