PROTECTED SOURCE SCRIPT
Лунный Индикатор с RSI и Импульсными Алертами

Этот индикатор для TradingView сочетает астрономические данные о фазах Луны с техническим анализом (RSI) для выявления потенциальных импульсных движений на рынках, таких как S&P 500 (SPY) и Bitcoin (BTCUSD). Он основан на исторических корреляциях: повышенная доходность и импульсы вверх вокруг новой Луны, а также рост волатильности и риски падений около полнолуния. Индикатор помогает трейдерам получать алерты о возможных торговых возможностях, фильтруя сигналы через RSI для большей точности.
Ключевые функции:
Расчёт фазы Луны: Использует формулу Julian Day для определения текущей фазы (0% — новая Луна, 50% — полнолуние, 100% — следующая новая). Референс: новая Луна 6 января 2000 г. (JD ≈ 2451550.2597). Длина цикла — 29.530588 дней.
Визуализация:
Линия "Фаза Луны (%)" (синяя) отображает фазу в процентах.
Метки на графике: 🌑 Новая (0-3.3% или >96.7%), 🌓 1-я четверть (21.7-28.3%), 🌕 Полная (46.7-53.3%), 🌗 Последняя четверть (71.7-78.3%).
Линия RSI (оранжевая) для мониторинга перекупленности/перепроданности (период настраивается, по умолчанию 14).
Сигналы и алерты (на основе исторических паттернов):
Новая Луна: Алерты о потенциале импульса вверх, если RSI < 50 (не перекуплено). Исторически: выше доходность для S&P 500 и BTC (bullish реверсы). Фон — зелёный.
Полнолуние: Алерты о рисках волатильности/падения, если RSI > 50 (перекуплено). Исторически: sharp moves для BTC, ниже доходность для S&P. Фон — красный.
Алерты срабатывают на переходах фаз (с помощью ta.change), чтобы избежать повторений.
Настройки:
Период RSI: Изменяйте в input для адаптации под таймфрейм (рекомендуется D1 или H4 для лунных циклов).
Как использовать:
Добавьте индикатор на график SPY или BTCUSD.
Настройте алерты в TradingView для уведомлений.
Тестируйте на исторических данных: проверьте корреляции с реальными движениями цен.
Важно: Это не финансовая рекомендация. Рынки непредсказуемы; комбинируйте с другими инструментами. Точность фазы ±1 день; для идеальной — обновите ref_jd по актуальным данным.
Источник данных: Основан на астрономических формулах и исследованиях корреляций Луны с рынками (например, из JSTOR, SSRN). Разработано для образовательных целей.
Description of the Indicator: Lunar Indicator with RSI and Impulse Alerts
Overview:
This TradingView indicator combines astronomical data on lunar phases with technical analysis (RSI) to identify potential impulse movements in markets like S&P 500 (SPY) and Bitcoin (BTCUSD). It is based on historical correlations: higher returns and upward impulses around the new moon, as well as increased volatility and downside risks near the full moon. The indicator helps traders receive alerts about possible trading opportunities, filtering signals through RSI for greater accuracy.
Key Features:
Lunar Phase Calculation: Uses the Julian Day formula to determine the current phase (0% — new moon, 50% — full moon, 100% — next new moon). Reference: new moon on January 6, 2000 (JD ≈ 2451550.2597). Cycle length — 29.530588 days.
Visualization:
"Moon Phase (%)" line (blue) displays the phase in percentages.
Chart labels: 🌑 New (0-3.3% or >96.7%), 🌓 First Quarter (21.7-28.3%), 🌕 Full (46.7-53.3%), 🌗 Last Quarter (71.7-78.3%).
RSI line (orange) for monitoring overbought/oversold conditions (period adjustable, default 14).
Signals and Alerts (Based on Historical Patterns):
New Moon: Alerts for potential upward impulse if RSI < 50 (not overbought). Historically: higher returns for S&P 500 and BTC (bullish reversals). Background — green.
Full Moon: Alerts for volatility/downside risks if RSI > 50 (overbought). Historically: sharp moves for BTC, lower returns for S&P. Background — red.
Alerts trigger on phase transitions (using ta.change) to avoid repetitions.
Settings:
RSI Period: Adjust in input to adapt to timeframe (recommended D1 or H4 for lunar cycles).
How to Use:
Add the indicator to a SPY or BTCUSD chart.
Set up alerts in TradingView for notifications.
Test on historical data: check correlations with real price movements.
Important: This is not financial advice. Markets are unpredictable; combine with other tools. Phase accuracy ±1 day; for perfection — update ref_jd based on current data.
Data Source: Based on astronomical formulas and studies on lunar correlations with markets (e.g., from JSTOR, SSRN). Developed for educational purposes.
Ключевые функции:
Расчёт фазы Луны: Использует формулу Julian Day для определения текущей фазы (0% — новая Луна, 50% — полнолуние, 100% — следующая новая). Референс: новая Луна 6 января 2000 г. (JD ≈ 2451550.2597). Длина цикла — 29.530588 дней.
Визуализация:
Линия "Фаза Луны (%)" (синяя) отображает фазу в процентах.
Метки на графике: 🌑 Новая (0-3.3% или >96.7%), 🌓 1-я четверть (21.7-28.3%), 🌕 Полная (46.7-53.3%), 🌗 Последняя четверть (71.7-78.3%).
Линия RSI (оранжевая) для мониторинга перекупленности/перепроданности (период настраивается, по умолчанию 14).
Сигналы и алерты (на основе исторических паттернов):
Новая Луна: Алерты о потенциале импульса вверх, если RSI < 50 (не перекуплено). Исторически: выше доходность для S&P 500 и BTC (bullish реверсы). Фон — зелёный.
Полнолуние: Алерты о рисках волатильности/падения, если RSI > 50 (перекуплено). Исторически: sharp moves для BTC, ниже доходность для S&P. Фон — красный.
Алерты срабатывают на переходах фаз (с помощью ta.change), чтобы избежать повторений.
Настройки:
Период RSI: Изменяйте в input для адаптации под таймфрейм (рекомендуется D1 или H4 для лунных циклов).
Как использовать:
Добавьте индикатор на график SPY или BTCUSD.
Настройте алерты в TradingView для уведомлений.
Тестируйте на исторических данных: проверьте корреляции с реальными движениями цен.
Важно: Это не финансовая рекомендация. Рынки непредсказуемы; комбинируйте с другими инструментами. Точность фазы ±1 день; для идеальной — обновите ref_jd по актуальным данным.
Источник данных: Основан на астрономических формулах и исследованиях корреляций Луны с рынками (например, из JSTOR, SSRN). Разработано для образовательных целей.
Description of the Indicator: Lunar Indicator with RSI and Impulse Alerts
Overview:
This TradingView indicator combines astronomical data on lunar phases with technical analysis (RSI) to identify potential impulse movements in markets like S&P 500 (SPY) and Bitcoin (BTCUSD). It is based on historical correlations: higher returns and upward impulses around the new moon, as well as increased volatility and downside risks near the full moon. The indicator helps traders receive alerts about possible trading opportunities, filtering signals through RSI for greater accuracy.
Key Features:
Lunar Phase Calculation: Uses the Julian Day formula to determine the current phase (0% — new moon, 50% — full moon, 100% — next new moon). Reference: new moon on January 6, 2000 (JD ≈ 2451550.2597). Cycle length — 29.530588 days.
Visualization:
"Moon Phase (%)" line (blue) displays the phase in percentages.
Chart labels: 🌑 New (0-3.3% or >96.7%), 🌓 First Quarter (21.7-28.3%), 🌕 Full (46.7-53.3%), 🌗 Last Quarter (71.7-78.3%).
RSI line (orange) for monitoring overbought/oversold conditions (period adjustable, default 14).
Signals and Alerts (Based on Historical Patterns):
New Moon: Alerts for potential upward impulse if RSI < 50 (not overbought). Historically: higher returns for S&P 500 and BTC (bullish reversals). Background — green.
Full Moon: Alerts for volatility/downside risks if RSI > 50 (overbought). Historically: sharp moves for BTC, lower returns for S&P. Background — red.
Alerts trigger on phase transitions (using ta.change) to avoid repetitions.
Settings:
RSI Period: Adjust in input to adapt to timeframe (recommended D1 or H4 for lunar cycles).
How to Use:
Add the indicator to a SPY or BTCUSD chart.
Set up alerts in TradingView for notifications.
Test on historical data: check correlations with real price movements.
Important: This is not financial advice. Markets are unpredictable; combine with other tools. Phase accuracy ±1 day; for perfection — update ref_jd based on current data.
Data Source: Based on astronomical formulas and studies on lunar correlations with markets (e.g., from JSTOR, SSRN). Developed for educational purposes.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.