Swing system: 200 EMA & SuperTrend 10-5 - Simple Swing System — Strategy by pratnik92

By pratnik92

Performance Metrics

Description

Pro-Swing Guard: 200 EMA & SuperTrend 10-5This script is a trend-following swing trading system built in Pine Script v6. It uses the 200-period Exponential Moving Average (EMA) to identify the long-term trend and the SuperTrend indicator to pinpoint precise entry and exit signals.Here is a breakdown of how the strategy operates:1. Core IndicatorsThe strategy relies on two primary technical indicators to make decisions:200 EMA (Long-term Trend Filter): Determines the overall market direction. It ensures the strategy only buys in a broader uptrend and shorts in a broader downtrend.SuperTrend 10-5 (Entry/Exit Trigger): Uses a 10-period ATR with a multiplier of 5 to determine short-term momentum and trailing stop levels.2. Trade Entry LogicTo filter out false signals, the strategy demands strict alignment between price, momentum, and the long-term trend.Long Entry Conditions (All must be true):Long trades are enabled in the settings.SuperTrend flips to Bullish (Green).The current price is above the 200 EMA.The 200 EMA is actively sloping upwards.Short Entry Conditions (All must be true):Short trades are enabled in the settings.SuperTrend flips to Bearish (Red).The current price is below the 200 EMA.The 200 EMA is actively sloping downwards.3. Trade Exit System (Two-Tiered)The strategy features a robust, two-part exit plan designed to lock in profits early while letting runners ride the trend.Tier 1: Partial Take-Profit (Customizable)When a trade moves in your favor, the script will automatically sell a portion of your position (default is 30% of the active quantity) once a specific price target is hit. You can customize how this target is calculated in the settings:ATR Method (Default): Target is set 3x Average True Range (50-period) away from the entry price.Fixed Points: Target is a set number of points away (e.g., 50 points).Fixed %: Target is a set percentage move from the entry price (e.g., 5%).Tier 2: Full Exit (Trend Reversal)The remaining portion of the trade (or the entire trade if partials are disabled) is closed completely when the SuperTrend flips in the opposite direction (e.g., closing a Long position the moment the SuperTrend turns Red).4. Visuals & Chart ElementsThe script paints several visual aids directly onto your chart to make real-time analysis easy:SuperTrend Line: Plotted as Green (bullish) or Red (bearish).200 EMA Line: Plotted as Green (sloping up), Red (sloping down), or Gray (flat).Background Highlights: The chart background flashes green on the exact candle a Long condition is met, and red for a Short condition.Partial Target Line: An orange, broken line appears on the chart showing exactly where your partial take-profit target is. This line disappears once the target is hit or the trade is closed.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView