PROTECTED SOURCE SCRIPT

W/M Pattern Strategy + MACD/RSI Confirmation V3.0 by Thaungkmitl

71
W/M Pattern Strategy + MACD/RSI Confirmation V3.0

Description Text:
This script is a comprehensive Strategy (backtestable) that combines classical Chart Patterns with momentum indicators to identify high-probability reversal setups. It focuses on detecting "W" Patterns (Double Bottoms/Higher Lows) and "M" Patterns (Double Tops/Lower Highs), filtered by MACD and RSI to reduce false signals.

How It Works
The strategy relies on a "Confluence" of three factors before triggering an entry:

1. Price Action Patterns (W & M)
W Pattern (Bullish): The script detects Pivot Lows. If a new Pivot Low is higher than the previous one (forming a Higher Low structure), it marks a potential "W" pattern.

M Pattern (Bearish): The script detects Pivot Highs. If a new Pivot High is lower than the previous one (forming a Lower High structure), it marks a potential "M" pattern.

2. MACD Confirmation (Zero Line)
Price action alone is not enough. The script waits for the MACD Line to cross the Zero Line:

Buy: MACD crosses UP over 0 (indicating bullish momentum shift).

Sell: MACD crosses DOWN under 0 (indicating bearish momentum shift).

3. RSI Threshold
To ensure the trend has strength, the RSI (Relative Strength Index) acts as a final filter:

Buy Condition: RSI must be above 50.

Sell Condition: RSI must be below 50.

Visual Features
Pivot Labels: Automatically marks Pivot High (Red Triangle) and Pivot Low (Green Triangle).

Pattern Lines: Draws lines connecting the swing points when a potential W or M pattern is detected.

Signals: Displays "BUY" or "SELL" labels with text explaining the setup (e.g., "W+MACD+RSI").

Background: Highlights the chart background (Green/Red) when a valid trade signal occurs.

EMAs: Plots EMA 10 (Blue) and EMA 15 (Red) to help you visualize the immediate trend direction.

Settings
Pivot Left/Right Bars: Adjust the sensitivity of the Swing detection.

MACD Settings: Fast, Slow, and Signal lengths (Standard 12, 26, 9).

RSI Settings: Adjust Length and the Threshold level (Default is 50).

Backtesting
This is a strategy script, meaning you can use the Strategy Tester panel below the chart to see how this logic performs on historical data for your chosen timeframe and asset.

Disclaimer: This tool is for educational purposes. Past performance in backtesting does not guarantee future results.

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.