Comet C/2025 N1 (ATLAS) Ephemeris☄️ Ephemeris How-To: Plot JPL Horizons Data on TradingView (Educational)
Overview
This open-source Pine Script™ v6 indicator demonstrates how to bring external astronomical ephemeris into TradingView and plot it on a daily chart. Using Comet C/2025 N1 (ATLAS) as an example dataset, it shows the mechanics of structuring arrays, indexing by date, and drawing past and forward ( future projections ) values—strictly as an educational visualization of celestial motion.
Why This Approach
Data is generated from NASA JPL Horizons, a mission-grade, publicly available ephemeris service ( (ssd.jpl.nasa.gov)). On the daily timeframe, Horizons provides high-precision positions you can regenerate whenever solutions update—useful for educational accuracy in exploring orbital data.
What’s Plotted
- Geocentric ecliptic longitude (Earth-view)
- Heliocentric ecliptic longitude (Sun-centered)
- Declination (deg from celestial equator)
Features
- Simple arrays + date indexing (no per-row timestamps)
- Circles for historical/current bars; polylines to connect forward points, emphasizing future projections
- Toggle any series on/off via inputs
- Daily timeframe enforced (runtime error if not 1D)
- Optional table with zodiac conversion (AstroLib by BarefootJoey)
Data & Updates
The example arrays span 2025-07-01 (discovery date) → 2026-01-01. You can refresh them anytime from JPL Horizons (Observer: Geocentric; daily step; include ecliptic lon/lat and declination) and paste the new values into the script.
How we pulled the ephemeris from JPL Horizons (quick guide):
0) Open ssd.jpl.nasa.gov System
1. Ephemeris Type: Observer Table
2. Target Body: C/2025 N1 (ATLAS) (or any object you want)
3. Observer Location: Geocentric
4. Time Specification: set Start, Stop, Step = 1 day
5. Table Settings → Quantities:
* Astrometric RA & Dec
* Heliocentric ecliptic longitude & latitude
* Observer (geocentric) ecliptic longitude & latitude
6. Additional Table Settings:
* Calendar format: Gregorian
* Date/Time: calendar (UTC), Hours & Minutes (HH:MM)
* Angle format: Decimal degrees
* Refraction model: No refraction / airless
* Range units: Astronomical units (au)
7. Generate → Download results (CSV or text).
8. Use AI or a small script to parse columns (e.g., Obs ecliptic lon, Helio ecliptic lon, Declination) into arrays, then paste them into your Pine script.
Educational Note
This indicator’s goal is to show how to prepare and plot ephemeris—so you can adapt the method for other comets or celestial bodies, or swap in data from existing astro libraries, for learning about astronomical projections using JPL daily data.
Credits & License
- Ephemeris: Solar System Dynamics Group, Horizons On-Line Ephemeris System, 4800 Oak Grove Drive, Jet Propulsion Laboratory, Pasadena, CA 91109, USA.
- Zodiac conversion: AstroLib by BarefootJoey
- License: MIT
- For educational use only.