All indicators

[Prod] SuperTrend with Stoploss+TrendZones - 1H

Feb 3, 2018

Static chart image
Support and ResistanceSignalsMoney ManagementMoving AveragesTrailing-StopVolatility

The [Prod] SuperTrend with Stoploss+TrendZones - 1H indicator is a comprehensive strategy tool designed to identify trend direction and execution points by combining SuperTrend logic with Double Exponential Moving Average (DEMA) crossovers. It aims to provide a robust framework for trend-following while incorporating active risk management through built-in stop-loss mechanisms and trend-specific zones.

Usage

The script is primarily used to identify long entry and exit points based on the confluence of two main components: the Trend Trader (SuperTrend-style) logic and a DEMA crossover system.

When the DEMA Slow crosses over the DEMA Fast, a "Buy" signal is generated, highlighted by a green background. The script manages exits through multiple conditions: a DEMA cross-under, a price cross-under of the trend line, or a percentage-based stop-loss. The background color shifts to reflect the current market state, with specific zones indicating whether the script perceives a bullish or bearish environment based on the DEMA relationship.

Details

The indicator utilizes a multi-step calculation process:

  • Trend Trader Strategy: Uses Weighted Moving Average (WMA) of the True Range and historical highs/lows to create a trailing support/resistance line.
  • Dynamic DEMA: The script calculates Double Exponential Moving Averages using higher-timeframe data (via request.security) to filter out noise. It dynamically switches between different DEMA periods based on whether the price is currently in an uptrend or downtrend as defined by the Trend Trader component.
  • Stop-loss Logic: Includes a dual-layered percentage-based stop-loss. It monitors open profits and can trigger an exit if a certain loss threshold is met, while also featuring a "Let It Ride" parameter to manage trade sensitivity during volatile periods.

Settings

Trend Settings

  • Trend Length: The lookback period used for the Average True Range and high/low calculations in the Trend Trader logic.
  • Trend Multiplier: The factor applied to the volatility component to determine the distance of the trend line from the price.

DEMA Settings

  • fastPeriod / slowPeriod: The default periods for the DEMA crossover logic.
  • resolution: The timeframe resolution (integer format) used for the DEMA security calls.
  • Uptrend FastPeriod / Uptrend SlowPeriod: Specific periods used for DEMA calculations when the primary trend is bullish.

Risk Management

  • stopLossPercentage: The percentage of equity loss at which a trade will be closed.
  • letItRidePercentage: A secondary threshold used to modify stop-loss behavior during specific conditions.

FAQ

How do I use this script for different assets?

While optimized for 1H timeframes and specific crypto pairs, you can adjust the Trend Multiplier and DEMA periods in the settings to fit the volatility of other assets like stocks or forex.

What do the different background colors mean?

Green indicates a buy signal or uptrend zone, red/pink indicates a sell signal or downtrend zone, orange indicates a stop-loss trigger, and purple signifies the "Let It Ride" condition is active.

How can I access [Prod] SuperTrend with Stoploss+TrendZones - 1H?

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.