Trend identifier with signals - Swing Trading
Jul 23, 2024

The Trend identifier with signals - Swing Trading indicator provides a comprehensive framework for identifying market trends and specific entry points based on the interaction between price and a 20-period moving average.
Usage
The tool is primarily used for swing trading to align entries with the prevailing market trend. The 20-period Simple Moving Average (SMA) acts as a dynamic baseline; its color shifts to green during uptrends, red during downtrends, and gray during neutral periods.
Traders can look for the following visual cues:
- Trend Flags: A green flag appears below a candle when price crosses the moving average during an established uptrend, suggesting a potential buy point. Conversely, a red flag appears above a candle during a downtrend, suggesting a potential sell point.
- Bar Coloring: When price interacts with or crosses the moving average, candles are highlighted in a distinct color to signal a test of the trend line.
- Consolidation Detection: The indicator identifies "Lateral Zones" where price remains entangled with the moving average for multiple consecutive bars. A label will appear on the chart to warn users of potential sideways price action.
Details
The script determines the broader trend by comparing two shorter-term moving averages (defined by the Trend Verification Period). An uptrend is confirmed when the shorter SMA (e.g., 5-period) is above the longer SMA (e.g., 10-period).
The consolidation logic monitors price interaction over a rolling window. If price crosses or touches the 20 SMA for 5 consecutive bars, it triggers a "Possible Lateral Zone" label. This implementation helps traders filter out choppy market conditions where trend-following signals often fail.
Settings
- Comprimento da Média Móvel: Sets the period for the main Simple Moving Average (default is 20).
- Período de Verificação de Tendência: Adjusts the sensitivity of the underlying trend filter by changing the periods used for the short/long SMA comparison.
FAQ
How do I use the Trend identifier with signals - Swing Trading?
You can use it to find trend-aligned entries by watching for the colored flags that appear when price tests the moving average during a confirmed trend.
What does the "Possível Zona Lateral" label mean?
This label indicates that the market is currently in a consolidation or sideways phase, suggesting it may be prudent to wait for a clearer trend to emerge before entering a trade.
How can I access this tool?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.