Skip to content
All library documents

Automating Larry Williams Short-Term Swing Highs and Lows

Article MQL5 articles

Summary

This article turns Larry Williams’ short-term swing concept into a configurable MQL5 Expert Advisor. A swing low is defined by a bar whose low is flanked by higher lows, while a swing high has lower highs on either side. Candidates involving outside bars are rejected, and inside-bar formations are filtered to avoid ambiguous or unstable pivots.

The EA supports long, short, or two-way trading, fixed or balance-based position sizing, and a stop at the swing bar’s extreme. Exits can occur after one bar or at a take-profit level based on a chosen risk-reward ratio. The article describes the implementation as modular and limits decisions to one per completed bar. It refers to prior analysis that found bullish behavior after swing lows and says results vary by instrument, but the supplied excerpt gives no detailed performance figures or full testing evidence. The method therefore needs independent validation across markets and conditions.

Key ideas

  • A swing low has higher lows on both sides of its central bar, while a swing high has lower highs on both sides.
  • The detection rules exclude candidates involving outside bars and filter formations involving inside bars.
  • The EA offers configurable trade direction, position sizing, stops, and exit methods.
  • A stop is placed at the extreme of the bar that defines the swing point.
  • Performance may differ across instruments, so the strategy requires testing under varied conditions.

Tags

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