This is a simple trend following strategy based on daily candlesticks. It uses the Ichimoku Cloud to determine the trend direction and track it with the Chikou Span. It goes long when the Chikou Span crosses above the equilibrium lines and exits when it crosses below. This strategy is suitable for medium-to-long term trend trading and aims for steady profits.
The strategy mainly relies on three lines of the Ichimoku Cloud: Senkou Span A, Senkou Span B and the Chikou Span. Senkou Span A and B are used to determine the major trend direction – above the cloud is bullish and below is bearish. The Chikou Span generates trading signals.
Specifically, if the Chikou Span crosses above Senkou Span B from below, it is a buy signal; if it crosses below from above, it is a sell signal. The strategy simply follows this logic to trade.
This is a very classic medium-to-long term trend following strategy built on Ichimoku Cloud with simple and easy-to-grasp rules, and certain advantages in filtering out noises and capturing trends. But some typical weaknesses exist as well which require vigilance and proper enhancements for more steady profits. Overall a good strategy for beginners to learn algorithmic trading.
/*backtest start: 2022-12-11 00:00:00 end: 2023-12-17 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("My Custom Strategy", overlay=true) // Ichimoku Cloud components tenkanSenPeriods = 9 kijunSenPeriods = 26 displacement = 26 highTenkanSen = ta.highest(high, tenkanSenPeriods) lowTenkanSen = ta.lowest(low, tenkanSenPeriods) tenkanSen = (highTenkanSen + lowTenkanSen) / 2 highKijunSen = ta.highest(high, kijunSenPeriods) lowKijunSen = ta.lowest(low, kijunSenPeriods) kijunSen = (highKijunSen + lowKijunSen) / 2 chikouSpan = close[displacement] // Buy condition: Chikou Span crosses over both Tenkan Sen and Kijun Sen buyCondition = chikouSpan > tenkanSen[displacement] and chikouSpan > kijunSen[displacement] if (buyCondition) strategy.entry("Buy", strategy.long) // Sell condition: Chikou Span crosses down both Tenkan Sen and Kijun Sen sellCondition = chikouSpan < tenkanSen[displacement] and chikouSpan < kijunSen[displacement] if (sellCondition) strategy.close("Buy") plot(tenkanSen, color=color.red) plot(kijunSen, color=color.blue) plot(chikouSpan, color=color.green, offset=-displacement)