A complete guide on algorithmic trading and the no-code approach to building MQL5 EAs in Profectus AI

The W-pattern is one of the easier concepts to grasp when it comes to support & resistance trading. It’s visually easy to spot, and with the proper rules, it’s very easy to implement in an MT5 Expert Advisor. Since we are purely focused on no-code automated trading, we don’t care about the visual aspect so much, although it’s fun to see the lines work in your backtest and live trading environments.
If you are as excited as we are, you can already access the strategy here.
Disclaimer: Templates are for educational purposes only!
👉 Get the Trending W-Pattern Automation Template → W-Pattern Strategy Profectus Template
The W-pattern is a chart pattern that looks at 2 consecutive swing high points being formed within a small range to form a clear resistance level. The range refers to how far the swing points can be away from each other vertically, so that they align like a true W, or M if you will.
When the 2 swing high points form on a familiar level, it can be a clear sign of declining bullish strength. Price pushes into a high, pulls back, and then makes another move higher but fails to break convincingly above the earlier swing high. That second failed push is a sign that buying strength is weakening, while sellers are becoming more active and starting to take control.

The W-Pattern is a support & resistance technique that can be automated very easily in Profectus. The key to automating chart patterns is to think of the best way to quantify the rules. In this case, the main question is:
“How can we detect the 2 tops that represent failed bullish attempts?”
The best way to detect a price top is to use fractals. A fractal top is found by looking if the highest price of 3 candles equals the high of the middle candle (candle ID 2). This is very easy to build in Profectus using 3 trade rule blocks. We simply duplicate the rule for the second swing high. The beauty is that since we’re looking for wicks as the highest points, if the pattern is found using our way, it already directly signals exhaustion of buying power.
To automate the pattern in Profectus, the EA follows five clear steps:

And that’s it! It only takes a few minutes to drag-and-drop the blocks and build this W-Pattern Support & Resistance Strategy in Profectus. You can now add more rules to refine the entries, or add more confluences to the strategy.
Once automated, the W-pattern 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 third of the Support & Resistance strategies, but more will follow. This is the Pivot Point Support & Resistance strategy if you are looking for another great example.
We can automate any Support & Resistance strategy if it’s mechanical.
If a strategy has:
It can be automated.
Support & Resistance levels are just one example of how trading concepts translate perfectly into algorithmic systems.
Want to see how this Support & Resistance 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 Trending W-Pattern Automation Template → W-Pattern Strategy Profectus Template
Dive into a world of knowledge, trends, and industry updates on the Variable blog. Our curated content covers a spectrum of topics,