All indicators

Ichimoku Backtester with TP, SL, and Cloud Confirmation Option

Feb 12, 2021

Static chart image
Support and ResistanceSignalsOscillatorsMoney ManagementTrailing-Stop

The Ichimoku Backtester with TP, SL, and Cloud Confirmation Option indicator is a comprehensive strategy tool designed to evaluate Ichimoku Cloud performance with integrated risk management and RSI filtering. It allows traders to backtest Tenkan-Sen/Kijun-Sen crossovers while requiring specific cloud conditions and momentum confirmation for higher-probability entries.

Usage

The tool is used to identify and backtest trend-following entries based on the classic Ichimoku components. A Long signal is generated when the Tenkan-Sen crosses above the Kijun-Sen, the price is above the Cloud (Kumo), the Cloud itself is bullish (Senkou Span A > B), and the Chikou-Span confirms positive momentum. Short signals follow the inverse logic.

Traders can utilize the integrated Take Profit (TP) and Stop Loss (SL) settings to simulate realistic trading outcomes. Additionally, the RSI filter can be toggled to ensure entries do not occur in overextended conditions or to use RSI levels as exit signals.

Details

The script executes logic based on five primary lines:

  • Tenkan-Sen (Conversion Line): A 9-period mid-point.
  • Kijun-Sen (Base Line): A 26-period mid-point.
  • Senkou Span A (Leading Span A): The average of Tenkan and Kijun, projected forward.
  • Senkou Span B (Leading Span B): A 52-period mid-point, projected forward.
  • Chikou-Span (Lagging Span): The current closing price plotted 26 periods back.

The strategy requires alignment across these components to trigger an entry, ensuring the trade is supported by both short-term momentum and long-term trend structures.

Settings

Ichimoku Cloud

  • Tenkan-Sen Bars: Period for the Conversion Line calculation.
  • Kijun-Sen Bars: Period for the Base Line calculation.
  • Senkou-Span B Bars: Period for the Leading Span B calculation.
  • Chikou-Span Offset: The lookback distance for the Lagging Span.
  • Senkou-Span Offset: The forward projection distance for the Cloud.
  • Long/Short Entry: Toggles to enable or disable specific trade directions.

Stop Loss and Take Profit

  • Short/Long Stop Loss: Enables and sets the percentage-based stop loss for positions.
  • Short/Long Take Profit: Enables and sets the percentage-based profit target for positions.

RSI

  • Use for Entry/Take Profit: Toggles whether RSI levels filter entries or trigger exits.
  • RSI Period: The lookback period for the RSI calculation.
  • Overbought/Oversold Levels: Thresholds used for the RSI filters.

Date Range

  • Show Date Range: Restricts backtesting logic to a specific time window.

FAQ

How do I use the cloud confirmation?

The script automatically requires price to be above or below the Kumo (Cloud) for entries. You can further refine this by ensuring the trade direction matches the Cloud color via the default strategy logic.

Can I use this for live alerts?

Yes, the script includes optimized alert calls for Long/Short entries and exits that trigger at the close of the bar.

How can I access the Ichimoku Backtester with TP, SL, and Cloud Confirmation Option?

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.