Finance
Calculate various types of moving averages (SMA, EMA, WMA, TMA) with trend analysis and trading signals
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/moving-average-calculator' \
-H 'Content-Type: application/json' \
-d '{"dataInput":"Enter your data...\n\nCSV format (with dates):\n2024-01-01,100\n2024-01-02,105\n2024-01-03,102\n\nOr numeric values only:\n100,105,102,98,110,115,108,112","dataFormat":"numeric","movingAverageTypes":"SMA","period":"10","smoothingFactor":"0.2","includeTrendAnalysis":true,"includeSignals":false,"includeComparison":true,"decimalPlaces":"4","dateFormat":"MM/DD/YYYY"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/moving-average-calculator| Name | Type | Required | Description |
|---|---|---|---|
| dataInput | textarea | Yes | — |
| dataFormat | select | Yes | — |
| movingAverageTypes | text | No | Comma-separated types. Available: SMA (Simple), EMA (Exponential), WMA (Weighted), TMA (Triangular) |
| period | number | No | Number of periods for moving average calculation (2-100) |
| smoothingFactor | number | No |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-moving-average-calculator": {
"name": "moving-average-calculator",
"description": "Calculate various types of moving averages (SMA, EMA, WMA, TMA) with trend analysis and trading signals",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=moving-average-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "moving-average-calculator",
"arguments": {
"dataInput": "Enter your data...\n\nCSV format (with dates):\n2024-01-01,100\n2024-01-02,105\n2024-01-03,102\n\nOr numeric values only:\n100,105,102,98,110,115,108,112",
"dataFormat": "numeric",
"movingAverageTypes": "SMA",
"period": "10",
"smoothingFactor": "0.2",
"includeTrendAnalysis": true,
"includeSignals": false,
"includeComparison": true,
"decimalPlaces": "4",
"dateFormat": "MM/DD/YYYY"
}
}
}| Smoothing factor for EMA calculation (0.01-0.99). Calculated as 2/(period+1) if not specified |
| includeTrendAnalysis | checkbox | No | Analyze trends and identify crossovers |
| includeSignals | checkbox | No | Generate buy/sell signals based on moving average crossovers |
| includeComparison | checkbox | No | Show original data alongside moving averages |
| decimalPlaces | number | No | Number of decimal places in results (0-8) |
| dateFormat | select | Yes | — |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Questions or issues? Contact [email protected]