How a century-old market theory becomes a fully automated trading algorithm — and why the logic behind it still holds up today.

Richard D. Wyckoff (1873–1934) was obsessed with a single question:
“Who is actually moving price?”
His insight was that large players cannot hide their footprints entirely; their accumulation and distribution leaves recognisable patterns in price and volume that the trained eye can read.
By his early twenties he had opened his own firm, and by the early 1900s he was one of the most closely watched market commentators in America, together with other legends Jesse Livermore and J.P. Morgan for instance. His course and analytical framework survived him, and has since been adopted by generations of professional traders. Today, the Wyckoff method is considered one of the foundational pillars of technical analysis — alongside Dow Theory and Elliott Wave.
Among his methodology was a way of finding false breakouts and looking for the price to return to the mean. There are two recurring structural patterns: the Spring (a false breakdown below support that is followed by a rally up) and the Upthrust (a false breakout above resistance that is followed by a move down). These are the two signals we’re using today to built this Richard Wyckoff inspired Expert Advisor.
Disclaimer: Templates are for educational purposes only!
👉 Get the Wyckoff Mean Reversion Automation Template → Wyckoff Mean Reversion Profectus Template
Wyckoff identified something that has not changed in over a century: large market participants — whether 1920s railroad barons or today's algorithmic funds — must accumulate and distribute positions over time. That process creates ranges. The false breakout at the extremes of those ranges (the Spring and Upthrust) exists because large operators benefit from sweeping the liquidity that accumulates just beyond obvious support and resistance levels.
Let’s write down the rules of this trading system step-by-step:
1. Find the consolidation range. Looking back across the last 15 candles, the algorithm records four values: the highest price, the lowest price, the close of the most recent candle, and the open of the oldest candle (candle 15). This defines the boundaries of the trading range.
2. Calculate the range thresholds. We’re now calculating the invalidation areas where we decide that the breakout is no longer false, but rather a continuation. We take highest and lowest prices of the range (the range boundaries) and add 50% of the total range size to them to create the invalidation levels. When price crosses one of these levels, the setup is no longer valid and the orders are being deleted.
3. Apply the Wyckoff absorption filter. The Wyckoff absorption filter is a rule to see if price is really consolidating within the range. The simple rule is that the body of the most recent candle close must not be larger then 40% of the entire range size. Small bodied candles indicate absorption and consolidation of price.
4. False breakout detection. Now we look if price makes a false breakout to the upside (Upthrust) or to the downside (Spring). A false breakout is as simple as price crossing the upper or lower range level, as long as it stays within the invalidation thresholds.
5. Place the order. After the false breakout we place the pending order on the opposite side by taking the highest/lowest price of the last 10 candles. A false breakout of the range high (an upthrust), means a pending sell stop order is being placed at the lowest price of the last 10 candles before the breakout candle. Price is expected to revert back to the mean and come back for a move to the downside once all orders have been filled above the range high.

Let’s build the Wyckoff system together in Profectus AI, it will only take a few minutes. We can divide the creation of this no-code EA for the Wyckoff Strategy into 6 steps.
1. Calculate the range. Using the Once per candle block we calculate the range values using 6 variables and 2 inputs. We use a formula block to calculate these values. Let’s have a look at those first:
highestprice = highest price of the last 15 candles
lowestprice = lowest price of the last 15 candles
closeprice = close of the most recent completed candle (candle 1)
openprice = open of the oldest candle in the range (candle 15)
differentspoints = the width of the range
difference 2 = used to calculate the invalidation threshold (50% of the range)
highcancel = short invalidation threshold (50% above the range high)
lowcancel = long invalidation threshold (50% below the range low)
totalsize = range size in normalized points
Using these variables we’re creating a second formula block to get the actual outcomes we need to continue the strategy. The formulas for the second formula block are:
highcancel = highestprice + difference2
lowcancel = lowestprice − difference2
totalsize = differencepoints × multiplier (1000)
2. Build the absorption filter. This is a simple element of the strategy where we simply check, once every candle, if the body size of the last closed candle is smaller than 40% of the total range size. This then changes the variable greenlights to 1 to signal the EA is ready to continue.
3. Check for false breakouts. If the greenlight is OK at 1, we check if price crosses the range high or range low for an Upthrust or Spring. For this example, let’s say that price is crossing the range high, creating an Upthrust. If no sell orders or trades are open yet, we than place a sell pending order on the lowest price of the last 10 candles (using the lookback input). The stoploss is set at 0.3% of the price and the Take Profit at 400% of the stoploss for a 1:4 risk-to-reward ratio.
4. Monitor for range invalidation. Running continuously on every price tick:
If price crosses above highcancel (range top + 50% buffer), the sell setup is invalidated and all pending sell orders are cancelled. The process can start again from step 1 to find a new range.
In Profectus, it looks like this when you’ve completed this algorithm.

Once automated, the Wyckoff strategy can be deployed as:
Why MT5?
This allows you to move from manual chart analysis to mechanical automated trading.
Yes. In our blog library, this is the first of the Trading Legends series, but more will follow. We can automate any legendary strategy if it’s mechanical.
If a strategy has:
It can be automated.
Want to see how this Wyckoff concept works when fully automated?
Access an enhanced automation template used to turn this trading concept into a deployable MQ5 trading bot inside Profectus. This template has a trade execution module included, so you can start testing it right away!
Disclaimer: Templates are for educational purposes only!
👉 Get the Wyckoff Mean Reversion Automation Template → Wyckoff Mean Reversion Profectus Template
Dive into a world of knowledge, trends, and industry updates on the Variable blog. Our curated content covers a spectrum of topics.