OPEN-SOURCE SCRIPT
W & M Pattern | 3 Peaks + Liquidity Sweep | RR Tool

W & M Pattern | 3 Peaks + Liquidity Sweep | RR Tool
This indicator identifies high-probability reversal setups by combining classical market structure analysis with liquidity sweep detection — two concepts widely used in Smart Money and Price Action trading.
How It Works
The indicator continuously scans the chart for two mirror-image setups:
Bullish W Pattern (Long Setup)
In a falling market, price forms three consecutive Lower Highs (LH1 → LH2 → LH3), confirming a bearish structure. The indicator then watches for a W formation — where price first drops to a swing low, sweeps below it to grab liquidity (the sharp wick down), and then reverses sharply upward forming the right leg of the W. This liquidity sweep is the key trigger, as it signals that smart money has absorbed sell-side orders and a reversal is likely. A long entry is signaled as price recovers, with the stop loss placed just below the W's sweep low and the take profit targeting either the 1st or 3rd Lower High.
Bearish M Pattern (Short Setup)
In a rising market, price forms three consecutive Higher Highs (HH1 → HH2 → HH3), confirming a bullish structure. The indicator then watches for an M formation — where price pushes above the prior swing high to sweep buy-side liquidity (the sharp wick up), then fails and drops below the neckline. This sweep signals that smart money has distributed into retail buying pressure and a reversal downward is likely. A short entry is signaled as price breaks down, with the stop loss just above the M's sweep high and take profit targeting the 1st or 3rd Higher High.
This indicator identifies high-probability reversal setups by combining classical market structure analysis with liquidity sweep detection — two concepts widely used in Smart Money and Price Action trading.
How It Works
The indicator continuously scans the chart for two mirror-image setups:
Bullish W Pattern (Long Setup)
In a falling market, price forms three consecutive Lower Highs (LH1 → LH2 → LH3), confirming a bearish structure. The indicator then watches for a W formation — where price first drops to a swing low, sweeps below it to grab liquidity (the sharp wick down), and then reverses sharply upward forming the right leg of the W. This liquidity sweep is the key trigger, as it signals that smart money has absorbed sell-side orders and a reversal is likely. A long entry is signaled as price recovers, with the stop loss placed just below the W's sweep low and the take profit targeting either the 1st or 3rd Lower High.
Bearish M Pattern (Short Setup)
In a rising market, price forms three consecutive Higher Highs (HH1 → HH2 → HH3), confirming a bullish structure. The indicator then watches for an M formation — where price pushes above the prior swing high to sweep buy-side liquidity (the sharp wick up), then fails and drops below the neckline. This sweep signals that smart money has distributed into retail buying pressure and a reversal downward is likely. A short entry is signaled as price breaks down, with the stop loss just above the M's sweep high and take profit targeting the 1st or 3rd Higher High.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.