Ichimoku Kinko Hyo交易策略是一个基于Ichimoku技术指标的趋势跟踪策略。该策略利用Ichimoku的转换线、基准线、领先线1、领先线2等指标判断趋势方向,以及进场和止损的时机。
该策略主要判断以下四个条件来决定交易方向:
具体来说,策略首先计算出转换线、基准线、领先线1和领先线2。然后判断关闭价是否突破云图的上沿或下沿,来决定做多还是做空。
如果关闭价上穿云图的上沿,即上穿领先线1和领先线2的较大值的26期平均值时,表示股价进入上升趋势,这时做多。
如果关闭价下穿云图的下沿,即下穿领先线1和领先线2的较小值的26期平均值时,表示股价进入下降趋势,这时做空。
进场后设置止盈和止损条件。止盈条件为入场价的3.5%,止损条件为入场价的1.5%。
Ichimoku Kinko Hyo交易策略具有以下优势:
Ichimoku Kinko Hyo交易策略也存在一些风险:
对策:
Ichimoku Kinko Hyo交易策略可以从以下几个方面进行优化:
Ichimoku Kinko Hyo交易策略overall relatively good strategy that can capture potential trends in a timely manner. But it still needs further optimization and combination with other indicators to form a robust trading system. By adjusting parameters, improving entry and exit techniques, and controlling risks, Ichimoku strategy can achieve higher risk-adjusted returns in trending markets.
/*backtest
start: 2023-10-16 00:00:00
end: 2023-11-15 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Ichimoku system", overlay=true, initial_capital = 100000, default_qty_type = strategy.percent_of_equity, default_qty_value=100)
buyOnly = input(false, "only shows buying Trade", type = input.bool)
conversionPeriods = input(9, minval=1, title="Conversion Line Periods"),
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods"),
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(conversionLine, color=#0496ff, title="Conversion Line")
plot(baseLine, color=#991515, title="Base Line")
plot(close, offset = -displacement + 1, color=#459915, title="Lagging Span")
p1 = plot(leadLine1, offset = displacement - 1, color=color.green,
title="Lead 1")
p2 = plot(leadLine2, offset = displacement - 1, color=color.red,
title="Lead 2")
fill(p1, p2, color = leadLine1 > leadLine2 ? color.green : color.red)
profit = input(3.5, "enter target in % after entry", step = 0.5)
stoploss = input(1.5, "enter Stoploss in % after entry", step = 0.5)
sl = stoploss /100 * strategy.position_avg_price / syminfo.mintick
profitt = profit /100 * strategy.position_avg_price / syminfo.mintick
abovecloud = max(leadLine1, leadLine2)
belowcloud = min(leadLine1, leadLine2)
buying = close > abovecloud[26] and close[1] < abovecloud[27]
selling = close < belowcloud[26] and close[1] > belowcloud[27]
strategy.entry("BuyAboveCLoud", true, when = buying)
if buyOnly
strategy.close("BuyAboveCLoud", when = selling)
else
strategy.entry("SellBelowCloud", false, when = selling)
//strategy.exit("Exit Position", "BuyAboveCLoud", profit = profitt, loss = sl)
//strategy.exit("Exit Position", "SellBelowCloud", profit = profitt, loss = sl)