
Chiến lược này là hệ thống giao dịch theo xu hướng dựa trên chỉ báo Đám mây Ichimoku. Chiến lược này xác định xu hướng thị trường thông qua giao điểm của các thành phần cốt lõi của biểu đồ đám mây và tạo ra tín hiệu giao dịch khi giá vượt qua các mức kỹ thuật quan trọng. Chiến lược này áp dụng phương pháp không vẽ lại và tất cả các tín hiệu đều được xác nhận khi đóng đường K, giúp giảm hiệu quả nguy cơ đưa ra tín hiệu sai. Chiến lược này có thể áp dụng cho nhiều giai đoạn thời gian và đặc biệt phù hợp với môi trường thị trường có tính biến động cao.
Logic cốt lõi của chiến lược này dựa trên ba điều kiện chính sau:
Chiến lược này thiết lập một hệ thống giao dịch theo xu hướng đáng tin cậy thông qua việc áp dụng sáng tạo các chỉ báo biểu đồ đám mây. Thiết kế không sơn lại và cơ chế xác nhận nhiều lần của chiến lược này cải thiện đáng kể chất lượng tín hiệu. Mặc dù hiệu suất kém trong thị trường biến động, tính ổn định và khả năng áp dụng của chiến lược có thể được cải thiện hơn nữa thông qua các hướng tối ưu hóa được đề xuất. Chiến lược này đặc biệt phù hợp để theo dõi các xu hướng trung hạn đến dài hạn và là lựa chọn tốt cho các nhà giao dịch tìm kiếm cơ hội theo xu hướng.
/*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")