// ✅ 진입 조건 long_condition = ta.crossover(close, high_break) and volume > vol_avg * 1.3 and close > ema50 short_condition = ta.crossunder(close, low_break) and volume > vol_avg * 1.3 and close < ema50
// ✅ 손절 및 익절 설정 long_sl = close - atr_mult * atr_val long_tp = close + (atr_mult * atr_val * risk_reward) short_sl = close + atr_mult * atr_val short_tp = close - (atr_mult * atr_val * risk_reward)
// ✅ 트레이드 실행 if long_condition strategy.entry("Long", strategy.long) strategy.exit("Take Profit", from_entry="Long", limit=long_tp, stop=long_sl)
if short_condition strategy.entry("Short", strategy.short) strategy.exit("Take Profit", from_entry="Short", limit=short_tp, stop=short_sl)