Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* 3D features for Highcharts JS
*
@@ -19,6 +19,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */
/**
* Mathematical Functionility
*/
@@ -164,6 +165,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */
var cos = Math.cos,
PI = Math.PI,
sin = Math.sin;
@@ -1084,6 +1086,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */
var Chart = H.Chart,
each = H.each,
merge = H.merge,
@@ -1217,18 +1220,10 @@
var defaultOptions = H.getOptions();

/**
* Options to render charts in 3 dimensions.
* This feature requires highcharts-3d.js, found in the download package,
* or online at code.highcharts.com/highcharts-3d.js.
* @optionparent
*/
var extendedOptions = {

/**
* Options regarding the chart area and plot area as well as general
* chart options.
*
*/
chart: {

/**
@@ -3641,6 +3636,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */
var each = H.each,
perspective = H.perspective,
pick = H.pick,
@@ -4027,6 +4023,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */
var deg2rad = H.deg2rad,
each = H.each,
pick = H.pick,
@@ -4315,8 +4312,9 @@
*
* 3. An array of objects with named values. The objects are point
* configuration objects as seen below. If the total number of data
* points exceeds the series' [turboThreshold](#series.scatter3d.turboThreshold),
* this option is not available.
* points exceeds the series'
* [turboThreshold](#series.scatter3d.turboThreshold), this option is not
* available.
*
* ```js
* data: [{
@@ -4336,11 +4334,16 @@
*
* @type {Array<Object|Array>}
* @extends series.scatter.data
* @sample {highcharts} highcharts/chart/reflow-true/ Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/ Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/ Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/ Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/ Config objects
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
* Arrays of numeric x and y
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
* Arrays of datetime x and y
* @sample {highcharts} highcharts/series/data-array-of-name-value/
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
* @product highcharts
* @apioption series.scatter3d.data
*/

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,038 highstock.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,11 +1,11 @@
/*
Highcharts JS v6.0.4 (2017-12-15)
Highcharts JS v6.0.5 (2018-01-31)
Indicator series type for Highstock
(c) 2010-2017 Sebastian Bochan
License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?module.exports=c:c(Highcharts)})(function(c){(function(c){var l=c.seriesType;l("ad","sma",{name:"Accumulation/Distribution",params:{volumeSeriesID:"volume"}},{getValues:function(e,f){var g=f.period,n=e.xData,d=e.yData,b=f.volumeSeriesID,a=e.chart.get(b);e=a&&a.yData;f=d?d.length:0;var h=[],p=[],q=[];if(n.length<=g&&f&&4!==d[0].length)return!1;if(!a)return c.error("Series "+b+" not found! Check `volumeSeriesID`.",!0);for(b=g;b<f;b++){var g=h.length,
a=d[b][1],k=d[b][2],m=d[b][3],l=e[b],a=[n[b],m===a&&m===k||a===k?0:(2*m-k-a)/(a-k)*l];0<g&&(a[1]+=h[g-1][1],a[1]=a[1]);h.push(a);p.push(a[0]);q.push(a[1])}return{values:h,xData:p,yData:q}}})})(c)});
(function(c){"object"===typeof module&&module.exports?module.exports=c:c(Highcharts)})(function(c){(function(c){var l=c.seriesType;l("ad","sma",{params:{volumeSeriesID:"volume"}},{nameComponents:!1,nameBase:"Accumulation/Distribution",getValues:function(e,f){var g=f.period,n=e.xData,d=e.yData,b=f.volumeSeriesID,a=e.chart.get(b);e=a&&a.yData;f=d?d.length:0;var h=[],p=[],q=[];if(n.length<=g&&f&&4!==d[0].length)return!1;if(!a)return c.error("Series "+b+" not found! Check `volumeSeriesID`.",!0);for(b=
g;b<f;b++){var g=h.length,a=d[b][1],k=d[b][2],m=d[b][3],l=e[b],a=[n[b],m===a&&m===k||a===k?0:(2*m-k-a)/(a-k)*l];0<g&&(a[1]+=h[g-1][1],a[1]=a[1]);h.push(a);p.push(a[0]);q.push(a[1])}return{values:h,xData:p,yData:q}}})})(c)});
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -25,7 +25,9 @@
low = yVal[i][2],
close = yVal[i][3],
volume = yValVolume[i],
adY = close === high && close === low || high === low ? 0 : ((2 * close - low - high) / (high - low)) * volume,
adY = close === high && close === low || high === low ?
0 :
((2 * close - low - high) / (high - low)) * volume,
adX = xVal[i];

return [adX, adY];
@@ -39,7 +41,8 @@
*/
seriesType('ad', 'sma',
/**
* Accumulation Distribution (AD). This series requires `linkedTo` option to be set.
* Accumulation Distribution (AD). This series requires `linkedTo` option to
* be set.
*
* @extends {plotOptions.sma}
* @product highstock
@@ -49,7 +52,6 @@
* @optionparent plotOptions.ad
*/
{
name: 'Accumulation/Distribution',
params: {
/**
* The id of volume series which is mandatory.
@@ -63,6 +65,8 @@
volumeSeriesID: 'volume'
}
}, {
nameComponents: false,
nameBase: 'Accumulation/Distribution',
getValues: function(series, params) {
var period = params.period,
xVal = series.xData,
@@ -1,11 +1,11 @@
/*
Highcharts JS v6.0.4 (2017-12-15)
Highcharts JS v6.0.5 (2018-01-31)
Indicator series type for Highstock
(c) 2010-2017 Sebastian Bochan
License: www.highcharts.com/license
*/
(function(b){"object"===typeof module&&module.exports?module.exports=b:b(Highcharts)})(function(b){(function(b){function n(a,d){return Math.max(a[1]-a[2],d===g?0:Math.abs(a[1]-d[3]),d===g?0:Math.abs(a[2]-d[3]))}var r=b.isArray;b=b.seriesType;var g;b("atr","sma",{name:"ATR (14)",params:{period:14}},{getValues:function(a,d){d=d.period;var b=a.xData,g=(a=a.yData)?a.length:0,h=1,f=0,p=0,k=[],l=[],m=[],e,c,q;q=[[b[0],a[0]]];if(b.length<=d||!r(a[0])||4!==a[0].length)return!1;for(c=1;c<=g;c++)if(q.push([b[c],
a[c]]),d<h){e=d;var t=b[c-1],u=n(a[c-1],a[c-2]);e=[t,(f*(e-1)+u)/e];f=e[1];k.push(e);l.push(e[0]);m.push(e[1])}else d===h?(f=p/(c-1),k.push([b[c-1],f]),l.push(b[c-1]),m.push(f)):p+=n(a[c-1],a[c-2]),h++;return{values:k,xData:l,yData:m}}})})(b)});
(function(b){"object"===typeof module&&module.exports?module.exports=b:b(Highcharts)})(function(b){(function(b){function n(a,d){return Math.max(a[1]-a[2],d===g?0:Math.abs(a[1]-d[3]),d===g?0:Math.abs(a[2]-d[3]))}var r=b.isArray;b=b.seriesType;var g;b("atr","sma",{params:{period:14}},{getValues:function(a,d){d=d.period;var b=a.xData,g=(a=a.yData)?a.length:0,h=1,f=0,p=0,k=[],l=[],m=[],e,c,q;q=[[b[0],a[0]]];if(b.length<=d||!r(a[0])||4!==a[0].length)return!1;for(c=1;c<=g;c++)if(q.push([b[c],a[c]]),d<h){e=
d;var t=b[c-1],u=n(a[c-1],a[c-2]);e=[t,(f*(e-1)+u)/e];f=e[1];k.push(e);l.push(e[0]);m.push(e[1])}else d===h?(f=p/(c-1),k.push([b[c-1],f]),l.push(b[c-1]),m.push(f)):p+=n(a[c-1],a[c-2]),h++;return{values:k,xData:l,yData:m}}})})(b)});
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -57,7 +57,8 @@
*/
seriesType('atr', 'sma',
/**
* Average true range indicator (ATR). This series requires `linkedTo` option to be set.
* Average true range indicator (ATR). This series requires `linkedTo`
* option to be set.
*
* @extends {plotOptions.sma}
* @product highstock
@@ -66,7 +67,6 @@
* @optionparent plotOptions.atr
*/
{
name: 'ATR (14)',
params: {
period: 14
}
@@ -90,7 +90,10 @@
[xValue, yValue]
];

if ((xVal.length <= period) || !isArray(yVal[0]) || yVal[0].length !== 4) {
if (
(xVal.length <= period) || !isArray(yVal[0]) ||
yVal[0].length !== 4
) {
return false;
}

@@ -99,7 +102,14 @@
accumulateAverage(points, xVal, yVal, i);

if (period < range) {
point = populateAverage(points, xVal, yVal, i, period, prevATR);
point = populateAverage(
points,
xVal,
yVal,
i,
period,
prevATR
);
prevATR = point[1];
ATR.push(point);
xData.push(point[0]);
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -16,6 +16,7 @@
}
}(function(Highcharts) {
(function(H) {
/* eslint max-len: 0 */


var each = H.each,
@@ -24,14 +25,16 @@
SMA = H.seriesTypes.sma;

// Utils:
function getStandardDeviation(arr, mean) {
function getStandardDeviation(arr, index, isOHLC, mean) {
var variance = 0,
arrLen = arr.length,
std = 0,
i = 0;
i = 0,
value;

for (; i < arrLen; i++) {
variance += (arr[i][3] - mean) * (arr[i][3] - mean);
value = (isOHLC ? arr[i][index] : arr[i]) - mean;
variance += value * value;
}
variance = variance / (arrLen - 1);

@@ -147,6 +150,7 @@
}, /** @lends Highcharts.Series.prototype */ {
pointArrayMap: ['top', 'middle', 'bottom'],
pointValKey: 'middle',
nameComponents: ['period', 'standardDeviation'],
init: function() {
SMA.prototype.init.apply(this, arguments);

@@ -244,26 +248,36 @@
slicedX,
slicedY,
stdDev,
isOHLC,
point,
i;

// BB requires close value
if (xVal.length < period || !isArray(yVal[0]) || yVal[0].length !== 4) {
if (xVal.length < period) {
return false;
}

isOHLC = isArray(yVal[0]);

for (i = period; i <= yValLen; i++) {
slicedX = xVal.slice(i - period, i);
slicedY = yVal.slice(i - period, i);

point = SMA.prototype.getValues.call(this, {
xData: slicedX,
yData: slicedY
}, params);
point = SMA.prototype.getValues.call(
this, {
xData: slicedX,
yData: slicedY
},
params
);

date = point.xData[0];
ML = point.yData[0];
stdDev = getStandardDeviation(slicedY, ML);
stdDev = getStandardDeviation(
slicedY,
params.index,
isOHLC,
ML
);
TL = ML + standardDeviation * stdDev;
BL = ML - standardDeviation * stdDev;

@@ -1,11 +1,11 @@
/*
Highcharts JS v6.0.4 (2017-12-15)
Highcharts JS v6.0.5 (2018-01-31)
Indicator series type for Highstock
(c) 2010-2017 Sebastian Bochan
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?module.exports=a:a(Highcharts)})(function(a){(function(a){function r(c){return a.reduce(c,function(c,a){return c+a},0)}var t=a.isArray,k=a.seriesType;k("cci","sma",{name:"CCI (14)",params:{period:14}},{getValues:function(c,a){a=a.period;var h=c.xData,k=(c=c.yData)?c.length:0,l=[],e,d=1,m=[],n=[],p=[],b,f;if(h.length<=a||!t(c[0])||4!==c[0].length)return!1;for(;d<a;)b=c[d-1],l.push((b[1]+b[2]+b[3])/3),d++;for(d=a;d<=k;d++){b=c[d-1];b=(b[1]+b[2]+
b[3])/3;f=l.push(b);e=l.slice(f-a);f=r(e)/a;var u=e.length,q=0,g;for(g=0;g<u;g++)q+=Math.abs(f-e[g]);e=q/a;b=(b-f)/(.015*e);m.push([h[d-1],b]);n.push(h[d-1]);p.push(b)}return{values:m,xData:n,yData:p}}})})(a)});
(function(a){"object"===typeof module&&module.exports?module.exports=a:a(Highcharts)})(function(a){(function(a){function r(c){return a.reduce(c,function(c,a){return c+a},0)}var t=a.isArray,k=a.seriesType;k("cci","sma",{params:{period:14}},{getValues:function(c,a){a=a.period;var h=c.xData,k=(c=c.yData)?c.length:0,l=[],e,d=1,m=[],n=[],p=[],b,f;if(h.length<=a||!t(c[0])||4!==c[0].length)return!1;for(;d<a;)b=c[d-1],l.push((b[1]+b[2]+b[3])/3),d++;for(d=a;d<=k;d++){b=c[d-1];b=(b[1]+b[2]+b[3])/3;f=l.push(b);
e=l.slice(f-a);f=r(e)/a;var u=e.length,q=0,g;for(g=0;g<u;g++)q+=Math.abs(f-e[g]);e=q/a;b=(b-f)/(.015*e);m.push([h[d-1],b]);n.push(h[d-1]);p.push(b)}return{values:m,xData:n,yData:p}}})})(a)});
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -47,7 +47,8 @@
*/
seriesType('cci', 'sma',
/**
* Commodity Channel Index (CCI). This series requires `linkedTo` option to be set.
* Commodity Channel Index (CCI). This series requires `linkedTo` option to
* be set.
*
* @extends {plotOptions.sma}
* @product highstock
@@ -56,7 +57,6 @@
* @optionparent plotOptions.cci
*/
{
name: 'CCI (14)',
params: {
period: 14
}
@@ -75,7 +75,11 @@
CCIPoint, p, len, smaTP, TPtemp, meanDev, i;

// CCI requires close value
if (xVal.length <= period || !isArray(yVal[0]) || yVal[0].length !== 4) {
if (
xVal.length <= period ||
!isArray(yVal[0]) ||
yVal[0].length !== 4
) {
return false;
}

@@ -1,11 +1,11 @@
/*
Highcharts JS v6.0.4 (2017-12-15)
Highcharts JS v6.0.5 (2018-01-31)
(c) 2010-2017 Highsoft AS
Author: Sebastian Domas
License: www.highcharts.com/license
*/
(function(c){"object"===typeof module&&module.exports?module.exports=c:c(Highcharts)})(function(c){(function(c){c.seriesType("cmf","sma",{name:"Chaikin Money Flow (14)",params:{period:14,volumeSeriesID:"volume"}},{isValid:function(){var d=this.chart,e=this.options,b=this.linkedParent,d=this.volumeSeries||(this.volumeSeries=d.get(e.params.volumeSeriesID)),f=b&&b.yData&&4===b.yData[0].length;return!!(b&&d&&b.xData&&b.xData.length>=e.params.period&&d.xData&&d.xData.length>=e.params.period&&f)},getValues:function(d,
(function(c){"object"===typeof module&&module.exports?module.exports=c:c(Highcharts)})(function(c){(function(c){c.seriesType("cmf","sma",{params:{period:14,volumeSeriesID:"volume"}},{nameBase:"Chaikin Money Flow",isValid:function(){var d=this.chart,e=this.options,b=this.linkedParent,d=this.volumeSeries||(this.volumeSeries=d.get(e.params.volumeSeriesID)),f=b&&b.yData&&4===b.yData[0].length;return!!(b&&d&&b.xData&&b.xData.length>=e.params.period&&d.xData&&d.xData.length>=e.params.period&&f)},getValues:function(d,
e){return this.isValid()?this.getMoneyFlow(d.xData,d.yData,this.volumeSeries.yData,e.period):!1},getMoneyFlow:function(d,e,b,f){function c(b,d){var c=b[1],e=b[2];b=b[3];return null!==d&&null!==c&&null!==e&&null!==b&&c!==e?(b-e-(c-b))/(c-e)*d:(p=a,null)}var r=e.length,h=[],g=0,k=0,m=[],n=[],q=[],a,l,p=-1;if(0<f&&f<=r){for(a=0;a<f;a++)h[a]=c(e[a],b[a]),g+=b[a],k+=h[a];m.push(d[a-1]);n.push(a-p>=f&&0!==g?k/g:null);for(q.push([m[0],n[0]]);a<r;a++)h[a]=c(e[a],b[a]),g-=b[a-f],g+=b[a],k-=h[a-f],k+=h[a],
l=[d[a],a-p>=f?k/g:null],m.push(l[0]),n.push(l[1]),q.push([l[0],l[1]])}return{values:q,xData:m,yData:n}}})})(c)});
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* (c) 2010-2017 Highsoft AS
* Author: Sebastian Domas
@@ -23,6 +23,7 @@
*
* License: www.highcharts.com/license
*/
/* eslint max-len: 0 */


H.seriesType('cmf', 'sma',
@@ -39,7 +40,6 @@
* @optionparent plotOptions.cmf
*/
{
name: 'Chaikin Money Flow (14)',
params: {
period: 14,

@@ -49,6 +49,7 @@
volumeSeriesID: 'volume'
}
}, {
nameBase: 'Chaikin Money Flow',
/**
* Checks if the series and volumeSeries are accessible, number of points.x is longer than period, is series has OHLC data
* @returns {Boolean} true if series is valid and can be computed, otherwise false
@@ -1,11 +1,11 @@
/*
Highcharts JS v6.0.4 (2017-12-15)
Highcharts JS v6.0.5 (2018-01-31)
Indicator series type for Highstock
(c) 2010-2017 Sebastian Bochan
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?module.exports=a:a(Highcharts)})(function(a){(function(a){var q=a.isArray;a=a.seriesType;a("ema","sma",{name:"EMA (14)",params:{index:0,period:14}},{getValues:function(a,g){var b=g.period,h=a.xData,c=a.yData,r=c?c.length:0;a=2/(b+1);var d=0,f=0,n=0,k=[],l=[],m=[],e=-1,p=[];if(h.length<b)return!1;for(q(c[0])&&(e=g.index?g.index:0);f<b;)p.push([h[f],0>e?c[f]:c[f][e]]),n+=0>e?c[f]:c[f][e],f++;g=n/b;for(b=f;b<r;b++)f=0>e?c[b-1]:c[b-1][e],d=[h[b-1],
0===d?g:f*a+d*(1-a)],k.push(d),l.push(d[0]),m.push(d[1]),d=d[1],p.push([h[b],0>e?c[b]:c[b][e]]);c=0>e?c[b-1]:c[b-1][e];d=[h[b-1],0===d?void 0:c*a+d*(1-a)];k.push(d);l.push(d[0]);m.push(d[1]);return{values:k,xData:l,yData:m}}})})(a)});
(function(a){"object"===typeof module&&module.exports?module.exports=a:a(Highcharts)})(function(a){(function(a){var q=a.isArray;a=a.seriesType;a("ema","sma",{params:{index:0,period:14}},{getValues:function(a,g){var b=g.period,h=a.xData,c=a.yData,r=c?c.length:0;a=2/(b+1);var d=0,f=0,n=0,k=[],l=[],m=[],e=-1,p=[];if(h.length<b)return!1;for(q(c[0])&&(e=g.index?g.index:0);f<b;)p.push([h[f],0>e?c[f]:c[f][e]]),n+=0>e?c[f]:c[f][e],f++;g=n/b;for(b=f;b<r;b++)f=0>e?c[b-1]:c[b-1][e],d=[h[b-1],0===d?g:f*a+d*(1-
a)],k.push(d),l.push(d[0]),m.push(d[1]),d=d[1],p.push([h[b],0>e?c[b]:c[b][e]]);c=0>e?c[b-1]:c[b-1][e];d=[h[b-1],0===d?void 0:c*a+d*(1-a)];k.push(d);l.push(d[0]);m.push(d[1]);return{values:k,xData:l,yData:m}}})})(a)});
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -16,6 +16,7 @@
}
}(function(Highcharts) {
(function(H) {
/* eslint max-len: 0 */

var isArray = H.isArray,
seriesType = H.seriesType;
@@ -55,7 +56,6 @@
* @optionparent plotOptions.ema
*/
{
name: 'EMA (14)',
params: {
index: 0,
period: 14

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -16,6 +16,7 @@
}
}(function(Highcharts) {
(function(H) {
/* eslint max-len: 0 */

var UNDEFINED,
seriesType = H.seriesType,
@@ -93,7 +94,6 @@
* @optionparent plotOptions.ikh
*/
{
name: 'IKH (52, 26, 9)',
params: {
period: 26,
/**
@@ -284,6 +284,7 @@
}, {
pointArrayMap: ['tenkanSen', 'kijunSen', 'chikouSpan', 'senkouSpanA', 'senkouSpanB'],
pointValKey: 'tenkanSen',
nameComponents: ['periodSenkouSpanB', 'period', 'periodTenkan'],
init: function() {
SMA.prototype.init.apply(this, arguments);

@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
* @license Highcharts JS v6.0.5 (2018-01-31)
*
* Indicator series type for Highstock
*
@@ -16,8 +16,10 @@
}
}(function(Highcharts) {
(function(H) {
/* eslint max-len: 0 */

var each = H.each,
var pick = H.pick,
each = H.each,
error = H.error,
Series = H.Series,
isArray = H.isArray,
@@ -46,13 +48,15 @@
*/
{
/**
* The series name.
* The name of the series as shown in the legend, tooltip etc. If not
* set, it will be based on a technical indicator type and default
* params.
*
* @type {String}
* @since 6.0.0
* @product highstock
*/
name: 'SMA (14)',
name: undefined,
tooltip: {
/**
* Number of decimals in indicator series.
@@ -95,6 +99,8 @@
series: true,
eventName: 'updatedData'
},
nameComponents: ['period'],
nameSuffixes: [], // e.g. Zig Zag uses extra '%'' in the legend name
calculateOn: 'init',
init: function(chart, options) {
var indicator = this;
@@ -167,6 +173,29 @@

return indicator;
},
getName: function() {
var name = this.name,
params = [];

if (!name) {

each(
this.nameComponents,
function(component, index) {
params.push(
this.options.params[component] +
pick(this.nameSuffixes[index], '')
);
},
this
);

name = (this.nameBase || this.type.toUpperCase()) +
(this.nameComponents ? ' (' + params.join(', ') + ')' : '');
}

return name;
},
getValues: function(series, params) {
var period = params.period,
xVal = series.xData,