This strategy is a quantitative trading system based on the Ichimoku Cloud. It primarily uses the crossover signals between Leading Span A and Leading Span B to determine market trend direction and generate trading signals. The strategy employs a dynamic price range assessment method, incorporating Donchian Channel calculation principles to effectively capture market trend turning points.
The core logic of the strategy is based on the following key components:
Trading signals are triggered under the following conditions:
This strategy is a quantitative trading system that combines classical technical analysis tools, capturing market opportunities through multi-dimensional trend analysis. While it has some inherent lag, it demonstrates good reliability and adaptability overall. Through continuous optimization and improvement, the strategy has the potential to maintain stable performance across different market conditions.
/*backtest start: 2019-12-23 08:00:00 end: 2024-12-25 08:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © mrbakipinarli //@version=6 strategy(title="Ichimoku Cloud Strategy", shorttitle="Ichimoku Strategy", overlay=true) // Inputs for Ichimoku Cloud conversionPeriods = input.int(9, minval=1, title="Conversion Line Length") basePeriods = input.int(26, minval=1, title="Base Line Length") laggingSpan2Periods = input.int(52, minval=1, title="Leading Span B Length") displacement = input.int(26, minval=1, title="Lagging Span") // Functions donchian(len) => math.avg(ta.lowest(len), ta.highest(len)) // Ichimoku Components conversionLine = donchian(conversionPeriods) baseLine = donchian(basePeriods) leadLine1 = math.avg(conversionLine, baseLine) leadLine2 = donchian(laggingSpan2Periods) // Plotting Ichimoku Components plot(conversionLine, color=color.new(#2962FF, 0), title="Conversion Line") plot(baseLine, color=color.new(#B71C1C, 0), title="Base Line") plot(close, offset = -displacement + 1, color=color.new(#43A047, 0), title="Lagging Span") p1 = plot(leadLine1, offset = displacement - 1, color=color.new(#A5D6A7, 0), title="Leading Span A") p2 = plot(leadLine2, offset = displacement - 1, color=color.new(#EF9A9A, 0), title="Leading Span B") // Kumo Cloud plot(leadLine1 > leadLine2 ? leadLine1 : leadLine2, offset = displacement - 1, title = "Kumo Cloud Upper Line", display = display.none) plot(leadLine1 < leadLine2 ? leadLine1 : leadLine2, offset = displacement - 1, title = "Kumo Cloud Lower Line", display = display.none) fill(p1, p2, color = leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 90) : color.rgb(244, 67, 54, 90)) // Trading Logic longCondition = ta.crossover(leadLine1, leadLine2) shortCondition = ta.crossunder(leadLine1, leadLine2) if (longCondition) strategy.entry("Long", strategy.long) if (shortCondition) strategy.entry("Short", strategy.short)