这是一个基于支撑位和趋势EMA的多头策略。策略通过识别市场趋势和关键支撑位来寻找最佳入场机会,结合ATR动态止损和分段获利来实现风险管理。该策略主要关注价格在上升趋势中回调到支撑位的情况,通过设定合理的风险回报比来提高交易的成功率。
策略使用100周期EMA作为趋势判断指标,当价格位于EMA之上时确认上升趋势。同时计算10个周期的最低价作为短期支撑位,当价格回调到支撑位附近(支撑位+0.5*ATR)时寻找入场机会。入场后采用分段获利方式,在5倍ATR处获利了结50%仓位,剩余仓位在10倍ATR处完全了结,同时设置1倍ATR作为动态止损。每笔交易风险控制在账户总值的3%以内,通过动态计算仓位大小来实现风险管理。
该策略通过结合趋势跟随和支撑位回调建立了一个完整的交易系统,并通过分段获利和动态止损实现了风险管理。策略的核心优势在于其完善的风险控制机制和清晰的交易逻辑,但仍需要在实践中不断优化参数和入场条件,以适应不同的市场环境。建议交易者在实盘使用时先进行充分的回测,并结合市场经验对策略进行个性化调整。
/*backtest
start: 2024-02-22 00:00:00
end: 2024-05-30 00:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Ultra-Profitable SMC Long-Only Strategy", shorttitle="Ultra_Profit_SMC", overlay=true)
// User Inputs
emaTrendLength = input.int(100, title="Trend EMA Length") // Faster EMA to align with aggressive trends
supportLookback = input.int(10, title="Support Lookback Period") // Short-term support zones
atrLength = input.int(14, title="ATR Length")
atrMultiplierSL = input.float(1.0, title="ATR Multiplier for Stop-Loss")
atrMultiplierTP1 = input.float(5.0, title="ATR Multiplier for TP1")
atrMultiplierTP2 = input.float(10.0, title="ATR Multiplier for TP2")
riskPercent = input.float(3.0, title="Risk per Trade (%)", step=0.1)
// Calculate Indicators
emaTrend = ta.ema(close, emaTrendLength) // Trend EMA
supportLevel = ta.lowest(low, supportLookback) // Support Level
atr = ta.atr(atrLength) // ATR
// Entry Conditions
isTrendingUp = close > emaTrend // Price above Trend EMA
nearSupport = close <= supportLevel + (atr * 0.5) // Price near support zone
longCondition = isTrendingUp and nearSupport
// Dynamic Stop-Loss and Take-Profit Levels
longStopLoss = supportLevel - (atr * atrMultiplierSL)
takeProfit1 = close + (atr * atrMultiplierTP1) // Partial Take-Profit at 5x ATR
takeProfit2 = close + (atr * atrMultiplierTP2) // Full Take-Profit at 10x ATR
// Position Sizing
capital = strategy.equity
tradeRisk = riskPercent / 100 * capital
positionSize = tradeRisk / (close - longStopLoss)
// Execute Long Trades
if (longCondition)
strategy.entry("Ultra Long", strategy.long, qty=positionSize)
// Exit Conditions
strategy.exit("Partial Exit", from_entry="Ultra Long", limit=takeProfit1, qty_percent=50) // Exit 50% at TP1
strategy.exit("Full Exit", from_entry="Ultra Long", limit=takeProfit2, qty_percent=100, stop=longStopLoss) // Exit the rest at TP2
// Plot Indicators
plot(emaTrend, color=color.blue, title="Trend EMA")
plot(supportLevel, color=color.green, title="Support Level", linewidth=2)