Skip to main content

Fractals in the Trade Rule Block

Fractals mark turning points in price: the most recent confirmed swing high or swing low.

Purpose of Fractals

Fractals, developed by Bill Williams, mark turning points on the chart. An upper fractal is a high with two lower highs on each side; a lower fractal is a low with two higher lows on each side. In the Trade Rule block, Fractals return the price of the most recent confirmed fractal, which you can use as a breakout level.

How It Works

When you select Fractals in the Trade Rule block, you can configure it with the following settings:

Mode of Fractals (Which fractal to use)

  • Upper: The most recent confirmed swing high.

  • Lower: The most recent confirmed swing low.

Time Frame of Fractals

  • Sets the chart time frame for the Fractals calculation.

  • Can be replaced with a variable or input for quick testing and optimization.

Candle ID of Fractals

  • Defines which candle the calculation starts from.

  • 0: Current candle (still forming).

  • 1: Most recently closed candle.

  • Higher IDs refer to older candles.

Adjust of Fractals (Modify the Result)

  • Apply an adjustment to the calculated value by adding, subtracting, multiplying, or dividing by a number.

How the value is chosen

  • A fractal is only confirmed once the two candles after it have closed, so the value never changes afterwards.

  • The indicator looks back from the selected candle up to 500 candles and returns the most recent confirmed fractal.

  • If no fractal is found (for example with very little history), it returns 0 and writes a warning to the log.

Example

If you set:

  • Mode: Upper

  • Candle ID: 1

You get the price of the most recent confirmed swing high. A rule like "Close > Fractals (Upper)" detects a breakout above that high.

Fractals settings in the Profectus Trade Rule block

Use Cases

  • Trade breakouts above the last upper fractal or below the last lower fractal.

  • Use fractals as recent support and resistance levels.

  • Combine with the Alligator to trade breakouts only in the direction of the trend.

⚠ Tip: Use > or < with Fractals. Crosses Above and Crosses Below are not available for Fractals; the builder shows a message if you try.

⚠ Note: Fractals cannot be used as a stop-loss, take-profit, pending-order price or Modify SL/TP reference, because there is no fractal value on most candles.

Did this answer your question?