Simple Moving Average 5line & Ichimoku Cloud

Jul 26, 2018

Static chart image
Support and Resistance
Signals
Dashboard
Moving Averages

The Simple Moving Average 5line & Ichimoku Cloud indicator combines five simple moving averages of varying lengths with a complete Ichimoku Kinko Hyo system to provide a comprehensive trend analysis and signal generation environment.

Usage

The Usage section describes how the script can be used to identify market trends and potential entry points. This tool is designed to provide a "dashboard" view of price action relative to both classic moving averages and the Ichimoku system.

  • Multi-Timeframe Trend Analysis: Users can observe the hierarchy of the five SMAs. When the very short SMA (5) is above the short (20), middle (40), long (100), and very long (200) averages, it suggests a strong bullish trend.
  • Ichimoku Cloud Interactions: The Cloud (Kumo) acts as a zone of support and resistance. Price staying above the cloud indicates a bullish bias, while price below suggests a bearish bias.
  • Crossover Signals: The script generates internal alerts for "TK Crosses" (when the Conversion Line crosses the Base Line) and SMA crosses (specifically the 5 and 20 periods), which are often used to signal shifts in momentum.
  • Lagging Span Confirmation: Traders can use the Lagging Span (plotted with a negative offset) to compare current price action to historical price levels for trend validation.

Details

This script integrates two popular technical analysis methodologies into a single overlay. The five SMAs provide a smooth representation of price trends across different horizons, ranging from immediate momentum to long-term cycles.

The Ichimoku component is calculated using the midpoint of price extremes over specific periods (Donchian channels). The Lead 1 and Lead 2 lines are displaced forward to create the "Cloud," projecting potential future support and resistance areas. The script also includes built-in alert conditions for bullish and bearish crossovers, optimizing it for real-time monitoring. This implementation is based on the original concept by @matsu_bitmex.

Settings

SMA

  • SMA very short length: Sets the period for the first SMA (default 5).
  • SMA short length: Sets the period for the second SMA (default 20).
  • SMA middle length: Sets the period for the third SMA (default 40).
  • SMA long length: Sets the period for the fourth SMA (default 100).
  • SMA very long length: Sets the period for the fifth SMA (default 200).
  • SMA source: Determines the price data used for SMA calculations (default Close).

Ichimoku

  • Conversion Line Periods: The period used for the Tenkan-sen calculation (default 9).
  • Base Line Periods: The period used for the Kijun-sen calculation (default 26).
  • Lagging Span 2 Periods: The period used for the Senkou Span B calculation (default 52).
  • Displacement: The number of bars to shift the Lead lines forward and the Lagging Span backward (default 26).

FAQ

Which crossovers trigger alerts in this script? The script triggers alerts for two specific events: when the Ichimoku Conversion Line crosses the Base Line, and when the 5-period SMA crosses the 20-period SMA.

Can I change the source of the SMAs to something other than the Close price? Yes, the "SMA source" setting allows you to select other price data, such as Open, High, Low, or various weighted averages.

How do I access the Simple Moving Average 5line & Ichimoku Cloud? 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
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

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.