Skip to content

Commit 958f0a8

Browse files
spec: add indicator-ema specification (#3654)
## New Specification: `indicator-ema` Related to #3652 --- ### specification.md # indicator-ema: Exponential Moving Average (EMA) Indicator Chart ## Description An Exponential Moving Average (EMA) overlay chart displays price data with one or more EMA lines that give greater weight to recent prices, making them more responsive to new information than simple moving averages. The EMA calculation applies an exponential weighting factor that decreases with each older data point, allowing traders to identify trends faster. This technical indicator is fundamental in trading for spotting trend direction, dynamic support/resistance levels, and crossover signals. ## Applications - Identifying trend direction in stock prices using 50-day and 200-day EMA crossovers (golden cross/death cross signals) - Detecting short-term momentum shifts in cryptocurrency trading using fast EMAs (12, 26 periods) - Generating entry/exit signals when price crosses above or below EMA lines in forex trading ## Data - `date` (datetime) - Trading date or timestamp for each period - `close` (numeric) - Closing price for each period - `ema_short` (numeric) - Short-period EMA value (e.g., 12-day or 26-day) - `ema_long` (numeric) - Long-period EMA value (e.g., 50-day) - Size: 60-200 periods for meaningful trend visualization - Example: Daily stock prices with 12-day and 26-day EMAs over 120 trading days ## Notes - Display the price line prominently (line or candlestick) with EMA lines overlaid - Use distinct colors for each EMA period (e.g., short EMA in blue, long EMA in orange) - EMA lines should be slightly thinner than the price line to avoid visual clutter - Common periods to display: 12, 26 (short-term), 50, 200 (long-term) - Consider highlighting crossover points where short EMA crosses long EMA - Label each EMA line with its period in the legend --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20886474121)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9c63fd9 commit 958f0a8

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# indicator-ema: Exponential Moving Average (EMA) Indicator Chart
2+
3+
## Description
4+
5+
An Exponential Moving Average (EMA) overlay chart displays price data with one or more EMA lines that give greater weight to recent prices, making them more responsive to new information than simple moving averages. The EMA calculation applies an exponential weighting factor that decreases with each older data point, allowing traders to identify trends faster. This technical indicator is fundamental in trading for spotting trend direction, dynamic support/resistance levels, and crossover signals.
6+
7+
## Applications
8+
9+
- Identifying trend direction in stock prices using 50-day and 200-day EMA crossovers (golden cross/death cross signals)
10+
- Detecting short-term momentum shifts in cryptocurrency trading using fast EMAs (12, 26 periods)
11+
- Generating entry/exit signals when price crosses above or below EMA lines in forex trading
12+
13+
## Data
14+
15+
- `date` (datetime) - Trading date or timestamp for each period
16+
- `close` (numeric) - Closing price for each period
17+
- `ema_short` (numeric) - Short-period EMA value (e.g., 12-day or 26-day)
18+
- `ema_long` (numeric) - Long-period EMA value (e.g., 50-day)
19+
- Size: 60-200 periods for meaningful trend visualization
20+
- Example: Daily stock prices with 12-day and 26-day EMAs over 120 trading days
21+
22+
## Notes
23+
24+
- Display the price line prominently (line or candlestick) with EMA lines overlaid
25+
- Use distinct colors for each EMA period (e.g., short EMA in blue, long EMA in orange)
26+
- EMA lines should be slightly thinner than the price line to avoid visual clutter
27+
- Common periods to display: 12, 26 (short-term), 50, 200 (long-term)
28+
- Consider highlighting crossover points where short EMA crosses long EMA
29+
- Label each EMA line with its period in the legend
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Specification-level metadata for indicator-ema
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: indicator-ema
5+
title: Exponential Moving Average (EMA) Indicator Chart
6+
7+
# Specification tracking
8+
created: 2026-01-11T00:09:02Z
9+
updated: null
10+
issue: 3652
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/reference/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- line
18+
- indicator
19+
data_type:
20+
- timeseries
21+
- numeric
22+
domain:
23+
- finance
24+
- trading
25+
features:
26+
- technical-analysis
27+
- overlay
28+
- trend

0 commit comments

Comments
 (0)