PROTECTED SOURCE SCRIPT

Sunil WMA 5

107
Sunil WMA 5 – Precision Trend Following Strategy
Overview
The Sunil WMA 5 is a trend-following trading strategy designed to identify optimal entry and exit points based on price action and momentum confirmation. The strategy is fully non-repainting and works effectively across various markets, including stocks, forex, commodities, indices, and cryptocurrencies.

This strategy employs a Weighted Moving Average (WMA) filter to enhance trend identification. It is particularly useful for scalping, day trading, and swing trading in volatile markets.

Key Features
🔹 Adaptive Trading Window – Allows users to define a specific time range for trade execution, preventing unnecessary entries outside active hours.
🔹 Flexible Trade Direction – Users can configure the strategy to trade Long Only, Short Only, or Long/Short mode.
🔹 Automated Alerts for Trade Execution – Webhook-compatible alerts allow seamless integration with brokers and automated trading platforms.
🔹 Strict Entry & Exit Rules – Ensures a disciplined approach to trading with clear logic for opening and closing positions.
🔹 Optimized for Various Timeframes – Can be used on lower timeframes (e.g., 1s, 5s, 15s) for high-frequency trading or on higher timeframes for swing trading.

Default Input Parameters & Settings
1. Trading Session (Time Window)
📌 Parameter: Trading Window

Default Value: "0000-0000" (Trades 24/7 unless a specific window is set)
Description: Allows traders to define a specific time range for trade execution. If a trade is open when the window closes, the position is automatically exited.
2. Trade Direction
📌 Parameter: Strategy Direction

Default Value: "Long/Short"
Options: "Long Only", "Short Only", "Long/Short"
Description: Determines whether the strategy will take only long trades, only short trades, or both.
3. Automated Trading Alerts (Webhook-Compatible)
📌 Parameters:

Long_Entry_Jason – (Default: "") Webhook JSON for long entries.
Long_Exit_Jason – (Default: "") Webhook JSON for long exits.
Short_Entry_Jason – (Default: "") Webhook JSON for short entries.
Short_Exit_Jason – (Default: "") Webhook JSON for short exits.
💡 Purpose: These parameters allow the strategy to send automated alerts, which can be connected to external trading platforms for trade execution.

4. Moving Average Settings
📌 Indicator Used: Weighted Moving Average (WMA)

Period: 5 (Fixed)
Description: The strategy calculates a short-term 5-period WMA as a trend filter. Trade signals are generated based on price interaction with this WMA.
How the Strategy Works
📌 1. Trade Entry Logic

The strategy identifies potential buy or sell opportunities when price action meets certain trend-confirmation criteria.
Long trades are triggered when price crosses above the 5-period WMA.
Short trades are triggered when price crosses below the 5-period WMA.
Only one position (long or short) is held at a time, ensuring clear and structured trade management.
📌 2. Trade Exit Logic

A position is closed when an opposite trade condition occurs.
If a long position is open and a short signal is triggered, the long trade is closed.
If a short position is open and a long signal is triggered, the short trade is closed.
If the trading session ends while a trade is open, the position is closed automatically.
📌 3. Automated Trading & Alerts

Users can integrate this strategy with TradingView Alerts to receive notifications or execute trades automatically.
The webhook-compatible alerts allow seamless execution with third-party trading platforms.
Best Use Cases
✅ Scalping & High-Frequency Trading – Works well on lower timeframes such as 1s, 5s, and 15s.
✅ Day Trading & Swing Trading – Can also be applied to longer timeframes for structured trend-following setups.
✅ Crypto, Forex, Stocks, and Indices – Best suited for assets with strong volatility and liquidity.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.