Moving Average Convergence Divergence

Moving Average Convergence Divergence Csharp API Documentation

Moving average convergence divergence (MACD) is a trend-following momentum oscillator that consists of three indicators: (1) a 12 period short-term exponential moving average (EMA) a 26 period long-term EMA and a 9 period EMA signal line. Traders using MACD often look for signal line crossovers, centerline crossovers, and EMA divergences to indicate the momentum and underlying trend of a security`s price.

API Class:
Intrinio.SDK.Api.SecurityApi
Instance Method:
GetSecurityPriceTechnicalsMacd()

Stock Price Code Example

Use my API Key
using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using Intrinio.SDK.Api;
using Intrinio.SDK.Client;
using Intrinio.SDK.Model;
using Newtonsoft.Json;
namespace Example
{
public class GetSecurityPriceTechnicalsMacdExample
{
public static void Main()
{
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
Configuration.Default.AllowRetries = true;
var securityApi = new SecurityApi();
string identifier = "AAPL";
int? fastPeriod = 12;
int? slowPeriod = 26;
int? signalPeriod = 9;
string priceKey = "close";
string startDate = "2018-01-01";
string endDate = "2019-01-01";
int? pageSize = 100;
string nextPage = null;
ApiResponseSecurityMovingAverageConvergenceDivergence result = securityApi.GetSecurityPriceTechnicalsMacd(identifier, fastPeriod, slowPeriod,
        signalPeriod, priceKey, startDate, endDate, pageSize, nextPage);
Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierstringA Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) 
fastPeriodint?The number of observations, per period, to calculate the fast moving Exponential Moving Average for Moving Average Convergence Divergence[optional] [default to 12]  
slowPeriodint?The number of observations, per period, to calculate the slow moving Exponential Moving Average for Moving Average Convergence Divergence[optional] [default to 26]  
signalPeriodint?The number of observations, per period, to calculate the signal line for Moving Average Convergence Divergence[optional] [default to 9]  
priceKeystringThe Stock Price field to use when calculating Moving Average Convergence Divergence[optional] [default to close]  
startDatestringReturn technical indicator values on or after the date[optional]  
endDatestringReturn technical indicator values on or before the date[optional]  
pageSizeint?The number of results to return[optional] [default to 100]  
nextPagestringGets the next page of data from a previous API call[optional]  


Return Type

object
Intrinio.SDK.Model.ApiResponseSecurityMovingAverageConvergenceDivergence

Properties

NameTypeDescription
TechnicalsList 
IndicatorTechnicalIndicatorThe name and symbol of the technical indicator  
SecuritySecuritySummaryThe Security of the Stock Price  
NextPagestringThe token required to request the next page of the data. If null, no further results are available.  
object
Intrinio.SDK.Model.MovingAverageConvergenceDivergenceTechnicalValue

Properties

NameTypeDescription
DateTimeDateTime?The date_time of the observation  
MacdHistogramfloat?The histogram value of the Moving Average Convergence Divergence calculation  
MacdLinefloat?The line value of the Moving Average Convergence Divergence calculation  
SignalLinefloat?The signal line value of the Moving Average Convergence Divergence calculation  
object
Intrinio.SDK.Model.TechnicalIndicator

Properties

NameTypeDescription
NamestringThe name of the Technical Indicator  
SymbolstringThe symbol of the Technical Indicator  
object
Intrinio.SDK.Model.SecuritySummary

Properties

NameTypeDescription
IdstringThe Intrinio ID for Security  
CompanyIdstringThe Intrinio ID for the Company for which the Security is issued  
NamestringThe name of the Security  
CodestringA 2-3 digit code classifying the Security (reference)  
CurrencystringThe currency in which the Security is traded on the exchange  
TickerstringThe common/local ticker of the Security  
CompositeTickerstringThe country-composite ticker of the Security  
FigistringThe OpenFIGI identifier  
CompositeFigistringThe country-composite OpenFIGI identifier  
ShareClassFigistringThe global-composite OpenFIGI identifier  
PrimaryListingbool?If true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange