Discussing the article: "Larry Williams Market Secrets (Part 4): Automating Short-Term Swing Highs and Lows in MQL5"

 

Check out the new article: Larry Williams Market Secrets (Part 4): Automating Short-Term Swing Highs and Lows in MQL5.

Master the automation of Larry Williams’ short-term swing patterns using MQL5. In this guide, we develop a fully configurable Expert Advisor (EA) that leverages non-random market structures. We’ll cover how to integrate robust risk management and flexible exit logic, providing a solid foundation for systematic strategy development and backtesting.

At the heart of Larry Williams' work lies a simple but powerful observation: price does not move randomly—it oscillates rhythmically between short-term extremes. These short-term highs and lows form the smallest, most reactive layer of market structure, acting as the building blocks from which intermediate and long-term trends emerge.

In Long-Term Secrets to Short-Term Trading, Larry Williams emphasizes that understanding this micro-structure allows traders to align themselves with the market's natural ebb and flow rather than reacting emotionally to isolated candles. In this section, we distill that philosophy down to its operational core and translate it into precise, rule-based logic suitable for automation.

As illustrated in Figure 1, a valid short-term swing low occurs when price forms a clear pivot: a bar whose low is flanked by higher lows on both sides.

Short-term low

This central bar marks a temporary exhaustion of selling pressure, with the market briefly pausing before resuming its broader rhythm. Conversely, Figure 2 shows a short-term swing high, with lower highs surrounding the central bar's high, signaling short-term buyer exhaustion.

Short-term high

However, not every apparent pivot qualifies as a tradable swing point. One of the most critical aspects of Williams' methodology—and one that is often overlooked—is filtering. The quality of a swing point matters far more than its frequency.

You can direct your attention to Figure 3, where a potential swing low is invalidated because of an outside bar.

Outside bar

Outside bars, by definition, encompass the surrounding bars and introduce excessive volatility. Rather than signaling controlled exhaustion, they reflect instability and imbalance—conditions that distort the natural market rhythm Williams sought to exploit. For this reason, any swing candidate formed by an outside bar is immediately disqualified.

Similarly, Figure 4highlights the impact of inside bars.

Inside bar

Author: Chacha Ian Maroa