# MACD Crossover Strategy AI Agent Connect

> Deterministic MACD crossover trend-following strategy with momentum confirmation.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_ytZbI4u0BFSg6trNs4fJeC3rbe4vXGnB3UeeAVoM/ai-agent-connect
- **Tags:** macd, trading-strategy, momentum, trend-following, technical-indicators

## Description

This MCP server provides advanced technical analysis tools for trend-following using the Moving Average Convergence Divergence (MACD) indicator. It identifies early trend reversals by detecting crossovers when the MACD line is below zero for BUY signals and above zero for SELL signals. The strategy includes momentum confirmation via histogram analysis and provides precise risk management parameters including entry prices, stop-loss levels based on ATR, and 3:1 reward-to-risk take-profit targets. Use `calculate_macd_signals` to generate full signal series, `evaluate_signal_quality` to assess trend strength, and `get_volatility_metrics` for risk parameters.

## Tools

### calculate_macd_signals
Generates a complete series of trading signals based on historical price data

### evaluate_signal_quality
Provides a detailed breakdown of the strength and reliability of a specific signal

### get_volatility_metrics
Computes volatility indicators needed for risk management

## Prompt Examples

**Prompt:** 
```
Generate a series of trading signals for these closing prices: [150.2, 151.5, 152.0, 151.8, 153.5, 155.0, 154.5].
```

**Response:** 
```
The analysis shows a BUY signal at the 5th bar with an entry price of 153.5, a stop-loss of 151.8, and a take-profit of 158.6.
```

**Prompt:** 
```
What is the current signal quality for a MACD line of 0.5, previous MACD of 0.2, and a histogram of 0.3 at a price of 100?
```

**Response:** 
```
The signal quality score is 0.85, indicating strong slope strength and low divergence.
```

**Prompt:** 
```
Calculate the volatility metrics for these prices: [10, 12, 11, 13, 15, 14, 16].
```

**Response:** 
```
The ATR is 1.45, with a recent swing high of 16 and a recent swing low of 10.
```

## Frequently Asked Questions

**What triggers a BUY signal?**
A BUY signal is triggered when the MACD line crosses above the Signal line while the MACD is below zero, provided the histogram is increasing.

**How is the stop-loss calculated?**
The stop-loss is determined by taking the greater of the recent price swing or twice the Average True Range (ATR).

**Can I assess the strength of a signal?**
Yes, you can use the `evaluate_signal_quality` tool to get a detailed breakdown of slope strength and divergence scores.
