
Đây là một chiến lược giao dịch đa chỉ số phức tạp, kết hợp bốn công cụ phân tích kỹ thuật của chỉ số moving average (EMA), chỉ số tương đối mạnh (RSI), moving average converging divergence (MACD) và Bollinger Bands (Bollinger Bands) nhằm xác định các điểm vào giao dịch tiềm năng thông qua nhiều tín hiệu xác minh. Chiến lược này tập trung vào việc nắm bắt chuyển động giá theo xu hướng và giảm khả năng tín hiệu sai thông qua cơ chế lọc tín hiệu nghiêm ngặt.
Các nguyên tắc cốt lõi của chiến lược được dựa trên phân tích tổng hợp của bốn chỉ số kỹ thuật quan trọng:
Logic nhập học cụ thể bao gồm:
Có nhiều điều kiện:
Điều kiện:
Đây là một chiến lược động lực xu hướng chéo đa tham số có hệ thống hóa cao, được xác minh tổng hợp bằng bốn chỉ số kỹ thuật, nhằm cung cấp tín hiệu giao dịch chính xác và đáng tin cậy hơn. Mặc dù chiến lược có lợi thế rõ rệt, nhưng vẫn cần tối ưu hóa và quản lý rủi ro liên tục.
/*backtest
start: 2024-04-02 00:00:00
end: 2025-04-01 00:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Futures_Binance","currency":"BNB_USDT"}]
*/
//@version=5
strategy("Multi-Indicator Trading Strategy", overlay=true)
// Input variables
len1 = input(50, "EMA 50")
len2 = input(100, "EMA 100")
len3 = input(200, "EMA 200")
rsiLength = input(14, "RSI Length")
rsiOverbought = input(70, "RSI Overbought")
rsiOversold = input(30, "RSI Oversold")
// Indicators
ema50 = ta.ema(close, len1)
ema100 = ta.ema(close, len2)
ema200 = ta.ema(close, len3)
rsi = ta.rsi(close, rsiLength)
[macdLine, signalLine, histLine] = ta.macd(close, 12, 26, 9)
[middle, upper, lower] = ta.bb(close, 20, 2)
// Trading signals
longCondition = ta.crossover(close, ema50) and ema50 > ema100 and ema100 > ema200 and rsi > 50 and rsi < rsiOverbought and macdLine > signalLine
shortCondition = ta.crossunder(close, ema50) and
ema50 < ema100 and
ema100 < ema200 and
rsi < 50 and
rsi > rsiOversold and
macdLine < signalLine
// Plots
plot(ema50, "EMA 50", color.blue)
plot(ema100, "EMA 100", color.yellow)
plot(ema200, "EMA 200", color.red)
plot(upper, "BB Upper", color.gray)
plot(middle, "BB Middle", color.gray)
plot(lower, "BB Lower", color.gray)
// Signals
plotshape(longCondition, "Long", shape.triangleup, location.belowbar, color.green)
plotshape(shortCondition, "Short", shape.triangledown, location.abovebar, color.red)
// Strategy
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)