OPEN-SOURCE SCRIPT
Hosoda’s Clouds

Many investors aim to develop trading systems with a high win rate, mistakenly associating it with substantial profits. In reality, high returns are typically achieved through greater exposure to market trends, which inevitably lowers the win rate due to increased risk and more volatile conditions.
The system I present, called “Hosoda’s Clouds” in honor of Goichi Hosoda, the creator of the Ichimoku Kinko Hyo indicator, is likely one of the first profitable systems many traders will encounter. Designed to capture trends, it performs best in markets with clear directional movements and is less suitable for range-bound markets like Forex, which often exhibit lateral price action.
This system is not recommended for low timeframes, such as minute charts, due to the random and emotionally driven nature of price movements in those periods. For a deeper exploration of this topic, I recommend reading my article “Timeframe is Everything”, which discusses the critical importance of selecting the appropriate timeframe.
I suggest testing and applying the “Hosoda’s Clouds” strategy on assets with a strong trending nature and a proven track record of performance. Ideal markets include Tesla (1-hour, 4-hour, and daily), BTC/USDT (daily), SPY (daily), and XAU/USD (daily), as these have consistently shown clear directional trends over time.
Commissions and Configuration
Commissions can be adjusted in the system’s settings to suit individual needs. For evaluating the effectiveness of “Hosoda’s Clouds,” I’ve used a standard commission of $1 per order as a baseline, though this can be modified in the code to accommodate different brokers or preferences.
The margin per trade is set to $1,000 by default, but users are encouraged to experiment with different margin settings in the configuration to match their trading style.
Rules of the “Hosoda’s Clouds” System (Bullish Strategy)
This strategy is designed to capture trending movements in bullish markets using the Ichimoku Kinko Hyo indicator. The rules are as follows:
Long Entry: A long position is triggered when the Tenkan-sen crosses above the Kijun-sen below the Ichimoku cloud, identifying potential reversals or bounces in a bearish context.
Stop Loss (SL): Placed at the low of the candle 12 bars prior to the entry candle. This setting has proven optimal in my tests, but it can be adjusted in the code based on risk tolerance.
Take Profit (TP): The position is closed when the Tenkan-sen crosses below the bottom of the Ichimoku cloud (the minimum of Senkou Span A and Senkou Span B).
Notes on the Code
margin_long=0: Ideal for strategies requiring a fixed position size, particularly useful for manual entries or testing with a constant capital allocation.
margin_long=100: Recommended for high-frequency systems where positions are closed quickly, simulating gradual growth based on realized profits and reflecting real-world broker constraints.
System Performance
The following performance metrics account for $1 per order commissions and were tested on the specified assets and timeframes:
Tesla (H1)
Trades: 148
Win Rate: 29.05%
Period: Jan 2, 2014 – Jan 6, 2020 (+172%)
Simple Annual Growth Rate: +34.3%
Trades: 130
Win Rate: 30.77%
Period: Jan 2, 2020 – Sep 24, 2025 (+858.90%)
Simple Annual Growth Rate: +150.7%
Tesla (H4)
Trades: 102
Win Rate: 32.35%
Period: Jun 29, 2010 – Sep 24, 2025 (+11,356.36%)
Simple Annual Growth Rate: +758.5%
Tesla (Daily)
Trades: 56
Win Rate: 35.71%
Period: Jun 29, 2010 – Sep 24, 2025 (+3,166.64%)
Simple Annual Growth Rate: +211.5%
BTC/USDT (Daily)
Trades: 44
Win Rate: 31.82%
Period: Sep 30, 2017 – Sep 24, 2025 (+2,592.23%)
Simple Annual Growth Rate: +324.8%
SPY (Daily)
Trades: 81
Win Rate: 37.04%
Period: Jan 23, 1993 – Sep 24, 2025 (+476.90%)
Simple Annual Growth Rate: +14.3%
XAU/USD (Daily)
Trades: 216
Win Rate: 32.87%
Period: Jan 6, 1833 – Sep 24, 2025 (+5,241.73%)
Simple Annual Growth Rate: +27.1%
SPX (Daily)
Trades: 217
Win Rate: 38.25%
Period: Feb 1, 1871 – Sep 24, 2025 (+16,791.02%)
Simple Annual Growth Rate: +108.1%
Conclusion
With the “Hosoda’s Clouds” strategy, I aim to showcase the potential of technical analysis to generate consistent profits in trending markets, challenging recent doubts about its effectiveness. My goal is for this system to serve as both a practical tool for traders and a source of inspiration for the trading community I deeply respect. I hope it encourages the creation of new strategies, fosters creativity in technical analysis, and empowers traders to approach the markets with confidence and discipline.
The system I present, called “Hosoda’s Clouds” in honor of Goichi Hosoda, the creator of the Ichimoku Kinko Hyo indicator, is likely one of the first profitable systems many traders will encounter. Designed to capture trends, it performs best in markets with clear directional movements and is less suitable for range-bound markets like Forex, which often exhibit lateral price action.
This system is not recommended for low timeframes, such as minute charts, due to the random and emotionally driven nature of price movements in those periods. For a deeper exploration of this topic, I recommend reading my article “Timeframe is Everything”, which discusses the critical importance of selecting the appropriate timeframe.
I suggest testing and applying the “Hosoda’s Clouds” strategy on assets with a strong trending nature and a proven track record of performance. Ideal markets include Tesla (1-hour, 4-hour, and daily), BTC/USDT (daily), SPY (daily), and XAU/USD (daily), as these have consistently shown clear directional trends over time.
Commissions and Configuration
Commissions can be adjusted in the system’s settings to suit individual needs. For evaluating the effectiveness of “Hosoda’s Clouds,” I’ve used a standard commission of $1 per order as a baseline, though this can be modified in the code to accommodate different brokers or preferences.
The margin per trade is set to $1,000 by default, but users are encouraged to experiment with different margin settings in the configuration to match their trading style.
Rules of the “Hosoda’s Clouds” System (Bullish Strategy)
This strategy is designed to capture trending movements in bullish markets using the Ichimoku Kinko Hyo indicator. The rules are as follows:
Long Entry: A long position is triggered when the Tenkan-sen crosses above the Kijun-sen below the Ichimoku cloud, identifying potential reversals or bounces in a bearish context.
Stop Loss (SL): Placed at the low of the candle 12 bars prior to the entry candle. This setting has proven optimal in my tests, but it can be adjusted in the code based on risk tolerance.
Take Profit (TP): The position is closed when the Tenkan-sen crosses below the bottom of the Ichimoku cloud (the minimum of Senkou Span A and Senkou Span B).
Notes on the Code
margin_long=0: Ideal for strategies requiring a fixed position size, particularly useful for manual entries or testing with a constant capital allocation.
margin_long=100: Recommended for high-frequency systems where positions are closed quickly, simulating gradual growth based on realized profits and reflecting real-world broker constraints.
System Performance
The following performance metrics account for $1 per order commissions and were tested on the specified assets and timeframes:
Tesla (H1)
Trades: 148
Win Rate: 29.05%
Period: Jan 2, 2014 – Jan 6, 2020 (+172%)
Simple Annual Growth Rate: +34.3%
Trades: 130
Win Rate: 30.77%
Period: Jan 2, 2020 – Sep 24, 2025 (+858.90%)
Simple Annual Growth Rate: +150.7%
Tesla (H4)
Trades: 102
Win Rate: 32.35%
Period: Jun 29, 2010 – Sep 24, 2025 (+11,356.36%)
Simple Annual Growth Rate: +758.5%
Tesla (Daily)
Trades: 56
Win Rate: 35.71%
Period: Jun 29, 2010 – Sep 24, 2025 (+3,166.64%)
Simple Annual Growth Rate: +211.5%
BTC/USDT (Daily)
Trades: 44
Win Rate: 31.82%
Period: Sep 30, 2017 – Sep 24, 2025 (+2,592.23%)
Simple Annual Growth Rate: +324.8%
SPY (Daily)
Trades: 81
Win Rate: 37.04%
Period: Jan 23, 1993 – Sep 24, 2025 (+476.90%)
Simple Annual Growth Rate: +14.3%
XAU/USD (Daily)
Trades: 216
Win Rate: 32.87%
Period: Jan 6, 1833 – Sep 24, 2025 (+5,241.73%)
Simple Annual Growth Rate: +27.1%
SPX (Daily)
Trades: 217
Win Rate: 38.25%
Period: Feb 1, 1871 – Sep 24, 2025 (+16,791.02%)
Simple Annual Growth Rate: +108.1%
Conclusion
With the “Hosoda’s Clouds” strategy, I aim to showcase the potential of technical analysis to generate consistent profits in trending markets, challenging recent doubts about its effectiveness. My goal is for this system to serve as both a practical tool for traders and a source of inspiration for the trading community I deeply respect. I hope it encourages the creation of new strategies, fosters creativity in technical analysis, and empowers traders to approach the markets with confidence and discipline.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.