Ichimoku Cloud LONG and SHORT indicators
Sep 28, 2020

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:
- The Conversion Line is above the Base Line.
- The current price is trading above the clouds (Senkou Span A and B).
- The Lagging Span (Chikou Span) is positioned above the historical cloud levels.
- 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.
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.

