This strategy is a trend-following trading system based on the Ichimoku Cloud indicator. It identifies market trends through crossovers of cloud components and generates trading signals when price breaks through key technical levels. The strategy employs a non-repainting approach, with all signals confirmed at bar close, effectively reducing the risk of false signals. It is applicable across multiple timeframes and particularly suitable for volatile market conditions.
The core logic is based on three key conditions: 1. Price breaks above the Base Line, indicating strengthening short-term trend 2. Price breaks above Lead Line A, confirming medium-term trend direction 3. Price remains above the Conversion Line, validating trend continuity When these three conditions are simultaneously met, the system generates a buy signal at bar close. Opposite conditions trigger exit signals. The strategy also utilizes cloud filling for enhanced trend visualization, with green clouds indicating bullish markets and red clouds indicating bearish markets.
The strategy establishes a reliable trend-following trading system through innovative application of the Ichimoku Cloud indicator. Its non-repainting design and multiple confirmation mechanisms significantly improve signal quality. While performance may be suboptimal in choppy markets, the suggested optimization directions can further enhance strategy stability and applicability. The strategy is particularly suitable for tracking medium to long-term trends, making it an excellent choice for traders seeking trend-following opportunities.
/*backtest start: 2025-01-09 00:00:00 end: 2025-01-16 00:00:00 period: 10m basePeriod: 10m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}] */ //@version=5 strategy("Ichimoku Cloud Buy Strategy (Non-Repainting)", overlay=true) // === Ichimoku Cloud Settings === lengthConversionLine = input(9, title="Conversion Line Length") lengthBaseLine = input(26, title="Baseline Length") lengthLeadLine = input(52, title="Lead Line Length") // === Calculate Ichimoku Cloud Components === conversionLine = ta.sma((high + low) / 2, lengthConversionLine) baseLine = ta.sma((high + low) / 2, lengthBaseLine) leadLineA = (conversionLine + baseLine) / 2 leadLineB = ta.sma((high + low) / 2, lengthLeadLine) // === Forward Projected Lead Lines (Fixes Ichimoku Calculation) === leadLineA_Future = leadLineA[lengthBaseLine] // Shift forward leadLineB_Future = leadLineB[lengthBaseLine] // === Define Buy and Sell Conditions (Confirmed at Bar Close) === buyCondition = ta.crossover(close, baseLine) and ta.crossover(close, leadLineA) and close > conversionLine and bar_index > bar_index[1] sellCondition = ta.crossunder(close, baseLine) and ta.crossunder(close, leadLineA) and close < conversionLine and bar_index > bar_index[1] // === Plot Buy and Sell Signals (Confirmed at Bar Close) === plotshape(buyCondition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal") plotshape(sellCondition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Sell Signal") // === Implement Strategy Logic (Trades at Bar Close) === if (buyCondition) strategy.entry("Buy", strategy.long) if (sellCondition) strategy.close("Buy") // === Plot Ichimoku Cloud Components with Future Projection === pConversionLine = plot(conversionLine, color=color.blue, title="Conversion Line") pBaseLine = plot(baseLine, color=color.red, title="Base Line") pLeadLineA = plot(leadLineA_Future, color=color.green, title="Lead Line A", offset=lengthBaseLine) pLeadLineB = plot(leadLineB_Future, color=color.orange, title="Lead Line B", offset=lengthBaseLine) // === Fill Ichimoku Cloud for Better Visualization === fill(pLeadLineA, pLeadLineB, color=leadLineA > leadLineB ? color.green : color.red, transp=80) // === Alert Conditions (Only Triggered on Confirmed Signals) === alertcondition(buyCondition, title="Ichimoku Cloud Buy Signal", message="Ichimoku Cloud Buy Signal Triggered") alertcondition(sellCondition, title="Ichimoku Cloud Sell Signal", message="Ichimoku Cloud Sell Signal Triggered")