OPEN-SOURCE SCRIPT
EMA Crossover Signals [LummiCrypto]

Handsome, just turn on the buy and sell alerts.
English Instruction
How to Use the EMA Crossover Signals Indicator
This TradingView Pine Script generates BUY and SELL signals based on the crossover of two Exponential Moving Averages (EMAs) with user-selectable lengths (9, 20, 50, 100, or 200). BUY signals occur when the first EMA crosses above the second EMA, and SELL signals occur when the first EMA crosses below the second EMA. Signals are visualized as tiny green triangles (BUY) below the bar and red triangles (SELL) above the bar. Alerts are set up using alertcondition() for compatibility with Telegram notifications.
1. Add the Script to TradingView
Open TradingView and go to the Pine Editor (bottom of the screen).
Copy and paste the Pine Script into the editor.
Click “Add to Chart” to apply the indicator to your chart.
2. Configure EMA Lengths
Double-click the indicator name (“EMA Crossover Signals”) on the chart to open its settings.
In the settings, select the “First EMA Length” and “Second EMA Length” from the dropdown menus. Options are 9, 20, 50, 100, or 200.
Note: Choose different lengths for the two EMAs (e.g., 9 and 20) to ensure crossovers can occur. Setting both to the same length will prevent signals.
Click “OK” to save the settings.
3. Set Up Alerts in TradingView
Click the “Alert” button (bell icon) at the top of TradingView.
In the alert creation window:
Select “EMA Crossover Signals” as the condition.
Choose either “BUY Signal” or “SELL Signal” from the condition dropdown.
Keep the default message (e.g., “EMA Crossover: BUY Signal at {{close}}”) or customize it if needed.
Set the frequency to “Once Per Bar Close” to avoid duplicate alerts.
Name the alert, e.g., “EMA Buy Alert” or “EMA Sell Alert”.
Repeat the process to create separate alerts for BUY and SELL signals if desired.
Click “Create” to activate the alert.
4. Connect Alerts to Telegram
To send BUY and SELL signals to Telegram, you need to link TradingView alerts to a Telegram bot or channel. Here are the options:
Option 1: Webhook Setup
Create a Telegram bot using BotFather in Telegram and obtain the bot token.
Set up a webhook server (e.g., using Python, Node.js, or a service like Heroku) to receive TradingView alerts and forward them to Telegram.
In the TradingView alert settings, enable “Webhook URL” and enter your server’s URL (e.g., your-server.com/telegram).
Configure your server to send the alert message to Telegram using the Telegram Bot API (e.g., api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=<YourChatID>&text=<AlertMessage>).
Option 2: Third-Party Service
Use a service like Zapier or IFTTT to connect TradingView alerts to Telegram.
Set up a zap with TradingView as the trigger (via webhook) and Telegram as the action to send messages to your chat or channel.
Follow the service’s instructions to link your Telegram bot and specify the destination chat or channel.
Option 3: TradingView’s Telegram Integration (if available)
If TradingView offers direct Telegram integration in your region, follow their official guide to link your Telegram account and configure alerts to send messages directly.
5. Test the Alerts
Create test alerts for both BUY and SELL signals to ensure they work correctly.
Verify that messages (e.g., “EMA Crossover: BUY Signal at 50000”) appear in your Telegram chat or channel.
Check that the signals (green triangles for BUY, red triangles for SELL) appear correctly on the chart.
Инструкция на русском
Как использовать индикатор EMA Crossover Signals
Этот Pine Script для TradingView генерирует сигналы на покупку (BUY) и продажу (SELL) на основе пересечения двух экспоненциальных скользящих средних (EMA) с длинами, выбираемыми пользователем (9, 20, 50, 100 или 200). Сигнал BUY появляется, когда первая EMA пересекает вторую EMA снизу вверх, а сигнал SELL — когда первая EMA пересекает вторую EMA сверху вниз. Сигналы отображаются в виде маленьких зеленых треугольников (BUY) под свечой и красных треугольников (SELL) над свечой. Для уведомлений в Telegram используются alertcondition().
1. Добавление скрипта в TradingView
Откройте TradingView и перейдите в редактор Pine (внизу экрана).
Скопируйте и вставьте Pine Script в редактор.
Нажмите «Добавить на график», чтобы применить индикатор.
2. Настройка длин EMA
Дважды щелкните по названию индикатора («EMA Crossover Signals») на графике, чтобы открыть настройки.
В настройках выберите «First EMA Length» (Длина первой EMA) и «Second EMA Length» (Длина второй EMA) из выпадающих меню. Варианты: 9, 20, 50, 100, 200.
Важно: Выберите разные длины для двух EMA (например, 9 и 20), чтобы сигналы пересечения были возможны. Если выбрать одинаковые длины, сигналы не будут генерироваться.
Нажмите «ОК», чтобы сохранить настройки.
3. Настройка алертов в TradingView
Нажмите на кнопку «Алерт» (значок колокольчика) вверху TradingView.
В окне создания алерта:
Выберите «EMA Crossover Signals» в качестве условия.
Выберите «BUY Signal» или «SELL Signal» из выпадающего списка условий.
Оставьте сообщение по умолчанию (например, «EMA Crossover: BUY Signal at {{close}}») или настройте его по желанию.
Установите частоту «Только при закрытии бара», чтобы избежать дублирования алертов.
Задайте имя алерта, например, «EMA Buy Alert» или «EMA Sell Alert».
Повторите процесс, чтобы создать отдельные алерты для сигналов BUY и SELL, если нужно.
Нажмите «Создать», чтобы активировать алерт.
4. Подключение алертов к Telegram
Чтобы отправлять сигналы BUY и SELL в Telegram, необходимо связать алерты TradingView с ботом или каналом Telegram. Варианты:
Вариант 1: Настройка вебхука
Создайте бота в Telegram с помощью BotFather и получите токен бота.
Настройте сервер вебхука (например, с использованием Python, Node.js или сервиса Heroku), чтобы принимать алерты от TradingView и отправлять их в Telegram.
В настройках алерта TradingView включите «Webhook URL» и укажите URL вашего сервера (например, your-server.com/telegram).
Настройте сервер для отправки сообщений в Telegram через Telegram Bot API (например, api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=<YourChatID>&text=<AlertMessage>).
Вариант 2: Сторонний сервис
Используйте сервисы, такие как Zapier или IFTTT, для связи алертов TradingView с Telegram.
Настройте задачу (zap), где TradingView будет триггером (через вебхук), а Telegram — действием для отправки сообщений в ваш чат или канал.
Следуйте инструкциям сервиса для подключения бота Telegram и указания чата или канала.
Вариант 3: Прямая интеграция TradingView с Telegram (если доступно)
Если TradingView поддерживает прямую интеграцию с Telegram в вашем регионе, следуйте их официальной инструкции для подключения вашего аккаунта Telegram и настройки отправки сообщений.
5. Тестирование алертов
Создайте тестовые алерты для сигналов BUY и SELL, чтобы убедиться, что они работают корректно.
Проверьте, что сообщения (например, «EMA Crossover: BUY Signal at 50000») появляются в вашем чате или канале Telegram.
Убедитесь, что сигналы (зеленые треугольники для BUY, красные треугольники для SELL) корректно отображаются на графике.
English Instruction
How to Use the EMA Crossover Signals Indicator
This TradingView Pine Script generates BUY and SELL signals based on the crossover of two Exponential Moving Averages (EMAs) with user-selectable lengths (9, 20, 50, 100, or 200). BUY signals occur when the first EMA crosses above the second EMA, and SELL signals occur when the first EMA crosses below the second EMA. Signals are visualized as tiny green triangles (BUY) below the bar and red triangles (SELL) above the bar. Alerts are set up using alertcondition() for compatibility with Telegram notifications.
1. Add the Script to TradingView
Open TradingView and go to the Pine Editor (bottom of the screen).
Copy and paste the Pine Script into the editor.
Click “Add to Chart” to apply the indicator to your chart.
2. Configure EMA Lengths
Double-click the indicator name (“EMA Crossover Signals”) on the chart to open its settings.
In the settings, select the “First EMA Length” and “Second EMA Length” from the dropdown menus. Options are 9, 20, 50, 100, or 200.
Note: Choose different lengths for the two EMAs (e.g., 9 and 20) to ensure crossovers can occur. Setting both to the same length will prevent signals.
Click “OK” to save the settings.
3. Set Up Alerts in TradingView
Click the “Alert” button (bell icon) at the top of TradingView.
In the alert creation window:
Select “EMA Crossover Signals” as the condition.
Choose either “BUY Signal” or “SELL Signal” from the condition dropdown.
Keep the default message (e.g., “EMA Crossover: BUY Signal at {{close}}”) or customize it if needed.
Set the frequency to “Once Per Bar Close” to avoid duplicate alerts.
Name the alert, e.g., “EMA Buy Alert” or “EMA Sell Alert”.
Repeat the process to create separate alerts for BUY and SELL signals if desired.
Click “Create” to activate the alert.
4. Connect Alerts to Telegram
To send BUY and SELL signals to Telegram, you need to link TradingView alerts to a Telegram bot or channel. Here are the options:
Option 1: Webhook Setup
Create a Telegram bot using BotFather in Telegram and obtain the bot token.
Set up a webhook server (e.g., using Python, Node.js, or a service like Heroku) to receive TradingView alerts and forward them to Telegram.
In the TradingView alert settings, enable “Webhook URL” and enter your server’s URL (e.g., your-server.com/telegram).
Configure your server to send the alert message to Telegram using the Telegram Bot API (e.g., api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=<YourChatID>&text=<AlertMessage>).
Option 2: Third-Party Service
Use a service like Zapier or IFTTT to connect TradingView alerts to Telegram.
Set up a zap with TradingView as the trigger (via webhook) and Telegram as the action to send messages to your chat or channel.
Follow the service’s instructions to link your Telegram bot and specify the destination chat or channel.
Option 3: TradingView’s Telegram Integration (if available)
If TradingView offers direct Telegram integration in your region, follow their official guide to link your Telegram account and configure alerts to send messages directly.
5. Test the Alerts
Create test alerts for both BUY and SELL signals to ensure they work correctly.
Verify that messages (e.g., “EMA Crossover: BUY Signal at 50000”) appear in your Telegram chat or channel.
Check that the signals (green triangles for BUY, red triangles for SELL) appear correctly on the chart.
Инструкция на русском
Как использовать индикатор EMA Crossover Signals
Этот Pine Script для TradingView генерирует сигналы на покупку (BUY) и продажу (SELL) на основе пересечения двух экспоненциальных скользящих средних (EMA) с длинами, выбираемыми пользователем (9, 20, 50, 100 или 200). Сигнал BUY появляется, когда первая EMA пересекает вторую EMA снизу вверх, а сигнал SELL — когда первая EMA пересекает вторую EMA сверху вниз. Сигналы отображаются в виде маленьких зеленых треугольников (BUY) под свечой и красных треугольников (SELL) над свечой. Для уведомлений в Telegram используются alertcondition().
1. Добавление скрипта в TradingView
Откройте TradingView и перейдите в редактор Pine (внизу экрана).
Скопируйте и вставьте Pine Script в редактор.
Нажмите «Добавить на график», чтобы применить индикатор.
2. Настройка длин EMA
Дважды щелкните по названию индикатора («EMA Crossover Signals») на графике, чтобы открыть настройки.
В настройках выберите «First EMA Length» (Длина первой EMA) и «Second EMA Length» (Длина второй EMA) из выпадающих меню. Варианты: 9, 20, 50, 100, 200.
Важно: Выберите разные длины для двух EMA (например, 9 и 20), чтобы сигналы пересечения были возможны. Если выбрать одинаковые длины, сигналы не будут генерироваться.
Нажмите «ОК», чтобы сохранить настройки.
3. Настройка алертов в TradingView
Нажмите на кнопку «Алерт» (значок колокольчика) вверху TradingView.
В окне создания алерта:
Выберите «EMA Crossover Signals» в качестве условия.
Выберите «BUY Signal» или «SELL Signal» из выпадающего списка условий.
Оставьте сообщение по умолчанию (например, «EMA Crossover: BUY Signal at {{close}}») или настройте его по желанию.
Установите частоту «Только при закрытии бара», чтобы избежать дублирования алертов.
Задайте имя алерта, например, «EMA Buy Alert» или «EMA Sell Alert».
Повторите процесс, чтобы создать отдельные алерты для сигналов BUY и SELL, если нужно.
Нажмите «Создать», чтобы активировать алерт.
4. Подключение алертов к Telegram
Чтобы отправлять сигналы BUY и SELL в Telegram, необходимо связать алерты TradingView с ботом или каналом Telegram. Варианты:
Вариант 1: Настройка вебхука
Создайте бота в Telegram с помощью BotFather и получите токен бота.
Настройте сервер вебхука (например, с использованием Python, Node.js или сервиса Heroku), чтобы принимать алерты от TradingView и отправлять их в Telegram.
В настройках алерта TradingView включите «Webhook URL» и укажите URL вашего сервера (например, your-server.com/telegram).
Настройте сервер для отправки сообщений в Telegram через Telegram Bot API (например, api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=<YourChatID>&text=<AlertMessage>).
Вариант 2: Сторонний сервис
Используйте сервисы, такие как Zapier или IFTTT, для связи алертов TradingView с Telegram.
Настройте задачу (zap), где TradingView будет триггером (через вебхук), а Telegram — действием для отправки сообщений в ваш чат или канал.
Следуйте инструкциям сервиса для подключения бота Telegram и указания чата или канала.
Вариант 3: Прямая интеграция TradingView с Telegram (если доступно)
Если TradingView поддерживает прямую интеграцию с Telegram в вашем регионе, следуйте их официальной инструкции для подключения вашего аккаунта Telegram и настройки отправки сообщений.
5. Тестирование алертов
Создайте тестовые алерты для сигналов BUY и SELL, чтобы убедиться, что они работают корректно.
Проверьте, что сообщения (например, «EMA Crossover: BUY Signal at 50000») появляются в вашем чате или канале Telegram.
Убедитесь, что сигналы (зеленые треугольники для BUY, красные треугольники для SELL) корректно отображаются на графике.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.