
Chiến lược này là hệ thống giao dịch định lượng dựa trên Đám mây Ichimoku. Chiến lược này chủ yếu sử dụng các tín hiệu giao nhau của Đường dẫn A và Đường dẫn B để xác định hướng xu hướng thị trường và tạo ra các tín hiệu giao dịch. Chiến lược này áp dụng phương pháp đánh giá phạm vi giá động, kết hợp với nguyên tắc tính toán của Kênh Donchian, có thể nắm bắt hiệu quả các điểm ngoặt của xu hướng thị trường.
Logic cốt lõi của chiến lược này dựa trên các thành phần chính sau:
Các điều kiện kích hoạt tín hiệu giao dịch như sau:
Chiến lược này là một hệ thống giao dịch định lượng kết hợp các công cụ phân tích kỹ thuật cổ điển để nắm bắt cơ hội thị trường thông qua phân tích xu hướng đa chiều. Mặc dù có độ trễ nhất định nhưng nhìn chung nó có độ tin cậy và khả năng thích ứng tốt. Thông qua quá trình tối ưu hóa và cải tiến liên tục, chiến lược này dự kiến sẽ duy trì hiệu suất ổn định trong nhiều môi trường thị trường khác nhau.
/*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)