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.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

