LongSetups with Entry Signals and Trailing Stop(HA)

Sep 3, 2018

Static chart image
Price Action Based
Dynamic Overlays
Signals
Moving Averages
Trailing-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 access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

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.