// 엘리어트 파동 (간단한 패턴 분석) wave1 = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine) wave3 = (rsiValue > oversold) and (macdLine > signalLine) and (close > upperBB) wave5 = (rsiValue > 70) and (macdLine < signalLine) and (close > smaLongValue) waveA = (rsiValue > overbought) and (macdLine < signalLine) and (close < smaShortValue) waveC = (rsiValue < 30) and (macdLine > signalLine) and (close < lowerBB)
// === LONG ENTRY CONDITION === longCondition = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine) and (close <= lowerBB) and not na(bullishFractal) and (wave1 or wave5)
// === SHORT ENTRY CONDITION === shortCondition = (rsiValue > overbought) and (smaShortValue < smaLongValue) and (macdLine < signalLine) and (close >= upperBB) and not na(bearishFractal) and (waveA or waveC)
// === ALERTS === if (longCondition) alert("LONG_SIGNAL", alert.freq_once_per_bar)
if (shortCondition) alert("SHORT_SIGNAL", alert.freq_once_per_bar)