Skip to main content

Support & Resistance - W/M Pattern

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.

Updated this week

A visual pattern that creates support & resistance

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 Profectus to create an EA. 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.

Step 0: Access the Strategy Concept Template [1 Min]

Click the button to load the trading bot directly onto your canvas:

Templates are for educational purposes only.

Your canvas should display these blocks. Check? Let's continue!

W pattern support & resistance strategy built in Profectus AI Expert Advisor

Step 1: Export the Trading Bot [1 Min]

Before diving into customization, export the bot with the upper-right export button to download the file.

Step 2: Upload to MetaTrader 5 [4 Min]

Don’t know how? Refer to our help article "Exporting Your First Strategy".

Step 3: Understand the Logic [10 Min]

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.

To automate the pattern in Profectus, the EA follows five clear steps:

  1. Find the first swing high. The system starts by identifying a fractal high using a 3-candle structure. Once found, this level is stored as SwingH1. This is the most recent swing high and serves as the first resistance reference point.

  2. Find the second swing high. Next, the EA uses a simple loop to look further back in price action for an earlier fractal high in the same direction. This second swing high is stored as SwingH2.

  3. Check the lookback threshold. Once both highs have been identified, the EA checks whether SwingH2 was formed within the allowed lookback distance from SwingH1. For example, if the lookback threshold is set to 50, then the second swing high must have occurred within the previous 50 candles. This ensures the two highs belong to the same recent market structure and are not too far apart to be relevant.

  4. Check the range between swings. The system then tests whether SwingH1 and SwingH2 are close enough in price to visually form the pattern. This is done using the rangehigh and rangelow multipliers. These thresholds define the acceptable price distance between the two highs. This step is what turns two separate fractals into a recognizable resistance pattern, because it confirms that both highs were formed in roughly the same resistance area.

  5. Execute the short setup. If all previous conditions are satisfied, the EA confirms the pattern and opens a short trade. The stop-loss is then placed at the recent swing leg, SwingH1, since that is the most recent resistance point and the level that invalidates the setup if broken.

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.

This is what the strategy looks like on a chart.

M Pattern Resistance strategy automated Expert Advisor

Step 4: Make It Your Own [10 Min]

You can adjust and experiment:

  • Add more strategy rules or include the W pattern component in your own strategies

    • EXPORT and see the differences.

  • Play around with timeframes and assets

    • EXPORT and see the differences.

  • Refine the rules to fit your own interpretation of the W pattern concept

    • EXPORT and see the differences.

This template is designed to run on all timeframes.

Conclusion

The W pattern strategy removes all the ambiguity from the support & resistance concepts: simple rules and universal application. Now it’s your turn — backtest it, tweak it, and evolve it into your own winning system.

👉 Try the PRO version today

Templates are for educational purposes only.

Now it's your turn—apply the template, tweak the logic, and make it yours. 🚀

Did this answer your question?