
Dies ist eine auf SMMA basierende, zweiseitige Trendverfolgungsstrategie. Die Strategie nutzt die Preise und die Kreuzung von SMMAs, um ein Mehrfachsignal zu erzeugen, und kombiniert ATR-dynamische Stop-Loss- und Fixed-Profit-Ziele, um Risiken und Gewinne zu verwalten. Die Strategie ist einfach und effektiv konzipiert und eignet sich für Trendverfolgungstransaktionen in verschiedenen Zeiträumen.
Der Kern der Strategie besteht darin, Trendänderungen durch die Kreuzung von 17 SMMA-Zyklen mit dem Preis zu erfassen. Wenn der Preis den SMMA überschreitet, wird ein Überschreitungsprozess eröffnet; Wenn der Preis den SMMA überschreitet, wird ein Überschreitungsprozess eröffnet.
Dies ist eine vernünftige Trend-Tracking-Strategie, die durch SMMA-Kreuzung von Trends erfasst wird, die ATR für die Risikokontrolle verwendet wird und die Erträge mit Fixed-Profit-Ziel-Management kombiniert werden. Die Strategie ist klar in der Logik, einfach zu implementieren und hat eine gute Bedienbarkeit und Skalierbarkeit.
/*backtest
start: 2024-02-20 00:00:00
end: 2025-02-17 08:00:00
period: 4h
basePeriod: 4h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("SMMA 17 Crossover Strategy (Long & Short, ATR SL & Fixed TP)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=200)
// 🚀 SMMA Calculation
smmaLength = 17
smma = 0.0
smma := na(smma[1]) ? ta.sma(close, smmaLength) : (smma[1] * (smmaLength - 1) + close) / smmaLength
// 📈 ATR Calculation (For Dynamic Stop-Loss)
atrLength = 14
atr = ta.rma(ta.tr(true), atrLength)
// 🔥 Long Entry Condition
longCondition = ta.crossover(close, smma) // ✅ Price crosses above SMMA
// 🔄 Long Exit Condition
longExit = ta.crossunder(close, smma) // ✅ Price crosses below SMMA
// 📉 ATR-Based Stop-Loss (Dynamic) for Long
longStopLoss = smma - (atr * 0.75) // ✅ Stop Loss below SMMA
// 🏆 Fixed Take Profit for Long (1150 Points)
var float longEntryPrice = na
var float longTakeProfit = na
if longCondition
longEntryPrice := close
longTakeProfit := longEntryPrice + 1150 // ✅ TP 1150 points above entry
// 🔥 Short Entry Condition
shortCondition = ta.crossunder(close, smma) // ✅ Price crosses BELOW SMMA (Short trade)
// 🔄 Short Exit Condition
shortExit = ta.crossover(close, smma) // ✅ Price crosses ABOVE SMMA (Close Short trade)
// 📉 ATR-Based Stop-Loss (Dynamic) for Short
shortStopLoss = smma + (atr * 0.75) // ✅ Stop Loss above SMMA
// 🏆 Fixed Take Profit for Short (1500 Points) - Updated from 2000
var float shortEntryPrice = na
var float shortTakeProfit = na
if shortCondition
shortEntryPrice := close
shortTakeProfit := shortEntryPrice - 1500 // ✅ TP 1500 points below entry (Updated)
// 📊 Plot SMMA (For Visualization)
plot(smma, title="SMMA (17)", color=color.blue)
// 🚀 Long Entry (Allow Multiple)
if longCondition
strategy.entry("Long", strategy.long)
// 🛑 Long Exit Conditions (Whichever Comes First)
strategy.exit("Long TP/SL", from_entry="Long", stop=longStopLoss, limit=longTakeProfit)
if longExit
strategy.close("Long")
// 🚀 Short Entry (Allow Multiple)
if shortCondition
strategy.entry("Short", strategy.short)
// 🛑 Short Exit Conditions (Whichever Comes First)
strategy.exit("Short TP/SL", from_entry="Short", stop=shortStopLoss, limit=shortTakeProfit)
if shortExit
strategy.close("Short")