All indicators

LongSetups with Entry Signals and Trailing Stop(HA)

Sep 3, 2018

Static chart image
Price Action BasedDynamic OverlaysSignalsMoving AveragesTrailing-Stop

The LongSetups with Entry Signals and Trailing Stop(HA) indicator identifies high-probability long trading opportunities across various timeframes by utilizing a multi-stage validation process and dynamic trailing stop-loss logic.

Usage

The indicator operates through a sequence of signals to guide the user from preparation to execution and exit.

  • Preparation Phase (x): An "x" character appears on the chart when an entry signal is active. This indicates the script is waiting for price action to validate a long entry.
  • Entry Phase (B): A "B" label appears on a closed bar to signal a confirmed long entry. This occurs when the price closes above the green validation line.
  • Exit Phase (C): A "C" label on a developing or closed bar indicates an exit signal. This is triggered when price action breaches the trailing stop-loss.

Trend Filtering

Users can enable Moving Averages (MAs) in the settings to ensure trades are only taken in the direction of the primary trend. When enabled, long signals are only generated if the short-term MA is above the long-term MA and the price meets the specified MA source constraints.

Execution Guidance

  • Long Entry: It is recommended to use the "Once Per Bar Close" alert setting for confirmed entries to avoid premature signals.
  • Long Exit: It is recommended to use the "Once Per Bar" alert setting for trailing stop triggers to protect capital as soon as the price violates the exit level.

Details

The script is constructed to minimize risk by requiring two-step validation: a signal stage and an entry stage. The green line represents the long validation level; for a trade to initiate, the price must generally move above this level.

The trailing stop-loss (represented by the pink line) is dynamic and can be configured to follow different market structures. It can trail based on fractal lows, consecutive red candles, or higher lows. This flexibility allows the script to lock in profits during trending moves while providing enough room to avoid premature exits during minor retracements.

Settings

General Settings

  • Use Moving Average?: Enables trend filtering using two moving averages.
  • Buy on higher high (asap)!: Triggers an entry immediately upon reaching a higher high rather than waiting for a candle close.
  • Closing green candle is signal for next trade: Allows a green candle close to act as a catalyst for the next potential signal.
  • Closing red candle is signal for next trade: Allows a red candle close to act as a catalyst for the next potential signal.

Trailing Stop Logic

  • Trail SL to fractals' low: Sets the trailing stop based on the most recent bearish fractal.
  • Trail SL to higher lows above entry: Moves the stop-loss to new higher lows formed after the entry price is exceeded.
  • Trigger Trail SL on first higher low: Activates the trailing mechanism specifically on the first higher low identified.
  • to Break Even instead?: Modifies the higher low logic to move the stop specifically to the entry price.
  • Trail SL on higher high's low: Adjusts the stop-loss to the low of the candle that created a new higher high.
  • Trail SL on consecutive red candles: Moves the stop-loss when the market prints consecutive bearish candles.
  • Trail SL to entry's low: Sets the initial stop-loss at the low of the entry candle.
  • Trail SL to red candles below entry price: Allows the stop-loss to adjust even if the price is currently below the entry point.
  • Trail SL above MAs: Constraints the trailing stop to stay above the plotted Moving Averages.

Moving Averages

  • MA/MA2 Exponential: Toggles between EMA and SMA for the trend filters.
  • MA/MA2 Length: Sets the lookback period for the moving averages.
  • Signal/Long allowed if MA below: Defines the price source (e.g., High) that the MA must be below to permit signals.

FAQ

How do I interpret the different letters on the chart? The "x" indicates a signal is pending validation, "B" marks the confirmed entry point, and "C" indicates the trailing stop has been hit and the position should be closed.

Can I use this indicator for shorting? This specific version is optimized exclusively for long setups and trend-following in bullish environments.

How do I access the LongSetups with Entry Signals and Trailing Stop(HA) indicator? 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.