Skip to content
All library documents

Williams Fractal Strategy with Close-Based Breakout Entries

Article Strategy library · Author: WMX_Q_System_Trading

Summary

This script defines Williams-style up and down fractals using a configurable period and several patterns that allow equal neighboring highs or lows. It then tracks prior fractal-derived levels and plots them. A long signal occurs when the close crosses above the lower tracked level on an up candle; a short signal occurs when it crosses below the upper tracked level on a down candle. Entries are allowed when the current position is not already on the same side, so a signal can reverse an opposing position.

The document provides source code and strategy settings, including initial capital, commission, and a maximum pyramiding setting, but no performance report or empirical evaluation. The code assigns close prices to the series used for fractal calculations, rather than the chart’s high and low series, which affects how the levels should be interpreted. The rules are therefore best understood as a technical-indicator example whose behavior would need independent testing across markets and timeframes.

Key ideas

  • The script identifies fractal-shaped turning points with configurable periods and equality cases.
  • It derives plotted reference levels from previously detected fractal changes.
  • Long and short entries use close-price crossovers with candle-direction confirmation.
  • The document supplies code and trading assumptions but no backtest evidence.
  • Fractal calculations use close values, which may differ from conventional high-low fractals.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.