
Chiến lược này là một hệ thống giao dịch hỗn hợp dựa trên nhiều chỉ số kỹ thuật, kết hợp đường trung bình (EMA), chỉ số tương đối mạnh (RSI) và siêu xu hướng (SuperTrend) để nắm bắt xu hướng thị trường. Chiến lược sử dụng cài đặt tham số cố định, được tối ưu hóa đặc biệt cho chu kỳ thời gian 2 giờ, xác định xu hướng thông qua hệ thống đường trung bình chu kỳ 21/55/200, đồng thời kết hợp RSI (~ 14) bộ lọc động lượng và SuperTrend (~ 3,14) để quản lý rủi ro.
Lập luận cốt lõi của chiến lược được xây dựng trên một khuôn khổ phân tích kỹ thuật đa tầng:
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 thông qua sự kết hợp của nhiều chỉ số kỹ thuật. Ưu điểm của nó là có thể nắm bắt được xu hướng thị trường một cách hiệu quả và tăng độ tin cậy giao dịch thông qua việc lọc nhiều điều kiện. Mặc dù có một số rủi ro vốn có, nhưng có thể cải thiện hiệu suất tổng thể của chiến lược bằng cách tối ưu hóa và cải tiến.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-16 08:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Hybrid Trend Momentum Strategy by Biege ver. 1.0", overlay=true)
// ———— SUPERTREND FIX ————
supertrendWrapper(factor, atrPeriod) =>
[stLine, stDir] = ta.supertrend(factor, atrPeriod)
[stLine, stDir]
// ———— GLOBAL EMA CALCULATIONS ————
fastEMA = ta.ema(close, 21)
slowEMA = ta.ema(close, 55)
trendEMA = ta.ema(close, 200)
atrVal = ta.atr(14)
atrEMA = ta.ema(atrVal, 48)
rsiVal = ta.rsi(close, 14)
rsiEMA = ta.ema(rsiVal, 14)
volumeEMA = ta.ema(volume, 20)
[supertrendLine, supertrendDir] = supertrendWrapper(3, 14)
// ———— TRADE THROTTLING SYSTEM ————
var int lastTradeTime = na
tradeCooldown = input.int(360, "Cooldown (minutes)", minval=60, step=15) * 60 * 1000
// ———— ENHANCED ENTRY CONDITIONS ————
entryCondition =
ta.crossover(fastEMA, slowEMA) and
rsiVal > rsiEMA + 10 and
close > supertrendLine and
close > trendEMA and
volume > volumeEMA * 1.5 and
atrVal > atrEMA and
(na(lastTradeTime) or time - lastTradeTime >= tradeCooldown)
// ———— ULTRA-OPTIMIZED EXIT CONDITIONS ————
exitCondition =
ta.crossunder(fastEMA, slowEMA) or // Main EMA cross remains
ta.crossunder(rsiVal, rsiEMA - 15) or // Increased from -10 to -15 (harder trigger)
ta.crossunder(close, supertrendLine * 0.98) // Changed from 1.01 to 0.98 (2% buffer below)
// ———— TRADE EXECUTION ————
if entryCondition
strategy.entry("Buy", strategy.long)
lastTradeTime := time
if exitCondition
strategy.close("Buy")
// ———— VISUALS ————
plot(fastEMA, "Fast EMA", color.new(#2962FF, 0), 2)
plot(slowEMA, "Slow EMA", color.new(#FF6D00, 0), 2)
plot(trendEMA, "Trend EMA", color.new(#AA00FF, 0), 2)
plot(supertrendLine, "SuperTrend", color.new(#00C853, 0), 2)
plotshape(entryCondition, "Buy", shape.triangleup,
location.belowbar, color.new(#00E676, 0), size=size.small)
plotshape(exitCondition, "Sell", shape.triangledown,
location.abovebar, color.new(#FF1744, 0), size=size.small)