Ichimoku_v37 Strategy Analysis
Table of Contents
- Strategy Overview
- Theoretical Foundation
- Parameter Configuration
- Indicator Calculation Logic
- Entry Signal Analysis
- Exit Signal Analysis
- Risk Management Mechanisms
- Timeframe Design
- Strategy Strengths and Limitations
- Live Trading Recommendations
- Summary and Outlook
1. Strategy Overview
1.1 Strategy Positioning
Ichimoku_v37 is a trend-following strategy based on the Ichimoku Kinko Hyo (Ichimoku Cloud) system. By combining Heiken Ashi candle smoothing technology with the Ichimoku cloud system, it constructs a trading system that excels at both trend identification and dynamic support/resistance determination. The "v37" in the strategy name indicates that it has undergone multiple iterations of optimization and is a significant member of this versioned series.
1.2 Core Design Philosophy
The core design philosophy can be summarized as "go with the trend, walk on the clouds." The strategy uses the Ichimoku cloud to identify the primary trend direction, employs Heiken Ashi candles to filter short-term price noise, and captures trend starting points when prices break through cloud boundaries. This design retains the Ichimoku system's accuracy in trend judgment while using Heiken Ashi's smoothing properties to reduce false signal interference.
1.3 Applicable Market Environments
This strategy is best suited for the following market conditions:
- Trending markets with clear directional movement
- Markets with moderate volatility
- Major cryptocurrency trading pairs
- Medium-to-long-term timeframes (4-hour and above)
In sideways oscillating markets, the strategy may generate excessive false signals and losing trades, requiring additional filtering conditions.
2. Theoretical Foundation
2.1 Introduction to Ichimoku Kinko Hyo
Ichimoku Kinko Hyo is a comprehensive technical analysis tool developed by Japanese journalist Goichi Hosoda (pen name Ichimoku Sanjin) in the 1930s. Its unique feature is the ability to simultaneously display three dimensions of information—trend direction, momentum strength, and support/resistance levels—on a single chart.
"Ichimoku" means "at a glance" in Japanese, "Kinko" means "equilibrium," and "Hyo" means "chart." Together, it means "a chart for equilibrium seen at a glance." This name reflects the designer's original intent: to enable traders to quickly grasp the full market picture through a single chart system.
2.2 The Five Components of Ichimoku
The traditional Ichimoku system consists of five lines:
- Tenkan-sen (Conversion Line): Reflects short-term price momentum
- Kijun-sen (Base Line): Reflects medium-term price trend
- Chikou Span (Lagging Span): Used to confirm trend direction
- Senkou Span A (Leading Span A): One of the upper boundaries of the cloud
- Senkou Span B (Leading Span B): One of the lower boundaries of the cloud
The area between Leading Span A and Leading Span B is called the "Kumo" (Cloud), which is the most central concept in the strategy.
2.3 Heiken Ashi Candle Technology
Heiken Ashi (Average Candle) is an improved candlestick charting technique that generates a smoother price trend by mathematically averaging the open, close, high, and low of traditional candles.
Heiken Ashi calculation formulas:
- HA Close = (Open + High + Low + Close) / 4
- HA Open = (Previous HA Open + Previous HA Close) / 2
- HA High = Max(High, HA Open, HA Close)
- HA Low = Min(Low, HA Open, HA Close)
This calculation method effectively filters short-term price fluctuations, making trend direction clearer and more visible.
2.4 Theoretical Basis for Dual-Technology Fusion
The Ichimoku_v37 strategy combines these two technologies for profound theoretical reasons:
First, as a complete trend analysis system, the Ichimoku cloud's boundaries form dynamic support and resistance zones. A price breakout through the cloud often signals an important trend reversal.
Second, Heiken Ashi candles' smoothing properties effectively reduce noise and false breakouts in regular candlestick charts, improving signal quality.
Finally, using them together maintains signal timeliness while significantly reducing false signal rates, achieving a "fast but orderly" trading effect.
3. Parameter Configuration
3.1 Ichimoku Parameter Settings
The Ichimoku parameters used in the strategy are:
conversion_line_period=20 # Conversion Line period
base_line_periods=60 # Base Line period
laggin_span=120 # Lagging Span period
displacement=30 # Displacement value
These parameters differ significantly from the traditional standard values (9, 26, 52, 26) and have been adjusted for cryptocurrency market characteristics:
Conversion Line Period (20): The standard setting is 9 periods; this strategy extends it to 20 periods. This adjustment reduces the Conversion Line's sensitivity to short-term fluctuations, making it more stable and better suited for cryptocurrency markets' high volatility.
Base Line Period (60): The standard setting is 26 periods; this strategy extends it to 60 periods. A longer Base Line period means stronger trend confirmation weight—only price levels formed over a longer period are included in the base calculation.
Lagging Span Period (120): The standard setting is 52 periods; this strategy extends it to 120 periods. The Lagging Span is used to confirm price movements backward; a longer period provides longer-term trend confirmation.
Displacement (30): The standard setting is 26 periods; this strategy adjusts it to 30. The displacement value determines how far forward the cloud is projected, affecting the timing of entry and exit signals.
3.2 Timeframe Configuration
The strategy uses a dual-timeframe design:
timeframe = '4h' # Primary timeframe: 4-hour
inf_tf = '1d' # Informative timeframe: 1-day
The primary timeframe is used for executing trading signals, while the informative timeframe is used for calculating Ichimoku indicators. The core idea is: use the higher timeframe (daily) Ichimoku cloud to identify the major trend direction, and look for entry opportunities on the lower timeframe (4-hour).
3.3 Stop Loss and Take Profit Settings
Strategy risk control parameters:
stoploss = -0.10 # Fixed stop loss: 10%
minimal_roi = {
"0": 0.10, # Immediate: 10% profit
"30": 0.05, # After 30 minutes: 5% profit
"60": 0.02 # After 60 minutes: 2% profit
}
This tiered ROI setting embodies the philosophy of "letting profits run." As holding time extends, the take-profit threshold gradually decreases, aiming to lock in existing profits and avoid profit giveback.
3.4 Other Key Parameters
startup_candle_count = 150 # Number of startup candles required
process_only_new_candles = True # Process only on new candles
use_sell_signal = True # Enable sell signals
sell_profit_only = True # Sell only when profitable
ignore_roi_if_buy_signal = True # Ignore ROI if buy signal exists
The startup candle count is set to 150 to ensure sufficient historical data for Ichimoku indicator calculations. Particularly for the displaced cloud, sufficient forward data is needed to form a complete cloud band.
4. Indicator Calculation Logic
4.1 Heiken Ashi Candle Calculation
The strategy first calculates Heiken Ashi candles for both timeframes:
# Daily Heiken Ashi
heikinashi = qtpylib.heikinashi(dataframe_inf)
dataframe_inf['ha_open'] = heikinashi['open']
dataframe_inf['ha_close'] = heikinashi['close']
dataframe_inf['ha_high'] = heikinashi['high']
dataframe_inf['ha_low'] = heikinashi['low']
# 4-hour Heiken Ashi
heik = qtpylib.heikinashi(dataframe)
dataframe['ha_4h_open'] = heik['open']
dataframe['ha_4h_close'] = heik['close']
dataframe['ha_4h_high'] = heik['high']
dataframe['ha_4h_low'] = heik['low']
The key distinction here: daily Heiken Ashi is used for Ichimoku calculation, while 4-hour Heiken Ashi is used for signal judgment. This design ensures unity between signal judgment precision and trend identification stability.
4.2 Ichimoku Cloud Calculation
The strategy uses daily Heiken Ashi data to calculate Ichimoku:
ha_ichi = ichimoku(heikinashi,
conversion_line_period=20,
base_line_periods=60,
laggin_span=120,
displacement=30
)
After calculation, the following core elements are extracted:
dataframe_inf['senkou_a'] = ha_ichi['senkou_span_a'] # Leading Span A
dataframe_inf['senkou_b'] = ha_ichi['senkou_span_b'] # Leading Span B
dataframe_inf['cloud_green'] = ha_ichi['cloud_green'] # Green cloud flag
dataframe_inf['cloud_red'] = ha_ichi['cloud_red'] # Red cloud flag
Cloud color logic:
- Green cloud: Leading Span A > Leading Span B (uptrend)
- Red cloud: Leading Span B > Leading Span A (downtrend)
4.3 Timeframe Merge
After calculation, daily data needs to be merged into the 4-hour dataframe:
dataframe = merge_informative_pair(dataframe, dataframe_inf,
self.timeframe, self.inf_tf, ffill=True)
This operation maps daily Ichimoku data to each 4-hour candle, so every 4-hour candle receives the latest daily cloud data. The ffill=True parameter ensures that 4-hour candles use the previous day's cloud data before the daily update.
4.4 Data Dependency Chain
The entire indicator calculation process forms a clear data dependency chain:
Raw daily data → Daily Heiken Ashi → Daily Ichimoku Cloud
↓
Raw 4-hour data → 4-hour Heiken Ashi → Signal judgment
↓
Timeframe merge → Final signal
This layered design ensures each calculation step has clear data sources and output targets.
5. Entry Signal Analysis
5.1 Entry Conditions Detailed
The strategy's entry signals are divided into two scenarios:
Scenario 1: Green Cloud Breakout (Bullish Strength)
(dataframe['ha_4h_close'].crossed_above(dataframe['senkou_a_1d'])) &
(dataframe['ha_4h_close'].shift() < (dataframe['senkou_a_1d'])) &
(dataframe['cloud_green_1d'] == True)
- Condition 1: 4-hour Heiken Ashi close price crosses above the daily Leading Span A
- Condition 2: The previous candle's close price was below Leading Span A (ensuring a genuine breakout)
- Condition 3: Daily cloud is green (confirming upward trend)
Scenario 2: Red Cloud Breakout (Trend Reversal)
(dataframe['ha_4h_close'].crossed_above(dataframe['senkou_b_1d'])) &
(dataframe['ha_4h_close'].shift() < (dataframe['senkou_b_1d'])) &
(dataframe['cloud_red_1d'] == True)
- Condition 1: 4-hour Heiken Ashi close price crosses above the daily Leading Span B
- Condition 2: The previous candle's close price was below Leading Span B
- Condition 3: Daily cloud is red (indicating the prior downtrend may be reversing)
5.2 Signal Design Principles
These two entry conditions reflect recognition of different market states:
Green Cloud Breakout Signal: This is a pullback entry opportunity in an uptrend. When the cloud is green, Leading Span A is at the top of the cloud, forming a dynamic resistance level. Price breaking through Leading Span A from below means bulls have regained dominance and the trend is likely to continue.
Red Cloud Breakout Signal: This is a potential trend reversal signal. When the cloud is red, price is in a downtrend and Leading Span B is the cloud's lower boundary. Price breaking through Leading Span B from below may mean the downtrend has ended and a new uptrend is forming.
5.3 Role of Heiken Ashi
Using Heiken Ashi close prices rather than raw close prices for judgment is an important optimization:
- Noise smoothing: Heiken Ashi prices are smoother, reducing interference from upper and lower shadows in regular candles
- False breakout reduction: Signals only trigger when Heiken Ashi prices (not instantaneous prices) cross the cloud band
- Improved signal quality: Heiken Ashi's smoothing makes breakouts more credible
5.4 Visual Understanding of Entry Signals
Imagine the cloud chart as a cloud layer in the sky:
- Green cloud state: Clear skies, cloud layer (Leading Span A) is above
- Red cloud state: Gloomy skies, cloud layer (Leading Span B) is below
When price (represented by Heiken Ashi) flies through the cloud layer upward like a bird, that's the entry signal.
6. Exit Signal Analysis
6.1 Exit Conditions
The strategy's exit signals are relatively simple and direct:
(dataframe['ha_4h_close'] < dataframe['senkou_a_1d']) |
(dataframe['ha_4h_close'] < dataframe['senkou_b_1d'])
If either of the following conditions is met, a sell signal triggers:
- 4-hour Heiken Ashi close price falls below the daily Leading Span A
- Or 4-hour Heiken Ashi close price falls below the daily Leading Span B
6.2 Exit Logic Analysis
The exit signal uses "OR" logic rather than "AND" logic, meaning:
- In green cloud state: Price falling below Leading Span A triggers a sell
- In red cloud state: Price falling below Leading Span B triggers a sell
- During cloud color transitions: Price falling below either cloud band triggers a sell
This design ensures exit signals can respond quickly to trend changes, without missing the best exit timing by waiting for both conditions to be met simultaneously.
6.3 Asymmetry Between Entry and Exit
The attentive reader may notice that entry signals require cloud color confirmation along with crossover confirmation, while exit signals are relatively looser. This asymmetry is intentional:
Entry cautious: Multiple confirmation conditions ensure entry signal quality Exit decisive: Single condition triggers exit, ensuring timely stop-loss or profit-taking
This "strict entry, flexible exit" design philosophy aligns with best practices in risk management—willing to miss some opportunities to ensure entry quality, while maintaining exit flexibility.
6.4 Coordination with Other Exit Conditions
The strategy also configures other exit conditions:
sell_profit_only = True # Only respond to sell signals when profitable
This setting means: even if an exit signal triggers, if the current position is at a loss, the strategy will not execute the sell. This is a protection mechanism against exiting too early during a drawdown, trusting that the trend will recover.
However, this must be understood in conjunction with stop-loss conditions:
- If price continues to fall and hits the stop-loss, the stop-loss exits
- If price falls triggering a sell signal but hasn't hit the stop-loss and is still at a loss, holding continues
7. Risk Management Mechanisms
7.1 Fixed Stop Loss
The strategy sets a 10% fixed stop loss:
stoploss = -0.10
This means any single trade's maximum loss is limited to 10% of the principal. The advantage of a fixed stop loss is simplicity and clarity; the disadvantage is that it doesn't account for differences in market volatility.
7.2 Tiered Take Profit
The strategy's ROI settings use a tiered structure:
minimal_roi = {
"0": 0.10, # Immediate: 10%
"30": 0.05, # After 30 minutes: 5%
"60": 0.02 # After 60 minutes: 2%
}
| Holding Time | Minimum Take Profit Target |
|---|---|
| After opening | 10% |
| After 30 minutes | 5% |
| After 60 minutes | 2% |
The logic of tiered take profit: in the early stage after opening, if price rises quickly to 10%, lock in profits immediately; if price rise is limited, lower the take profit target as time passes to ensure some profit is captured.
7.3 Interaction Between ROI and Buy Signals
ignore_roi_if_buy_signal = True
This setting is critical: if a buy signal exists, ignore the ROI take profit. This means:
- If price has risen but the buy signal is still valid (trend is still continuing)
- The strategy will not sell just because the ROI target has been reached
- Instead, it lets profits continue to run
This design avoids a common problem: exiting too early during a strong trend, missing the subsequent big move.
7.4 Comprehensive Risk Control Logic
Combining all risk control elements, the strategy's complete exit logic is:
- Stop loss priority: If loss reaches 10%, stop-loss exits
- Signal exit: If price falls below the cloud band and is profitable, signal exit
- Time-based profit-taking: If holding time exceeds a certain period and the ROI target is met (and no buy signal exists), take profit exits
- Trend continuation: If the buy signal is still valid, continue holding
These four layers form a complete risk management closed loop—able to stop losses in time while letting profits run.
8. Timeframe Design
8.1 Dual Timeframe Architecture
The strategy uses a dual-layer architecture with primary timeframe (4-hour) and informative timeframe (1-day):
timeframe = '4h' # Trading execution layer
inf_tf = '1d' # Trend determination layer
8.2 Design Principles
The core philosophy of this dual-layer design is "major trend guides minor opportunities":
Daily layer (trend determination):
- Calculates Ichimoku cloud
- Determines major trend direction (cloud color)
- Determines dynamic support/resistance levels (cloud band boundaries)
4-hour layer (signal execution):
- Uses Heiken Ashi prices
- Captures precise timing of price crossing the cloud band
- Executes buy and sell operations
8.3 Timeframe Synergy Effects
The two timeframes form a synergistic effect:
- Stability and sensitivity balance: Daily provides stable trend judgment; 4-hour provides sensitive entry timing
- False signal filtering: 4-hour signals only activate if they align with the daily trend direction
- Noise suppression: Daily cloud's smoothing properties reduce the impact of short-term fluctuations
8.4 Data Synchronization Mechanism
dataframe = merge_informative_pair(dataframe, dataframe_inf,
self.timeframe, self.inf_tf, ffill=True)
ffill=True (forward fill) ensures correct data synchronization:
- Before the daily update, all 4-hour candles use the previous day's cloud data
- After the daily update, all 4-hour candles receive new cloud data
- This mechanism avoids look-ahead bias (future data leakage)
8.5 Timeframe Selection Considerations
Why choose 4-hour and daily?
Advantages of 4-hour:
- Moderate signal response speed, not too frequent
- Approximately 6 candles per day, convenient for intraday decisions
- Filters noise from shorter timeframes
Advantages of daily:
- Stable and reliable trend judgment
- Cloud forms fully, doesn't change frequently
- Matches the habits of medium-to-long-term investors
This combination performs well in cryptocurrency markets, balancing the market's 24/7 nature with trend sustainability.
9. Strategy Strengths and Limitations
9.1 Strategy Strengths
1. Strong Trend-Following Capability
The Ichimoku cloud itself is an excellent trend identification tool. Combined with the dual-timeframe design, the strategy can effectively capture medium-to-long-term uptrends. The cloud's color intuitively reflects trend direction without needing additional trend confirmation indicators.
2. Effective False Signal Filtering
Heiken Ashi candles' smoothing properties significantly reduce false breakouts in regular candlestick charts. Only smoothed-price crossovers through the cloud band trigger signals, greatly improving signal quality.
3. Dynamic Support/Resistance
The cloud's upper and lower boundaries form dynamic support/resistance levels, closer to actual market conditions than fixed support/resistance lines. This dynamic adjustment allows the strategy to adapt to different market states.
4. Comprehensive Risk Control
Fixed stop loss, tiered take profit, and signal exit—triple protection mechanisms ensure controllable risk. The "strict entry, flexible exit" design philosophy aligns with professional risk management principles.
5. Automation-Friendly
The strategy logic is clear and unambiguous, with no subjective judgment components. It's highly suitable for algorithmic trading—all signals can be automatically generated by code, avoiding emotional interference in manual trading.
9.2 Strategy Limitations
1. Poor Performance in Ranging Markets
As a trend-following strategy, Ichimoku_v37 easily generates consecutive false signals in sideways markets. The cloud frequently changes color in ranging markets, causing repeated buy-sell cycles.
2. Signal Lag
Ichimoku is inherently a lagging indicator; cloud formation requires historical data. In fast-reversing markets, the strategy may react slowly, missing optimal entry or exit timing.
3. Parameter Sensitivity
The strategy uses non-standard Ichimoku parameters (20, 60, 120, 30), which may not be optimal for certain trading pairs or market states and require further testing and adjustment.
4. Single-Strategy Limitations
The strategy only uses Ichimoku and Heiken Ashi, without additional technical indicator confirmations. In certain market conditions, additional filtering conditions may be needed to improve signal quality.
5. Market Sentiment Not Considered
The strategy is entirely based on technical analysis, without incorporating non-technical factors such as market sentiment, news events, or capital flows. It may underperform during news-driven or event-driven market moves.
9.3 Improvement Suggestions
For the above limitations, consider the following improvement directions:
- Add range filtering: Introduce ADX or volatility indicators to reduce trading frequency in ranging markets
- Multi-timeframe confirmation: Add weekly trend confirmation to further filter counter-trend signals
- Parameter optimization: Optimize parameters for different trading pairs to improve adaptability
- Add volume confirmation: Require volume confirmation on breakouts to improve breakout authenticity
- Introduce machine learning: Use machine learning methods to dynamically adjust parameters and weights
10. Live Trading Recommendations
10.1 Backtesting Optimization
Before live trading, thorough backtesting is strongly recommended:
- Backtesting period: At least 1 year of historical data covering bull, bear, and sideways markets
- Trading pair selection: Test multiple major pairs to evaluate strategy universality
- Parameter sensitivity testing: Adjust key parameters and observe changes in strategy performance
- Trading cost considerations: Include trading fees and slippage in backtesting for more realistic expected returns
10.2 Money Management
The strategy itself does not include money management logic and needs external configuration:
- Per-trade risk: Recommended risk per trade is no more than 1-2% of total capital
- Total exposure control: Simultaneous positions should not exceed 30-50% of total capital
- Correlation considerations: Avoid holding highly correlated trading pairs simultaneously
- Staggered position building: Consider executing signals in batches to reduce timing risk
10.3 Market Environment Assessment
Strategy performance varies significantly in different market environments. Recommendations:
Suitable trading periods:
- Markets with clear directional trends
- Moderate market volatility
- Periods with high technical analysis effectiveness
Trading cautiously or pausing during:
- Sideways oscillating markets
- Around major news events
- Periods of extreme market fear or greed
10.4 Monitoring and Adjustment
During live trading, regular monitoring and adjustment are needed:
- Performance monitoring: Track deviations between actual strategy performance and backtesting expectations
- Market adaptability: Consider pausing or restarting the strategy based on market state changes
- Parameter adjustment: Regularly evaluate whether parameters still suit the current market
- Anomaly handling: Set up abnormal trade detection to prevent significant losses from strategy failure
10.5 Combining with Other Strategies
Ichimoku_v37 can be combined with other strategies:
- Trend + mean reversion combination: Use mean reversion in ranging markets and this strategy in trending markets
- Multi-strategy voting: Multiple strategies vote on whether to trade, improving signal quality
- Risk management coverage: Use independent risk management strategies to control overall positions
11. Summary and Outlook
11.1 Core Strategy Points
Ichimoku_v37 is a carefully designed trend-following strategy. Its core points can be summarized as:
- Dual timeframes: Daily determines trend, 4-hour executes trades
- Dual smoothing: Heiken Ashi smooths price, cloud smooths trends
- Dual entry: Green cloud breakout and red cloud breakout entry methods
- Triple protection: Stop loss, take profit, signal exit—three layers of risk control
- Strict entry, flexible exit: Cautious entry, decisive exit
11.2 Strategy Applicability
This strategy is best suited for:
- Cryptocurrency markets with clear trend characteristics
- Medium-to-long-term investors
- Automated trading systems
- Users with some technical analysis background
Not suitable for:
- High-frequency trading needs
- Markets dominated by ranging conditions
- Fully automated "set it and forget it" scenarios (still requires monitoring)
11.3 Future Development Directions
The strategy still has room for further optimization:
- Smart parameter adjustment: Automatically adjust Ichimoku parameters based on market volatility
- Multi-factor models: Integrate volume, momentum, sentiment, and other multi-dimensional signals
- Machine learning enhancement: Use AI to optimize entry and exit timing
- Dynamic stop loss: Set more flexible stop-loss levels based on market volatility
- Market state recognition: Automatically identify trending/ranging markets and switch strategy modes
11.4 Closing Remarks
Ichimoku_v37 represents the fusion of traditional technical analysis with modern quantitative trading. The Ichimoku Kinko Hyo, a classic technical indicator, combined with parameter adjustments and Heiken Ashi integration, demonstrates its vitality in the emerging cryptocurrency market.
No strategy is all-powerful, and Ichimoku_v37 is no exception. Understanding the strategy's principles, strengths, and limitations—combined with sound money management and market judgment—is essential to truly leverage its value. It is hoped that this analysis helps readers deeply understand this strategy and achieve good returns in live trading.
This document is generated by the Freqtrade Strategy Analysis System for reference and study only, and does not constitute investment advice. Investing involves risk; trade with caution.