This strategy is a trend identification and trading strategy based on the Ichimoku Cloud indicator combined with Fibonacci Ratios. It uses the Conversion Line, Base Line, Kumo Cloud, and Lagging Span from the Ichimoku Cloud indicator to determine the current market trend, and incorporates the 1.618 and 0.618 Fibonacci Ratios to set stop-loss levels and identify sideways markets. Additionally, the strategy introduces two extra mid-lines to filter out false signals.
The Ichimoku Cloud indicator consists of four components: the Conversion Line, Base Line, Kumo Cloud, and Lagging Span. The Conversion Line and Base Line are calculated using the average of the highest high and lowest low over different time periods. The Kumo Cloud is formed by shifting the Base Line forward by 26 periods, and the Lagging Span is the closing price shifted backwards by 26 periods.
The long entry conditions for this strategy are as follows:
The short entry conditions are the opposite of the long entry conditions.
The stop-loss levels are set using the 1.618 and 0.618 Fibonacci Ratios. For long positions, the stop-loss is the upper edge of the cloud minus 1.618 times the distance between the upper and lower edges. For short positions, it is the opposite. The 0.618 line is used to identify sideways markets. When the cloud is green and the 0.618 line is below the 1.618 stop-loss level, the market is considered to be in a sideways state.
In addition to the Ichimoku Cloud indicator, the strategy introduces two mid-lines to further filter out false signals. The mid-lines are calculated using the average of the highest high and lowest low over different time periods.
This strategy innovatively combines the Ichimoku Cloud indicator with Fibonacci Ratios to form a complete trend identification and trading system. The introduction of extra mid-lines for filtering can improve signal quality to a certain extent. The strategy’s advantage lies in its ability to adapt well to both trending and ranging market conditions, and to control risk through dynamic stop-losses. However, the strategy also has some shortcomings, such as lack of theoretical support and potential overfitting in parameter optimization. In the future, the strategy can be improved by introducing more indicators, optimizing stop-losses and position sizing, and using machine learning for parameter optimization. Overall, this strategy has an innovative approach and is worth referencing, but further testing and optimization are needed for practical application.
/*backtest start: 2023-03-13 00:00:00 end: 2024-03-18 00:00:00 period: 1d basePeriod: 1h 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/ // © manoharbauskar //@version=5 // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © manoharbauskar //@version=5 strategy("Advanced_Ichimoku_Cloud_Strategy", overlay=true, margin_long=100, margin_short=100) conversionPeriods = input.int(9, minval=1, title="Conversion Line Length") basePeriods = input.int(26, minval=1, title="Base Line Length") laggingSpanPeriods = input.int(52, minval=1, title="Leading Span B Length") pivotPeriods1 = input.int(17,minval = 1,title = "PPL1") pivotPeriods2 = input.int(39,minval = 1,title = "PPL2") displacement = input.int(26, minval=1, title="Lagging Span") donchian(len) => math.avg(ta.lowest(len), ta.highest(len)) conversionLine = donchian(conversionPeriods) baseLine = donchian(basePeriods) midLine1 = donchian(pivotPeriods1) midLine2 = donchian(pivotPeriods2) midLine3 = donchian(laggingSpanPeriods) leadLine1 = math.avg(conversionLine, baseLine, midLine1) leadLine2 = math.avg(midLine2 , midLine3) plot(conversionLine, color=#2962FF, title="Conversion Line") plot(baseLine, color=#B71C1C, title="Base Line") plot(close, offset = -displacement + 1, color=color.yellow, title="Lagging Span") p1 = plot(leadLine1, offset = displacement - 1, color=#A5D6A7, title="Leading Span A") p2 = plot(leadLine2, offset = displacement - 1, color=#EF9A9A, title="Leading Span B") 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)) //stoploss calculating mult1 = input.float(1.618, "Mult1") mult2 = input.float(0.618, "Mult2") stoploss1 = leadLine1 - (leadLine1 - leadLine2)*mult1 stoploss2 = leadLine1 - (leadLine1 - leadLine2)*mult2 plot(stoploss1,"Sl", color = color.fuchsia, linewidth = 2, style = plot.style_line, offset = displacement - 1) plot(stoploss2,"S2", color = color.lime, linewidth = 2, style = plot.style_line, offset = displacement - 1) longCondition = leadLine1 > leadLine2 if (longCondition) strategy.entry("Buy", strategy.long) shortCondition = leadLine1 < leadLine2 if (shortCondition) strategy.entry("Sell", strategy.short)