OPEN-SOURCE SCRIPT

Trend & Trigger (Ordered Legend)

172
Description:
Overview This script implements a "Dual Timeframe" swing trading strategy designed for Daily charts. It separates the "Decision" (Trend) from the "Timing" (Momentum) by combining classic moving average logic found in the works of John J. Murphy and Dr. Alexander Elder.

The Strategy Components

1. The Landscape (Trend Filter)

200 SMA (Black Line): Defines the major market structure.

Rule: If Price > 200 SMA, the trend is Bullish (Longs Only). If Price < 200 SMA, the trend is Bearish (Shorts Only).

50 SMA (Blue Line): Represents the intermediate trend.

Usage: In a healthy uptrend, price often pulls back to bounce off the 50 SMA. It serves as a key level for placing Stop Losses.

2. The Trigger (Momentum Entry)

9 EMA (Green Line) & 20 EMA (Red Line):

These lines act as the "timing belt." We wait for a pullback in price to resolve itself before entering.

BUY Signal (Green Triangle): Appears when the 9 EMA crosses ABOVE the 20 EMA AND the Price is above the 200 SMA. This confirms momentum is returning in the direction of the major trend.

SHORT Signal (Red Triangle): Appears when the 9 EMA crosses BELOW the 20 EMA AND the Price is below the 200 SMA.

Best Practices for Use

Timeframe: Optimized for Daily (D) charts.

The "Value" Zone: The best signals occur when the price pulls back near the 50 SMA or 20 EMA and then triggers a crossover. Avoid taking signals when the price is already far extended (vertical) from the 50 SMA.

Stop Loss: A common technique is to place the initial stop loss below the 50 SMA or the most recent swing low.

Source Material

Technical Analysis of the Financial Markets (John J. Murphy) - Concepts of the "Golden Cross" and major trend filtering.

Trading for a Living (Dr. Alexander Elder) - Concepts of "Triple Screen" trading (using a slow trend filter and a fast trigger).

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.