PROTECTED SOURCE SCRIPT

caracalla ema long short signal v1.0

57
🔍 Script Description
This script is a custom technical analysis indicator for TradingView that identifies potential long (buy) and short (sell) signals based on trend, momentum, and volume.

📌 Moving Averages (EMA)
It calculates four exponential moving averages (EMAs) with periods of 5, 20, 60, and 120. These are used to evaluate the overall market trend.

A bullish trend is identified when the EMAs are aligned in ascending order (short-term EMA above long-term EMA).

A bearish trend is identified when the EMAs are aligned in descending order (short-term EMA below long-term EMA).

🔁 Golden Cross & Dead Cross
A golden cross occurs when the 5-period EMA crosses above the 20-period EMA.

A dead cross occurs when the 5-period EMA crosses below the 20-period EMA.

These crossover events are typical indicators of trend reversals.

📈 MACD (Moving Average Convergence Divergence)
The script uses the standard MACD (12, 26, 9):

A MACD bullish signal is triggered when the MACD line crosses above the signal line.

A MACD bearish signal is triggered when the MACD line crosses below the signal line.

💡 RSI & Stochastic Oscillator
RSI is used to measure momentum; values above 50 suggest bullish momentum, below 50 suggest bearish.

Stochastic (%K and %D) is smoothed and used to identify overbought or oversold conditions.

A bullish momentum signal is triggered when RSI > 50 and the Stochastic %K line crosses above the %D line.

A bearish momentum signal is triggered when RSI < 50 and the %K line crosses below the %D line.

🔊 Volume Conditions
The script calculates a 20-period average volume:

A volume spike (bullish) is when current volume is greater than 120% of the average.

A volume drop (bearish) is when current volume is less than 80% of the average.

✅ Signal Conditions
A long (buy) signal is generated when 3 or more of the following are true:

Bullish EMA alignment

Golden cross

MACD bullish crossover

RSI > 50 and stochastic bullish crossover

Volume spike

A short (sell) signal is generated when 3 or more of the following are true:

Bearish EMA alignment

Dead cross

MACD bearish crossover

RSI < 50 and stochastic bearish crossover

Volume drop

📍 Visual Output
Long signals are shown as green labels with “L” below the price bars.

Short signals are shown as red labels with “S” above the price bars.

All four EMA lines are plotted in different colors for trend visualization.

🔔 Alert Conditions
The script includes built-in alert triggers for both long and short signals. These allow users to be notified when trading conditions are met, without needing to monitor charts constantly.


📌 스크립트 개요
이 인디케이터는 이동평균선, MACD, RSI, 스토캐스틱, 거래량을 종합적으로 분석하여 롱(매수) 또는 숏(매도) 진입 시점을 포착하는 자동 시그널 도구입니다.

📐 이동평균선 (EMA)
총 4개의 EMA(5, 20, 60, 120)를 계산하여 시장의 추세 방향을 파악합니다.

정배열: 단기 EMA가 장기 EMA보다 모두 위에 있는 경우로, 상승 추세로 간주합니다.

역배열: 단기 EMA가 장기 EMA보다 모두 아래에 있는 경우로, 하락 추세로 판단합니다.

🔁 골든크로스 / 데드크로스
골든크로스: EMA5가 EMA20을 위로 돌파할 때 발생 → 상승 신호

데드크로스: EMA5가 EMA20을 아래로 이탈할 때 발생 → 하락 신호

📊 MACD 분석
기본값(12, 26, 9)의 MACD를 사용합니다.

MACD 매수 신호: MACD선이 시그널선 위로 교차할 때

MACD 매도 신호: MACD선이 시그널선 아래로 교차할 때

💡 RSI & 스토캐스틱
RSI(14): 50 이상이면 매수 우위, 50 미만이면 매도 우위로 판단

스토캐스틱: %K와 %D의 골든/데드 크로스를 활용해 추가 모멘텀 분석

매수 모멘텀: RSI > 50 이면서, %K가 %D를 상향 돌파

매도 모멘텀: RSI < 50 이면서, %K가 %D를 하향 이탈

🔊 거래량 조건
20일 평균 거래량을 기준으로 분석

매수 유리: 현재 거래량이 평균보다 1.2배 이상인 경우

매도 유리: 현재 거래량이 평균보다 0.8배 이하인 경우

✅ 매수/매도 시그널 조건
📈 롱 시그널 (매수) 발생 조건
다음 5가지 조건 중 3개 이상 충족 시 발생:

EMA 정배열

골든크로스 발생

MACD 골든크로스

RSI > 50 + 스토캐스틱 골든크로스

거래량 증가

📉 숏 시그널 (매도) 발생 조건
다음 5가지 조건 중 3개 이상 충족 시 발생:

EMA 역배열

데드크로스 발생

MACD 데드크로스

RSI < 50 + 스토캐스틱 데드크로스

거래량 감소

📍 차트 시각화
롱 시그널: 초록색 L 라벨이 캔들 아래 표시

숏 시그널: 빨간색 S 라벨이 캔들 위에 표시

EMA 4개도 각기 다른 색상으로 차트에 표시되어 추세 확인 가능

🔔 알림 기능
시그널 발생 시 자동 알림 설정이 가능합니다.

롱 시그널: "📈 카라칼라 매매: 롱 진입 조건 충족!"

숏 시그널: "📉 카라칼라 매매: 숏 진입 조건 충족!"

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.