
Chiến lược này là một hệ thống giao dịch định lượng cao dựa trên nhiều chỉ số trung bình di chuyển và dải Brin. Cốt lõi của chiến lược sử dụng tín hiệu chéo của trung bình di chuyển 5 chu kỳ và 11 chu kỳ làm cơ sở đầu vào chính, trong khi kết hợp với trung bình di chuyển 55 chu kỳ và dải Brin để lọc tín hiệu và kiểm soát rủi ro. Chiến lược này đặc biệt phù hợp cho giao dịch quyền chọn, đặc biệt là hoạt động quyền chọn ngang bằng trên chu kỳ 3 phút và 5 phút.
Lập luận cốt lõi của chiến lược bao gồm các yếu tố then chốt sau:
Chiến lược này xây dựng một hệ thống giao dịch tương đối hoàn chỉnh bằng cách kết hợp nhiều chỉ số kỹ thuật. Điểm mạnh cốt lõi của nó là cơ chế xác nhận tín hiệu nhiều cấp và chương trình quản lý rủi ro động. Mặc dù có một số không gian tối ưu hóa, nhưng khuôn khổ cơ bản của chiến lược là vững chắc, đặc biệt phù hợp cho các nhà giao dịch quyền chọn sử dụng.
/*backtest
start: 2025-02-12 00:00:00
end: 2025-02-18 08:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("MA5 MA11 Bollinger Bands 22 Strategy", overlay=true)
// Define indicators
ma5 = ta.sma(close, 5)
ma11 = ta.sma(close, 11)
ma55 = ta.sma(close, 55)
basis = ta.sma(close, 22)
dev = 1.5
upperBB = basis + dev * ta.stdev(close, 22)
lowerBB = basis - dev * ta.stdev(close, 22)
// Plot the indicators
plot(ma5, color=color.blue, linewidth=2, title="MA5")
plot(ma11, color=color.red, linewidth=2, title="MA11")
plot(ma55, color=color.green, linewidth=2, title="MA55")
plot(upperBB, color=color.orange, linewidth=1, title="Upper Bollinger Band")
plot(lowerBB, color=color.orange, linewidth=1, title="Lower Bollinger Band")
// Entry conditions
longCondition = ta.crossover(ma5, ma11) and close > ma55 and close < lowerBB
shortCondition = ta.crossunder(ma5, ma11) and close < ma55 and close > upperBB
// Exit conditions
closeLongCondition = ta.crossunder(close, ma5) or close < ma55
closeShortCondition = ta.crossover(close, ma5) or close > ma55
// Execute trades
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
if (closeLongCondition)
strategy.close("Long")
if (closeShortCondition)
strategy.close("Short")
// Optional: Add Stop Loss and Take Profit (e.g., ATR-based)
atrValue = ta.atr(14)
stopLoss = atrValue * 1.5
takeProfit = atrValue * 3
strategy.exit("Exit Long", "Long", stop=close - stopLoss, limit=close + takeProfit)
strategy.exit("Exit Short", "Short", stop=close + stopLoss, limit=close - takeProfit)