Skip to content

Commit cb0375f

Browse files
spec: add indicator-macd specification (#3186)
## New Specification: `indicator-macd` Related to #3181 --- ### specification.md # indicator-macd: MACD Technical Indicator Chart ## Description A MACD (Moving Average Convergence Divergence) chart displaying three components: the MACD line, signal line, and histogram. The MACD line represents the difference between 12-day and 26-day exponential moving averages, while the signal line is a 9-day EMA of the MACD. The histogram visualizes the difference between these two lines. This is an essential momentum oscillator for technical analysis, helping traders identify trend direction, momentum strength, and potential buy/sell signals through line crossovers. ## Applications - Analyzing stock price momentum to identify trend reversals and entry/exit points - Generating trading signals for cryptocurrency markets based on MACD/signal line crossovers - Confirming trend strength by observing histogram expansion or contraction ## Data - `date` (datetime) - Trading date or timestamp for each period - `macd` (numeric) - MACD line value (12-day EMA minus 26-day EMA) - `signal` (numeric) - Signal line value (9-day EMA of MACD) - `histogram` (numeric) - Difference between MACD and signal line - Size: 60-200 periods for meaningful pattern recognition - Example: Daily MACD values calculated from stock closing prices over 120 trading days ## Notes - Display histogram as bars with green (positive) and red (negative) colors - Include a zero reference line to highlight crossover signals - MACD and signal lines should use distinct colors (e.g., blue and orange) - Standard parameters are 12, 26, 9 but should be noted in the chart - Typically shown as a separate panel below a price chart, but can stand alone --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20787960256)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fef8d84 commit cb0375f

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# indicator-macd: MACD Technical Indicator Chart
2+
3+
## Description
4+
5+
A MACD (Moving Average Convergence Divergence) chart displaying three components: the MACD line, signal line, and histogram. The MACD line represents the difference between 12-day and 26-day exponential moving averages, while the signal line is a 9-day EMA of the MACD. The histogram visualizes the difference between these two lines. This is an essential momentum oscillator for technical analysis, helping traders identify trend direction, momentum strength, and potential buy/sell signals through line crossovers.
6+
7+
## Applications
8+
9+
- Analyzing stock price momentum to identify trend reversals and entry/exit points
10+
- Generating trading signals for cryptocurrency markets based on MACD/signal line crossovers
11+
- Confirming trend strength by observing histogram expansion or contraction
12+
13+
## Data
14+
15+
- `date` (datetime) - Trading date or timestamp for each period
16+
- `macd` (numeric) - MACD line value (12-day EMA minus 26-day EMA)
17+
- `signal` (numeric) - Signal line value (9-day EMA of MACD)
18+
- `histogram` (numeric) - Difference between MACD and signal line
19+
- Size: 60-200 periods for meaningful pattern recognition
20+
- Example: Daily MACD values calculated from stock closing prices over 120 trading days
21+
22+
## Notes
23+
24+
- Display histogram as bars with green (positive) and red (negative) colors
25+
- Include a zero reference line to highlight crossover signals
26+
- MACD and signal lines should use distinct colors (e.g., blue and orange)
27+
- Standard parameters are 12, 26, 9 but should be noted in the chart
28+
- Typically shown as a separate panel below a price chart, but can stand alone
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Specification-level metadata for indicator-macd
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: indicator-macd
5+
title: MACD Technical Indicator Chart
6+
7+
# Specification tracking
8+
created: 2026-01-07T16:13:17Z
9+
updated: null
10+
issue: 3181
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+
- bar
19+
- indicator
20+
data_type:
21+
- timeseries
22+
- numeric
23+
domain:
24+
- finance
25+
- trading
26+
features:
27+
- technical-analysis
28+
- momentum
29+
- crossover
30+
- multi-component

0 commit comments

Comments
 (0)