All indicators

SMA + Trend Strength + Trailing Stop Loss

Dec 9, 2020

Static chart image
SignalsDashboardMoving AveragesTrailing-Stop

The SMA + Trend Strength + Trailing Stop Loss indicator provides a comprehensive trend-following toolkit designed to identify strong market uptrends, potential divergences, and defensive exit points through a color-coded moving average and trend meter.

Usage

The Usage section describes how the script can be used to navigate different market cycles. The core of the indicator is a 13-bar Simple Moving Average (SMA) that changes color based on the number of bullish conditions met within the trend meter.

  • Green (Strong Uptrend): Occurs when at least 4 of the 5 conditions are confirming upward momentum. This is typically used to identify entry points for long positions.
  • Yellow (Divergence): Indicates that while the trend is still technically positive, some internal metrics are beginning to diverge. Traders may use this as a signal to tighten stops or look for exit opportunities.
  • Orange (Warning): Signals a potential trend shift. While the price may have already started to decline, a return to green can indicate a trend continuation.
  • Red (Downtrend/Fear): Indicates a lack of bullish momentum. A transition from red back to orange can sometimes signal a consolidation phase or a "buy the dip" opportunity at lower prices.

The Trailing Stop Loss feature provides visual levels for risk management. A gray step-line represents the activation price (trailing stop trigger), while a red step-line represents the suggested limit price. If the price breaches these levels, a red "X" appears below the bar.

Details

The indicator evaluates five specific market conditions to determine trend strength:

  1. Lower Lows (LL): Analyzes the 21-bar lowest price to see if the support floor is rising.
  2. Higher Highs (HH): Analyzes the 21-bar highest price to see if the resistance ceiling is rising.
  3. SMA Direction (MA): Determines the trajectory of the 13-period SMA.
  4. Directional Index (DI): Utilizes a hidden DMI (4, 4, 4) calculation to measure upward momentum.
  5. Relative Strength Index (RSI): Uses a 14-period RSI; values above 50 are considered bullish.

The trailing stop loss logic is calculated based on the lowest price of the previous 8 bars. The activation trigger is set at the 8-bar low, while the hard stop limit is calculated at 99.75% of that value.

Settings

  • SMA: Toggles the visibility of the color-coded 13-period Simple Moving Average.
  • Trend Meter: Enables or disables the visual arrows on the chart representing the five trend conditions.
  • Trailing Stop: Toggles the visibility of the stop loss step-lines and the "Stop Out" cross icons.
  • Grayscale: Converts the UI elements to a neutral color palette for cleaner charts.
  • Trend Meter Location: Allows users to position the trend meter arrows at either the "Top" or "Bottom" of the chart.

FAQ

How do I interpret the Trend Meter arrows? Upward arrows indicate the specific condition (LL, HH, MA, DI, or RSI) is bullish, while downward arrows indicate bearish or neutral states for that specific metric.

What does the red X signify? The red X appears when the current low price breaches the trailing stop level, signaling a potential stop-out or exit event based on the 8-bar lowest price.

How can I access the SMA + Trend Strength + Trailing Stop Loss? 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.