Moving Average Convergence Divergence

Moving Average Convergence Divergence Javascript 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:
SecurityApi
Instance Method:
getSecurityPriceTechnicalsMacd()

Stock Price Code Example

Use my API Key
var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;
var security = new intrinioSDK.SecurityApi();
var identifier = "AAPL";
var opts = {
'fastPeriod': 12,
'slowPeriod': 26,
'signalPeriod': 9,
'priceKey': "close",
'startDate': "2018-01-01",
'endDate': "2019-01-01",
'pageSize': 100,
'nextPage': null
};
security.getSecurityPriceTechnicalsMacd(identifier, opts).then(function(data) {
data = JSON.stringify(data, null, 2)
console.log(data);
}, function(error) {
console.error(error);
});
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringA Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) 
fastPeriodNumberThe number of observations, per period, to calculate the fast moving Exponential Moving Average for Moving Average Convergence Divergence[optional] [default to 12]  
slowPeriodNumberThe number of observations, per period, to calculate the slow moving Exponential Moving Average for Moving Average Convergence Divergence[optional] [default to 26]  
signalPeriodNumberThe 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]  
pageSizeNumberThe number of results to return[optional] [default to 100]  
nextPageStringGets the next page of data from a previous API call[optional]  


Return Type

object
ApiResponseSecurityMovingAverageConvergenceDivergence

Properties

NameTypeDescription
technicals[MovingAverageConvergenceDivergenceTechnicalValue] 
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
MovingAverageConvergenceDivergenceTechnicalValue

Properties

NameTypeDescription
dateTimeDateThe date_time of the observation  
macdHistogramNumberThe histogram value of the Moving Average Convergence Divergence calculation  
macdLineNumberThe line value of the Moving Average Convergence Divergence calculation  
signalLineNumberThe signal line value of the Moving Average Convergence Divergence calculation  
object
TechnicalIndicator

Properties

NameTypeDescription
nameStringThe name of the Technical Indicator  
symbolStringThe symbol of the Technical Indicator  
object
SecuritySummary

Properties

NameTypeDescription
idStringThe Intrinio ID for Security  
companyIdStringThe Intrinio ID for the Company for which the Security is issued  
exchangeStringThe exchange's MIC  
exchangeMicStringThe security's exchange MIC  
stockExchangeIdStringThe exchange's Intrinio ID  
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  
primaryListingBooleanIf true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange