All indicators

Ichimoku Cloud LONG and SHORT indicators

Sep 28, 2020

Static chart image
SignalsTrailing-StopVolatility

The Ichimoku Cloud LONG and SHORT indicators tool provides a systematic approach to identifying entry signals by filtering Ichimoku Cloud components through a rigorous four-rule confirmation process. It aims to capture short-term trend momentum by ensuring price, conversion lines, and cloud spans are perfectly aligned before signaling an entry.

Usage

The script marks potential long and short entries based on the confluence of several technical conditions. A Long signal is triggered when the following criteria are met:

  1. The Conversion Line is above the Base Line.
  2. The current price is trading above the clouds (Senkou Span A and B).
  3. The Lagging Span (Chikou Span) is positioned above the historical cloud levels.
  4. The future cloud (Senkou Span A vs B) is bullish (green).

Short signals utilize the inverse of these rules. To ensure signals remain relevant and do not represent "stale" trends, the script includes a Recency Requirement setting. This ensures that the crossover events (price or conversion lines) have occurred within a specific number of bars, preventing late entries into overextended moves.

When Plot Exit Strategy is enabled, the tool provides visual stop-loss and trailing-stop trigger levels based on the Average True Range (ATR), helping users manage risk dynamically.

Details

The script executes based on standard Ichimoku Donchian channel calculations but adds a layer of logic to monitor the "freshness" of a trend. It uses the ta.barssince function to track how recently the price and conversion lines crossed key levels.

The exit strategy logic integrates ATR-based volatility to project three distinct levels:

  • Stop Loss: A fixed distance from entry based on volatility.
  • Trailing Stop Activation: A level where the trailing stop becomes active.
  • Trailing Stop: The actual exit level once price reaches the activation threshold.

Settings

Ichimoku Periods

  • Conversion Line Periods: Number of bars used for the Tenkan-sen (default 9).
  • Base Line Periods: Number of bars used for the Kijun-sen (default 26).
  • Lagging Span 2 Periods: Number of bars for the Senkou Span B (default 52).
  • Displacement: The number of bars the clouds are shifted forward.

Logic & Risk

  • Recency Requirement: The maximum number of bars allowed since a crossover for a signal to remain valid.
  • Std. Deviation Periods: The period used for ATR calculations to determine volatility.
  • Trailing Stop Activation Mult.: Multiplier for the ATR to set the activation level.
  • Trailing Stop Mult.: Multiplier for the trailing stop distance.
  • Stop Loss Mult.: Multiplier for the initial stop loss.
  • Max hold in days: Automatically hides exit levels if no significant movement occurs after a set duration.
  • Long Only: Restricts the script to only showing bullish signals.
  • Show volatility: Toggles the display of the ATR percentage and dollar value on the chart.

FAQ

How do I use the exit levels provided by the indicator?

When a signal is triggered, the script can plot dashed lines representing your stop loss and trailing stop. These are calculated based on market volatility (ATR) at the moment of entry.

Why did a signal disappear after a few bars?

The indicator includes a "Max hold" or "stale trade" logic. If the price does not move significantly within the number of days specified in the settings, the exit labels will clear to signify the trade setup is no longer optimal.

How can I access this script?

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.