Skip to main content

Ichimoku Strategy Analysis

Strategy ID: #204 (204th out of 465 strategies)
Strategy Type: Trend Following / Ichimoku Cloud
Timeframe: 5 Minutes (5m)


I. Strategy Overview

Ichimoku (Ichimoku Cloud) is a classic Japanese technical analysis strategy invented by Japanese journalist Goichi Hosoda in the 1930s. The strategy comprehensively evaluates price trends, support/resistance levels, and momentum through multiple balance line calculations, making it one of the most widely used technical analysis tools in Japanese financial markets.

Core Characteristics

FeatureDescription
Buy Conditions1 condition: Tenkan crosses above Kijun + Cloud color change
Sell Conditions1 condition: No explicit sell conditions (sell=1 vacant)
ProtectionTrailing stop (positive)
Timeframe5 Minutes
Dependenciestechnical (qtpylib)

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# Exit Mechanism
minimal_roi = {"0": 1} # 100% profit exit (effectively inactive)

Design Philosophy:

  • Ultra-high ROI value: Set for 100% profit exit; effectively governed by trailing stop in practice

2.2 Trailing Stop Configuration

trailing_stop = True
trailing_stop_positive = 0.01 # 1% trailing activation
trailing_stop_positive_offset = 0.02 # 2% trailing stop level
trailing_only_offset_is_reached = True # Only activate when offset is reached

Design Philosophy:

  • Positive trailing: Activates trailing stop after profit exceeds 2%
  • 1% cushion: Profit above 2% triggers automatic close on 1% pullback
  • Let profits run: Provides adequate price volatility room

2.3 Stop-Loss Configuration

stoploss = -0.1  # -10% hard stop-loss

III. Ichimoku Cloud Core Indicators

3.1 Indicator Calculations

# Ichimoku Cloud Calculations
ichi = ichimoku(dataframe)
dataframe["tenkan"] = ichi["tenkan_sen"] # Tenkan-sen (9-period)
dataframe["kijun"] = ichi["kijun_sen"] # Kijun-sen (26-period)
dataframe["senkou_a"] = ichi["senkou_span_a"] # Senkou Span A
dataframe["senkou_b"] = ichi["senkou_span_b"] # Senkou Span B
dataframe["cloud_green"] = ichi["cloud_green"] # Cloud green (bullish)
dataframe["cloud_red"] = ichi["cloud_red"] # Cloud red (bearish)

3.2 Indicator Explanations

IndicatorNameCalculationRole
Tenkan-senConversion Line(9-period high + 9-period low) / 2Short-term trend
Kijun-senBase Line(26-period high + 26-period low) / 2Medium-term trend
Senkou Span ALeading Span A(Tenkan + Kijun) / 2, projected 26 periods forwardCloud upper edge
Senkou Span BLeading Span B(52-period high + 52-period low) / 2, projected 26 periods forwardCloud lower edge
Chikou SpanLagging SpanCurrent closing price, projected 26 periods backSignal confirmation

IV. Entry Conditions Details

4.1 Core Buy Logic

# Buy Conditions
dataframe.loc[
(
(dataframe["tenkan"].shift(1) < dataframe["kijun"].shift(1)) & # Previous Tenkan < Previous Kijun
(dataframe["tenkan"] > dataframe["kijun"]) & # Current Tenkan > Current Kijun
(dataframe["cloud_red"] == True) # Cloud is red (bearish state)
),
"buy",
] = 1

Logic Breakdown:

  • Golden cross: Tenkan crosses from below to above Kijun (short-term trend strengthening)
  • Cloud confirmation: Cloud is red, indicating prior downtrend may now reverse
  • Dual confirmation: Trend reversal + cloud confirmation improve signal quality

4.2 Signal Interpretation

ConditionMeaning
Tenkan > KijunBullish trend
Kijun > TenkanBearish trend
Price > CloudStrong bullish
Price < CloudStrong bearish
Cloud greenBullish cloud
Cloud redBearish cloud

V. Exit Conditions Details

5.1 Sell Conditions

# Sell Conditions
dataframe.loc[(), "sell"] = 1

Problem: The sell condition in the original code is empty — this is a serious strategy flaw.

5.2 Actual Exit Mechanism

Since sell conditions are undefined, the strategy actually relies on:

Exit MethodTrigger Condition
Trailing stopProfit > 2%, then 1% pullback
Hard stop-lossLoss > 10%
ROI exit100% profit (theoretical value)

VI. Technical Indicator System

6.1 Core Indicators

Indicator CategorySpecific IndicatorPurpose
Trend IndicatorTenkan-sen (9)Short-term trend
Trend IndicatorKijun-sen (26)Medium-term trend
Cloud IndicatorSenkou Span A/BSupport/resistance
Confirmation IndicatorCloud Green/RedBull/bear state

VII. Risk Management

7.1 Trailing Stop Mechanism

# Trailing Stop Example
# Assume entry price 100 USDT
# Activates trailing at 102 USDT (2%)
# Auto-sells at 101 USDT (1% pullback)

7.2 Hard Stop-Loss

stoploss = -0.10  # -10%

VIII. Strategy Pros & Cons

Advantages

  1. Comprehensive analysis: Simultaneously considers trend, momentum, and support/resistance
  2. Multi-dimensional confirmation: Multiple indicators verify each other, improving signal quality
  3. Cloud visualization: Intuitive support/resistance zone display
  4. Trailing stop: Effectively protects profits

Limitations

  1. Missing sell conditions: Strategy has no explicit sell logic design — a serious flaw
  2. Fixed parameters: Cloud parameters (9, 26, 52) not suitable for all markets
  3. High complexity: Requires deep understanding of indicator relationships
  4. Poor oscillating performance: Signals are frequent and inaccurate in oscillating markets
  5. Lagging: Calculated from historical data; has some lag

IX. Modification Suggestions

9.1 Must Fix

  1. Complete sell conditions: Add sell logic based on cloud or crossover
  2. Add take-profit: Set reasonable profit targets

9.2 Optimization Suggestions

  1. Add confirmation indicators: Use RSI or MACD for signal confirmation
  2. Time filtering: Avoid trading at specific times
  3. Multi-timeframe analysis: Use higher timeframes to confirm trends
  4. Cloud thickness filtering: Only trade when the cloud is thin

X. Summary

Ichimoku is a powerful comprehensive technical analysis system, providing a full-spectrum market analysis method. However, the current strategy implementation has a clear flaw — sell conditions are undefined. Before actual use, sell logic must be completed, and risk must be managed through trailing stops and hard stop-losses.

The strategy is suitable for traders with some technical analysis background. Beginners should first deeply study Ichimoku Cloud principles before using it.


Appendix: Complete Code Structure

class Ichimoku(IStrategy):
minimal_roi = {"0": 1}
stoploss = -0.1
timeframe = "5m"

trailing_stop = True
trailing_stop_positive = 0.01
trailing_stop_positive_offset = 0.02
trailing_only_offset_is_reached = True

def populate_indicators(self, dataframe, metadata):
ichi = ichimoku(dataframe)
dataframe["tenkan"] = ichi["tenkan_sen"]
dataframe["kijun"] = ichi["kijun_sen"]
dataframe["senkou_a"] = ichi["senkou_span_a"]
dataframe["senkou_b"] = ichi["senkou_span_b"]
dataframe["cloud_green"] = ichi["cloud_green"]
dataframe["cloud_red"] = ichi["cloud_red"]
return dataframe

def populate_entry_trend(self, dataframe, metadata):
dataframe.loc[
(dataframe["tenkan"].shift(1) < dataframe["kijun"].shift(1)) &
(dataframe["tenkan"] > dataframe["kijun"]) &
(dataframe["cloud_red"] == True),
"buy"
] = 1
return dataframe

def populate_exit_trend(self, dataframe, metadata):
dataframe.loc[(), "sell"] = 1 # Needs completion
return dataframe