Larry Williams’ Trading Robots — Evolution Through Moving Average Logic
Larry Williams’ trading robots are among the most respected and studied in the world of technical analysis. His methods have inspired thousands of algorithmic traders because they combine simplicity, statistical consistency, and emotional neutrality — ideal characteristics for automation.
The key behind the Larry Williams setups lies in their foundation on moving averages, one of the oldest and most powerful tools in market analysis. Moving averages help smooth out market noise and reveal the true direction of the trend, allowing the robot to identify potential breakouts, pullbacks, and reversals.
By turning these principles into algorithms, traders can reduce losses and increase profits through strict discipline, backtesting, and adaptability to various market conditions.
Another crucial enhancement for these systems is the use of multi-timeframe analysis. By combining signals from a lower timeframe (for entries) with confirmation from a higher timeframe (for trend direction), the bot can avoid false signals and improve the accuracy of entries and exits.
Below are the four main Larry Williams setups adapted for bot automation, each one focusing on a slightly different logic for trend continuation or reversal.
Bot 1: Larry Williams Setup 9.1 — Moving Average Breakout Reversal
Core Idea: This setup focuses on trend identification through moving average breakouts. When the price crosses a moving average and closes beyond it, it signals a potential change in trend direction.
Bot Logic:
- Detect when a candle closes above the moving average → open a BUY position.
- Detect when a candle closes below the moving average → open a SELL position.
- If a new crossover occurs in the opposite direction, the bot closes the previous position and reverses immediately.
Why it works: This approach ensures that the robot is always in the direction of the prevailing trend. It performs best in strong trending markets, especially when combined with filters such as ADX > 25 or higher timeframe trend confirmation.
Enhancement Tip: Add a rule to avoid trading in consolidation zones (for example, when the moving average’s slope is nearly flat).
Bot 2: Larry Williams Setup 9.2 — Two-Candle Confirmation Strategy
Core Idea: This setup uses a double confirmation rule to filter false breakouts. Instead of reacting immediately after one breakout candle, it waits for two consecutive candles to confirm direction before entering.
Bot Logic:
- Wait for two consecutive candles that close beyond the moving average.
- If both candles close above → open a BUY position. If both candles close below → open a SELL position.
- Use the ATR-based Stop Loss (Stop ATR) to dynamically adapt protection to market volatility.
When to use: This setup works well at the beginning of market sessions, when volatility is high and breakouts have more strength.
Why it’s valuable: The second candle acts as confirmation, reducing noise and fake signals. It also adapts well to semi-trending or range-breaking environments.
Enhancement Tip: Combine it with volume filters or volatility thresholds to ensure the breakout has enough strength to continue.
Bot 3: Larry Williams Setup 9.3 — Pullback Entry After Breakout
Core Idea: Setup 9.3 adds a pullback filter to improve entry timing and reduce drawdown. Instead of entering immediately after a breakout, the bot waits for a small retracement (pullback) toward the moving average before entering in the trend’s direction.
Bot Logic:
- Detect the breakout (price closing beyond the moving average).
- Wait for the price to pull back near the moving average without crossing it again.
- Enter in the direction of the original breakout once the price resumes movement.
- Place the stop below (for buys) or above (for sells) the pullback candle.
Why it works: By waiting for a pullback, the robot avoids buying at the top or selling at the bottom, achieving better entry prices and improved risk/reward ratios.
Enhancement Tip: Add confirmation from candlestick patterns (like a hammer or engulfing bar) or momentum indicators (like RSI or MACD crossovers) for stronger confirmation of the pullback end.
Bot 4: Larry Williams Setup 9.4 — Two-Candle Trend Continuation
Core Idea: A refined version of Setup 9.3, this bot looks for a breakout and then two candles moving in the same direction before entering.
Bot Logic:
- Identify when price breaks through the moving average.
- Wait for two consecutive candles in the direction of the breakout (not just one).
- After these confirmations, enter in the same direction.
- The stop loss can be placed below the second candle’s low (for buys) or above the high (for sells).
Why it’s powerful: It adds a stronger confirmation layer, filtering choppy price action and favoring momentum continuation rather than immediate reversal.
Enhancement Tip: Combine this strategy with volume expansion confirmation (rising volume supports breakout strength) and EMA slope detection to filter sideways conditions.
General Improvements for All Larry Williams Bots
To make these setups more robust in modern markets, professional traders often add:
- Multi-timeframe confirmation: e.g., only take buys if the H1 and H4 trends are aligned.
- ATR-based dynamic stop and take profit instead of fixed points.
- Trailing stop or partial close logic to lock in profits as the trend develops.
- News filter to avoid volatile periods (important for automated trading).
Final Thoughts
Larry Williams’ setups may appear simple, but they encapsulate decades of market wisdom. When automated properly, they can provide consistent, mechanical trading behavior without emotional bias.
The secret isn’t in making them overly complex — it’s in executing them with discipline, proper money management, and context awareness. Combined with trend filters, adaptive stops, and pullback confirmation, these bots can form a powerful automated trading system adaptable to various assets and timeframes.



