최초 커밋
This commit is contained in:
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.js
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Daniel Studencki
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/acceleration-bands",["highcharts","highcharts/modules/stock"],function(e){a(e);a.Highcharts=e;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function e(a,b,e,k){a.hasOwnProperty(b)||(a[b]=k.apply(null,e))}a=a?a._modules:{};e(a,"mixins/multipe-lines.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var e=
|
||||
b.defined,k=b.error,w=b.merge,h=a.each,l=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(g){var a=[];h(this.pointArrayMap,function(c){c!==g&&a.push("plot"+c.charAt(0).toUpperCase()+c.slice(1))});return a},toYData:function(g){var a=[];h(this.pointArrayMap,function(c){a.push(g[c])});return a},translate:function(){var g=this,a=g.pointArrayMap,b=[],e;b=g.getTranslatedLinesNames();l.prototype.translate.apply(g,arguments);
|
||||
h(g.points,function(c){h(a,function(a,l){e=c[a];null!==e&&(c[b[l]]=g.yAxis.toPixels(e,!0))})})},drawGraph:function(){var a=this,c=a.linesApiNames,b=a.points,x=b.length,m=a.options,y=a.graph,u={options:{gapSize:m.gapSize}},p=[],v=a.getTranslatedLinesNames(a.pointValKey),n;h(v,function(a,c){for(p[c]=[];x--;)n=b[x],p[c].push({x:n.x,plotX:n.plotX,plotY:n[a],isNull:!e(n[a])});x=b.length});h(c,function(d,c){p[c]?(a.points=p[c],m[d]?a.options=w(m[d].styles,u):k('Error: "There is no '+d+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),
|
||||
a.graph=a["graph"+d],l.prototype.drawGraph.call(a),a["graph"+d]=a.graph):k('Error: "'+d+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=b;a.options=m;a.graph=y;l.prototype.drawGraph.call(a)}}});e(a,"indicators/acceleration-bands.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/multipe-lines.js"]],function(a,b,e){var k=b.correctFloat,w=b.merge;b=b.seriesType;var h=a.seriesTypes.sma;b("abands","sma",{params:{period:20,
|
||||
factor:.001,index:3},lineWidth:1,topLine:{styles:{lineWidth:1}},bottomLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}},w(e,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",nameBase:"Acceleration Bands",nameComponents:["period","factor"],linesApiNames:["topLine","bottomLine"],getValues:function(a,b){var c=b.period,e=b.factor;b=b.index;var g=a.xData,m=(a=a.yData)?a.length:0,l=[],u=[],p=[],v=[],n=[],d;if(!(m<c)){for(d=0;d<=m;d++){if(d<m){var f=a[d][2];var q=a[d][1];var t=
|
||||
e;f=k(q-f)/(k(q+f)/2)*1E3*t;l.push(a[d][1]*k(1+2*f));u.push(a[d][2]*k(1-2*f))}if(d>=c){f=g.slice(d-c,d);var r=a.slice(d-c,d);t=h.prototype.getValues.call(this,{xData:f,yData:l.slice(d-c,d)},{period:c});q=h.prototype.getValues.call(this,{xData:f,yData:u.slice(d-c,d)},{period:c});r=h.prototype.getValues.call(this,{xData:f,yData:r},{period:c,index:b});f=r.xData[0];t=t.yData[0];q=q.yData[0];r=r.yData[0];p.push([f,t,r,q]);v.push(f);n.push([t,r,q])}}return{values:p,xData:v,yData:n}}}}));""});e(a,"masters/indicators/acceleration-bands.src.js",
|
||||
[],function(){})});
|
||||
//# sourceMappingURL=acceleration-bands.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
428
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.src.js
vendored
Normal file
428
AdminPoll/bower_components/highcharts/indicators/acceleration-bands.src.js
vendored
Normal file
@@ -0,0 +1,428 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/acceleration-bands', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/multipe-lines.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var defined = U.defined,
|
||||
error = U.error,
|
||||
merge = U.merge;
|
||||
var each = H.each,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/**
|
||||
* Mixin useful for all indicators that have more than one line.
|
||||
* Merge it with your implementation where you will provide
|
||||
* getValues method appropriate to your indicator and pointArrayMap,
|
||||
* pointValKey, linesApiNames properites. Notice that pointArrayMap
|
||||
* should be consistent with amount of lines calculated in getValues method.
|
||||
*
|
||||
* @private
|
||||
* @mixin multipleLinesMixin
|
||||
*/
|
||||
var multipleLinesMixin = {
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* Lines ids. Required to plot appropriate amount of lines.
|
||||
* Notice that pointArrayMap should have more elements than
|
||||
* linesApiNames, because it contains main line and additional lines ids.
|
||||
* Also it should be consistent with amount of lines calculated in
|
||||
* getValues method from your implementation.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointArrayMap
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
pointArrayMap: ['top', 'bottom'],
|
||||
/**
|
||||
* Main line id.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointValKey
|
||||
* @type {string}
|
||||
*/
|
||||
pointValKey: 'top',
|
||||
/**
|
||||
* Additional lines DOCS names. Elements of linesApiNames array should
|
||||
* be consistent with DOCS line names defined in your implementation.
|
||||
* Notice that linesApiNames should have decreased amount of elements
|
||||
* relative to pointArrayMap (without pointValKey).
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.linesApiNames
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
linesApiNames: ['bottomLine'],
|
||||
/**
|
||||
* Create translatedLines Collection based on pointArrayMap.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.getTranslatedLinesNames
|
||||
* @param {string} [excludedValue]
|
||||
* Main line id
|
||||
* @return {Array<string>}
|
||||
* Returns translated lines names without excluded value.
|
||||
*/
|
||||
getTranslatedLinesNames: function (excludedValue) {
|
||||
var translatedLines = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
if (propertyName !== excludedValue) {
|
||||
translatedLines.push('plot' +
|
||||
propertyName.charAt(0).toUpperCase() +
|
||||
propertyName.slice(1));
|
||||
}
|
||||
});
|
||||
return translatedLines;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @function multipleLinesMixin.toYData
|
||||
* @param {Highcharts.Point} point
|
||||
* Indicator point
|
||||
* @return {Array<number>}
|
||||
* Returns point Y value for all lines
|
||||
*/
|
||||
toYData: function (point) {
|
||||
var pointColl = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
pointColl.push(point[propertyName]);
|
||||
});
|
||||
return pointColl;
|
||||
},
|
||||
/**
|
||||
* Add lines plot pixel values.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.translate
|
||||
* @return {void}
|
||||
*/
|
||||
translate: function () {
|
||||
var indicator = this,
|
||||
pointArrayMap = indicator.pointArrayMap,
|
||||
LinesNames = [],
|
||||
value;
|
||||
LinesNames = indicator.getTranslatedLinesNames();
|
||||
SMA.prototype.translate.apply(indicator, arguments);
|
||||
each(indicator.points, function (point) {
|
||||
each(pointArrayMap, function (propertyName, i) {
|
||||
value = point[propertyName];
|
||||
if (value !== null) {
|
||||
point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Draw main and additional lines.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.drawGraph
|
||||
* @return {void}
|
||||
*/
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
pointValKey = indicator.pointValKey,
|
||||
linesApiNames = indicator.linesApiNames,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
mainLinePath = indicator.graph,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
// additional lines point place holders:
|
||||
secondaryLines = [],
|
||||
secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
|
||||
point;
|
||||
// Generate points for additional lines:
|
||||
each(secondaryLinesNames, function (plotLine, index) {
|
||||
// create additional lines point place holders
|
||||
secondaryLines[index] = [];
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
secondaryLines[index].push({
|
||||
x: point.x,
|
||||
plotX: point.plotX,
|
||||
plotY: point[plotLine],
|
||||
isNull: !defined(point[plotLine])
|
||||
});
|
||||
}
|
||||
pointsLength = mainLinePoints.length;
|
||||
});
|
||||
// Modify options and generate additional lines:
|
||||
each(linesApiNames, function (lineName, i) {
|
||||
if (secondaryLines[i]) {
|
||||
indicator.points = secondaryLines[i];
|
||||
if (mainLineOptions[lineName]) {
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
}
|
||||
else {
|
||||
error('Error: "There is no ' + lineName +
|
||||
' in DOCS options declared. Check if linesApiNames' +
|
||||
' are consistent with your DOCS line names."' +
|
||||
' at mixin/multiple-line.js:34');
|
||||
}
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save lines:
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
else {
|
||||
error('Error: "' + lineName + ' doesn\'t have equivalent ' +
|
||||
'in pointArrayMap. To many elements in linesApiNames ' +
|
||||
'relative to pointArrayMap."');
|
||||
}
|
||||
});
|
||||
// Restore options and draw a main line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
};
|
||||
|
||||
return multipleLinesMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/acceleration-bands.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/multipe-lines.js']], function (H, U, multipleLinesMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
merge = U.merge,
|
||||
seriesType = U.seriesType;
|
||||
var SMA = H.seriesTypes.sma;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getBaseForBand(low, high, factor) {
|
||||
return (((correctFloat(high - low)) /
|
||||
((correctFloat(high + low)) / 2)) * 1000) * factor;
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getPointUB(high, base) {
|
||||
return high * (correctFloat(1 + 2 * base));
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getPointLB(low, base) {
|
||||
return low * (correctFloat(1 - 2 * base));
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The ABands series type
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.abands
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('abands', 'sma',
|
||||
/**
|
||||
* Acceleration bands (ABANDS). This series requires the `linkedTo` option
|
||||
* to be set and should be loaded after the
|
||||
* `stock/indicators/indicators.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/acceleration-bands
|
||||
* Acceleration Bands
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @mixes Highcharts.MultipleLinesMixin
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking,
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/acceleration-bands
|
||||
* @optionparent plotOptions.abands
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 20,
|
||||
/**
|
||||
* The algorithms factor value used to calculate bands.
|
||||
*
|
||||
* @product highstock
|
||||
*/
|
||||
factor: 0.001,
|
||||
index: 3
|
||||
},
|
||||
lineWidth: 1,
|
||||
topLine: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1
|
||||
}
|
||||
},
|
||||
bottomLine: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1
|
||||
}
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'averages'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
merge(multipleLinesMixin, {
|
||||
pointArrayMap: ['top', 'middle', 'bottom'],
|
||||
pointValKey: 'middle',
|
||||
nameBase: 'Acceleration Bands',
|
||||
nameComponents: ['period', 'factor'],
|
||||
linesApiNames: ['topLine', 'bottomLine'],
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
factor = params.factor,
|
||||
index = params.index,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
// Upperbands
|
||||
UB = [],
|
||||
// Lowerbands
|
||||
LB = [],
|
||||
// ABANDS array structure:
|
||||
// 0-date, 1-top line, 2-middle line, 3-bottom line
|
||||
ABANDS = [],
|
||||
// middle line, top line and bottom line
|
||||
ML,
|
||||
TL,
|
||||
BL,
|
||||
date,
|
||||
bandBase,
|
||||
pointSMA,
|
||||
ubSMA,
|
||||
lbSMA,
|
||||
low = 2,
|
||||
high = 1,
|
||||
xData = [],
|
||||
yData = [],
|
||||
slicedX,
|
||||
slicedY,
|
||||
i;
|
||||
if (yValLen < period) {
|
||||
return;
|
||||
}
|
||||
for (i = 0; i <= yValLen; i++) {
|
||||
// Get UB and LB values of every point. This condition
|
||||
// is necessary, because there is a need to calculate current
|
||||
// UB nad LB values simultaneously with given period SMA
|
||||
// in one for loop.
|
||||
if (i < yValLen) {
|
||||
bandBase = getBaseForBand(yVal[i][low], yVal[i][high], factor);
|
||||
UB.push(getPointUB(yVal[i][high], bandBase));
|
||||
LB.push(getPointLB(yVal[i][low], bandBase));
|
||||
}
|
||||
if (i >= period) {
|
||||
slicedX = xVal.slice(i - period, i);
|
||||
slicedY = yVal.slice(i - period, i);
|
||||
ubSMA = SMA.prototype.getValues.call(this, {
|
||||
xData: slicedX,
|
||||
yData: UB.slice(i - period, i)
|
||||
}, {
|
||||
period: period
|
||||
});
|
||||
lbSMA = SMA.prototype.getValues.call(this, {
|
||||
xData: slicedX,
|
||||
yData: LB.slice(i - period, i)
|
||||
}, {
|
||||
period: period
|
||||
});
|
||||
pointSMA = SMA.prototype.getValues.call(this, {
|
||||
xData: slicedX,
|
||||
yData: slicedY
|
||||
}, {
|
||||
period: period,
|
||||
index: index
|
||||
});
|
||||
date = pointSMA.xData[0];
|
||||
TL = ubSMA.yData[0];
|
||||
BL = lbSMA.yData[0];
|
||||
ML = pointSMA.yData[0];
|
||||
ABANDS.push([date, TL, ML, BL]);
|
||||
xData.push(date);
|
||||
yData.push([TL, ML, BL]);
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: ABANDS,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* An Acceleration bands indicator. If the [type](#series.abands.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.abands
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
|
||||
* joinBy, keys, navigatorOptions, pointInterval,
|
||||
* pointIntervalUnit, pointPlacement, pointRange, pointStart,
|
||||
* stacking, showInNavigator,
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/acceleration-bands
|
||||
* @apioption series.abands
|
||||
*/
|
||||
''; // to include the above in jsdoc
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/acceleration-bands.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/accumulation-distribution",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,c,k,f){a.hasOwnProperty(c)||(a[c]=f.apply(null,k))}a=a?a._modules:{};c(a,"indicators/accumulation-distribution.src.js",[a["parts/Utilities.js"]],function(a){var c=
|
||||
a.error;a=a.seriesType;a("ad","sma",{params:{volumeSeriesID:"volume"}},{nameComponents:!1,nameBase:"Accumulation/Distribution",getValues:function(a,f){var d=f.period,m=a.xData,g=a.yData,b=f.volumeSeriesID,e=a.chart.get(b);f=e&&e.yData;var n=g?g.length:0,h=[],p=[],q=[];if(!(m.length<=d&&n&&4!==g[0].length)){if(e){for(;d<n;d++){a=h.length;b=g[d][1];e=g[d][2];var l=g[d][3],k=f[d];b=[m[d],l===b&&l===e||b===e?0:(2*l-e-b)/(b-e)*k];0<a&&(b[1]+=h[a-1][1]);h.push(b);p.push(b[0]);q.push(b[1])}return{values:h,
|
||||
xData:p,yData:q}}c("Series "+b+" not found! Check `volumeSeriesID`.",!0,a.chart)}}});""});c(a,"masters/indicators/accumulation-distribution.src.js",[],function(){})});
|
||||
//# sourceMappingURL=accumulation-distribution.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accumulation-distribution.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,iDAAP,CAA0D,CAAC,YAAD,CAAe,0BAAf,CAA1D,CAAsG,QAAS,CAACE,CAAD,CAAa,CACxHL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAHiH,CAA5H,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,CAD1CI,CAAAA,CAAWT,CAAA,CAAaA,CAAAS,SAAb,CAAmC,EAMlDP,EAAA,CAAgBO,CAAhB,CAA0B,6CAA1B,CAAyE,CAACA,CAAA,CAAS,oBAAT,CAAD,CAAzE,CAA2G,QAAS,CAACC,CAAD,CAAI,CAAA,IAOhHC;AAAQD,CAAAC,MAASC,EAAAA,CAAaF,CAAAE,WAsBlCA,EAAA,CAAW,IAAX,CAAiB,KAAjB,CAeA,CACIC,OAAQ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,CAFmDI,EAE3CF,CACzC,CA+DW,EAAV,CAAIJ,CAAJ,GACIO,CAAA,CAAQ,CAAR,CADJ,EACkBT,CAAA,CAAGE,CAAH,CAAS,CAAT,CAAA,CAAY,CAAZ,CADlB,CAGAF,EAAAU,KAAA,CAAQD,CAAR,CACAlB,EAAAmB,KAAA,CAAWD,CAAA,CAAQ,CAAR,CAAX,CACAhB,EAAAiB,KAAA,CAAWD,CAAA,CAAQ,CAAR,CAAX,CAR+B,CAUnC,MAAO,CACHE,OAAQX,CADL;AAEHT,MAAOA,CAFJ,CAGHE,MAAOA,CAHJ,CAlBP,CACIZ,CAAA,CAAM,SAAN,CACIG,CADJ,CAEI,qCAFJ,CAE2C,CAAA,CAF3C,CAEiDI,CAAAO,MAFjD,CANJ,CAFiC,CAHzC,CA9BA,CA6EA,GA1GoH,CAAxH,CA6GAvB,EAAA,CAAgBO,CAAhB,CAA0B,qDAA1B,CAAiF,EAAjF,CAAqF,QAAS,EAAG,EAAjG,CApHoB,CAbvB;","sources":["accumulation-distribution.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","error","seriesType","params","volumeSeriesID","nameComponents","nameBase","getValues","series","period","xVal","xData","yVal","yData","volumeSeries","chart","get","yValVolume","yValLen","length","AD","i","len","high","low","close","volume","adX","adY","ADPoint","push","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
162
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.src.js
vendored
Normal file
162
AdminPoll/bower_components/highcharts/indicators/accumulation-distribution.src.js
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/accumulation-distribution', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/accumulation-distribution.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
* */
|
||||
var error = U.error,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils:
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function populateAverage(xVal, yVal, yValVolume, i) {
|
||||
var high = yVal[i][1],
|
||||
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,
|
||||
adX = xVal[i];
|
||||
return [adX, adY];
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The AD series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.ad
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('ad', 'sma',
|
||||
/**
|
||||
* Accumulation Distribution (AD). This series requires `linkedTo` option to
|
||||
* be set.
|
||||
*
|
||||
* @sample stock/indicators/accumulation-distribution
|
||||
* Accumulation/Distribution indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/accumulation-distribution
|
||||
* @optionparent plotOptions.ad
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
/**
|
||||
* The id of volume series which is mandatory.
|
||||
* For example using OHLC data, volumeSeriesID='volume' means
|
||||
* the indicator will be calculated using OHLC and volume values.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
volumeSeriesID: 'volume'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameComponents: false,
|
||||
nameBase: 'Accumulation/Distribution',
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
volumeSeriesID = params.volumeSeriesID,
|
||||
volumeSeries = series.chart.get(volumeSeriesID),
|
||||
yValVolume = volumeSeries && volumeSeries.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
AD = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
len,
|
||||
i,
|
||||
ADPoint;
|
||||
if (xVal.length <= period &&
|
||||
yValLen &&
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
if (!volumeSeries) {
|
||||
error('Series ' +
|
||||
volumeSeriesID +
|
||||
' not found! Check `volumeSeriesID`.', true, series.chart);
|
||||
return;
|
||||
}
|
||||
// i = period <-- skip first N-points
|
||||
// Calculate value one-by-one for each period in visible data
|
||||
for (i = period; i < yValLen; i++) {
|
||||
len = AD.length;
|
||||
ADPoint = populateAverage(xVal, yVal, yValVolume, i, period);
|
||||
if (len > 0) {
|
||||
ADPoint[1] += AD[len - 1][1];
|
||||
}
|
||||
AD.push(ADPoint);
|
||||
xData.push(ADPoint[0]);
|
||||
yData.push(ADPoint[1]);
|
||||
}
|
||||
return {
|
||||
values: AD,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `AD` series. If the [type](#series.ad.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ad
|
||||
* @since 6.0.0
|
||||
* @excluding dataParser, dataURL
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/accumulation-distribution
|
||||
* @apioption series.ad
|
||||
*/
|
||||
''; // add doclet above to transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/accumulation-distribution.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/ao.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ao.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
14
AdminPoll/bower_components/highcharts/indicators/ao.js
vendored
Normal file
14
AdminPoll/bower_components/highcharts/indicators/ao.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/ao",["highcharts","highcharts/modules/stock"],function(e){a(e);a.Highcharts=e;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function e(a,g,h,e){a.hasOwnProperty(g)||(a[g]=e.apply(null,h))}a=a?a._modules:{};e(a,"indicators/ao.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,g){var h=g.correctFloat,
|
||||
e=g.isArray;g=g.seriesType;g("ao","sma",{greaterBarColor:"#06B535",lowerBarColor:"#F21313",threshold:0,groupPadding:.2,pointPadding:.2,states:{hover:{halo:{size:0}}}},{nameBase:"AO",nameComponents:!1,markerAttribs:a.noop,getColumnMetrics:a.seriesTypes.column.prototype.getColumnMetrics,crispCol:a.seriesTypes.column.prototype.crispCol,translate:a.seriesTypes.column.prototype.translate,drawPoints:a.seriesTypes.column.prototype.drawPoints,drawGraph:function(){var a=this.options,f=this.points,e=a.greaterBarColor;
|
||||
a=a.lowerBarColor;var c=f[0];if(!this.userOptions.color&&c)for(c.color=e,c=1;c<f.length;c++)f[c].color=f[c].y>f[c-1].y?e:f[c].y<f[c-1].y?a:f[c-1].color},getValues:function(a){var f=a.xData||[];a=a.yData||[];var g=a.length,c=[],n=[],p=[],k=0,l=0,b;if(!(34>=f.length)&&e(a[0])&&4===a[0].length){for(b=0;33>b;b++){var d=(a[b][1]+a[b][2])/2;29<=b&&(k=h(k+d));l=h(l+d)}for(b=33;b<g;b++){d=(a[b][1]+a[b][2])/2;k=h(k+d);l=h(l+d);d=k/5;var m=l/34;d=h(d-m);c.push([f[b],d]);n.push(f[b]);p.push(d);d=b+1-5;m=b+1-
|
||||
34;k=h(k-(a[d][1]+a[d][2])/2);l=h(l-(a[m][1]+a[m][2])/2)}return{values:c,xData:n,yData:p}}}});""});e(a,"masters/indicators/ao.src.js",[],function(){})});
|
||||
//# sourceMappingURL=ao.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/ao.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/ao.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ao.js.map","lineCount":13,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,0BAAP,CAAmC,CAAC,YAAD,CAAe,0BAAf,CAAnC,CAA+E,QAAS,CAACE,CAAD,CAAa,CACjGL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH0F,CAArG,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CAACD,CAAD,CAAa,CAEpBE,QAASA,EAAe,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAkBC,CAAlB,CAAsB,CACrCH,CAAAI,eAAA,CAAmBH,CAAnB,CAAL,GACID,CAAA,CAAIC,CAAJ,CADJ,CACgBE,CAAAE,MAAA,CAAS,IAAT,CAAeH,CAAf,CADhB,CAD0C,C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","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","H","U","correctFloat","isArray","seriesType","greaterBarColor","lowerBarColor","threshold","groupPadding","pointPadding","states","hover","halo","size","nameBase","nameComponents","markerAttribs","noop","getColumnMetrics","seriesTypes","column","prototype","crispCol","translate","drawPoints","drawGraph","options","indicator","points","positiveColor","negativeColor","firstPoint","userOptions","color","i","length","y","getValues","series","xVal","xData","yVal","yData","yValLen","AO","shortSum","longSum","longPeriod","price","high","low","j","shortSMA","shortPeriod","longSMA","awesome","push","shortLastIndex","longLastIndex","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/ao.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ao.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
222
AdminPoll/bower_components/highcharts/indicators/ao.src.js
vendored
Normal file
222
AdminPoll/bower_components/highcharts/indicators/ao.src.js
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/ao', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/ao.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
var noop = H.noop;
|
||||
/**
|
||||
* The AO series type
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.ao
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('ao', 'sma',
|
||||
/**
|
||||
* Awesome Oscillator. This series requires the `linkedTo` option to
|
||||
* be set and should be loaded after the `stock/indicators/indicators.js`
|
||||
*
|
||||
* @sample {highstock} stock/indicators/ao
|
||||
* Awesome
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, joinBy, keys, navigatorOptions,
|
||||
* params, pointInterval, pointIntervalUnit, pointPlacement,
|
||||
* pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ao
|
||||
* @optionparent plotOptions.ao
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Color of the Awesome oscillator series bar that is greater than the
|
||||
* previous one. Note that if a `color` is defined, the `color`
|
||||
* takes precedence and the `greaterBarColor` is ignored.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/ao/
|
||||
* greaterBarColor
|
||||
*
|
||||
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
||||
* @since 7.0.0
|
||||
*/
|
||||
greaterBarColor: '#06B535',
|
||||
/**
|
||||
* Color of the Awesome oscillator series bar that is lower than the
|
||||
* previous one. Note that if a `color` is defined, the `color`
|
||||
* takes precedence and the `lowerBarColor` is ignored.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/ao/
|
||||
* lowerBarColor
|
||||
*
|
||||
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
||||
* @since 7.0.0
|
||||
*/
|
||||
lowerBarColor: '#F21313',
|
||||
threshold: 0,
|
||||
groupPadding: 0.2,
|
||||
pointPadding: 0.2,
|
||||
states: {
|
||||
hover: {
|
||||
halo: {
|
||||
size: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameBase: 'AO',
|
||||
nameComponents: false,
|
||||
// Columns support:
|
||||
markerAttribs: noop,
|
||||
getColumnMetrics: H.seriesTypes.column.prototype.getColumnMetrics,
|
||||
crispCol: H.seriesTypes.column.prototype.crispCol,
|
||||
translate: H.seriesTypes.column.prototype.translate,
|
||||
drawPoints: H.seriesTypes.column.prototype.drawPoints,
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
options = indicator.options,
|
||||
points = indicator.points,
|
||||
userColor = indicator.userOptions.color,
|
||||
positiveColor = options.greaterBarColor,
|
||||
negativeColor = options.lowerBarColor,
|
||||
firstPoint = points[0],
|
||||
i;
|
||||
if (!userColor && firstPoint) {
|
||||
firstPoint.color = positiveColor;
|
||||
for (i = 1; i < points.length; i++) {
|
||||
if (points[i].y > points[i - 1].y) {
|
||||
points[i].color = positiveColor;
|
||||
}
|
||||
else if (points[i].y < points[i - 1].y) {
|
||||
points[i].color = negativeColor;
|
||||
}
|
||||
else {
|
||||
points[i].color = points[i - 1].color;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getValues: function (series) {
|
||||
var shortPeriod = 5,
|
||||
longPeriod = 34,
|
||||
xVal = series.xData || [],
|
||||
yVal = series.yData || [],
|
||||
yValLen = yVal.length,
|
||||
AO = [], // 0- date, 1- Awesome Oscillator
|
||||
xData = [],
|
||||
yData = [],
|
||||
high = 1,
|
||||
low = 2,
|
||||
shortSum = 0,
|
||||
longSum = 0,
|
||||
shortSMA, // Shorter Period SMA
|
||||
longSMA, // Longer Period SMA
|
||||
awesome,
|
||||
shortLastIndex,
|
||||
longLastIndex,
|
||||
price,
|
||||
i,
|
||||
j;
|
||||
if (xVal.length <= longPeriod ||
|
||||
!isArray(yVal[0]) ||
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < longPeriod - 1; i++) {
|
||||
price = (yVal[i][high] + yVal[i][low]) / 2;
|
||||
if (i >= longPeriod - shortPeriod) {
|
||||
shortSum = correctFloat(shortSum + price);
|
||||
}
|
||||
longSum = correctFloat(longSum + price);
|
||||
}
|
||||
for (j = longPeriod - 1; j < yValLen; j++) {
|
||||
price = (yVal[j][high] + yVal[j][low]) / 2;
|
||||
shortSum = correctFloat(shortSum + price);
|
||||
longSum = correctFloat(longSum + price);
|
||||
shortSMA = shortSum / shortPeriod;
|
||||
longSMA = longSum / longPeriod;
|
||||
awesome = correctFloat(shortSMA - longSMA);
|
||||
AO.push([xVal[j], awesome]);
|
||||
xData.push(xVal[j]);
|
||||
yData.push(awesome);
|
||||
shortLastIndex = j + 1 - shortPeriod;
|
||||
longLastIndex = j + 1 - longPeriod;
|
||||
shortSum = correctFloat(shortSum -
|
||||
(yVal[shortLastIndex][high] +
|
||||
yVal[shortLastIndex][low]) / 2);
|
||||
longSum = correctFloat(longSum -
|
||||
(yVal[longLastIndex][high] +
|
||||
yVal[longLastIndex][low]) / 2);
|
||||
}
|
||||
return {
|
||||
values: AO,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* An `AO` series. If the [type](#series.ao.type)
|
||||
* option is not specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ao
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, dataParser, dataURL, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ao
|
||||
* @apioption series.ao
|
||||
*/
|
||||
''; // for including the above in the doclets
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/ao.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/apo.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/apo.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
14
AdminPoll/bower_components/highcharts/indicators/apo.js
vendored
Normal file
14
AdminPoll/bower_components/highcharts/indicators/apo.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/apo",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,c,m,f){a.hasOwnProperty(c)||(a[c]=f.apply(null,m))}a=a?a._modules:{};b(a,"mixins/indicator-required.js",[a["parts/Utilities.js"]],function(a){var c=a.error;return{isParentLoaded:function(a,
|
||||
f,b,d,n){if(a)return d?d(a):!0;c(n||this.generateMessage(b,f));return!1},generateMessage:function(a,c){return'Error: "'+a+'" indicator type requires "'+c+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+a}}});b(a,"indicators/apo.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/indicator-required.js"]],function(a,c,b){var f=c.error;c=c.seriesType;var h=a.seriesTypes.ema;c("apo","ema",{params:{periods:[10,20]}},{nameBase:"APO",nameComponents:["periods"],
|
||||
init:function(){var a=arguments,c=this;b.isParentLoaded(h,"ema",c.type,function(d){d.prototype.init.apply(c,a)})},getValues:function(a,c){var b=c.periods,g=c.index;c=[];var d=[],k=[],e;if(2!==b.length||b[1]<=b[0])f('Error: "APO requires two periods. Notice, first period should be lower than the second one."');else{var l=h.prototype.getValues.call(this,a,{index:g,period:b[0]});a=h.prototype.getValues.call(this,a,{index:g,period:b[1]});if(l&&a){b=b[1]-b[0];for(e=0;e<a.yData.length;e++)g=l.yData[e+b]-
|
||||
a.yData[e],c.push([a.xData[e],g]),d.push(a.xData[e]),k.push(g);return{values:c,xData:d,yData:k}}}}});""});b(a,"masters/indicators/apo.src.js",[],function(){})});
|
||||
//# sourceMappingURL=apo.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/apo.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/apo.js.map
vendored
Normal file
@@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"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","error","requiredIndicatorMixin","isParentLoaded","indicator","requiredIndicator","type","callback","errMessage","generateMessage","indicatorType","required","H","seriesType","EMA","seriesTypes","ema","params","periods","nameBase","nameComponents","init","arguments","ctx","prototype","getValues","series","index","APO","xData","yData","i","length","SPE","call","period","LPE","periodsOffset","oscillator","push","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/apo.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/apo.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
235
AdminPoll/bower_components/highcharts/indicators/apo.src.js
vendored
Normal file
235
AdminPoll/bower_components/highcharts/indicators/apo.src.js
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/apo', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/indicator-required.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error;
|
||||
/* eslint-disable no-invalid-this, valid-jsdoc */
|
||||
var requiredIndicatorMixin = {
|
||||
/**
|
||||
* Check whether given indicator is loaded,
|
||||
else throw error.
|
||||
* @private
|
||||
* @param {Highcharts.Indicator} indicator
|
||||
* Indicator constructor function.
|
||||
* @param {string} requiredIndicator
|
||||
* Required indicator type.
|
||||
* @param {string} type
|
||||
* Type of indicator where function was called (parent).
|
||||
* @param {Highcharts.IndicatorCallbackFunction} callback
|
||||
* Callback which is triggered if the given indicator is loaded.
|
||||
* Takes indicator as an argument.
|
||||
* @param {string} errMessage
|
||||
* Error message that will be logged in console.
|
||||
* @return {boolean}
|
||||
* Returns false when there is no required indicator loaded.
|
||||
*/
|
||||
isParentLoaded: function (indicator,
|
||||
requiredIndicator,
|
||||
type,
|
||||
callback,
|
||||
errMessage) {
|
||||
if (indicator) {
|
||||
return callback ? callback(indicator) : true;
|
||||
}
|
||||
error(errMessage || this.generateMessage(type, requiredIndicator));
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {string} indicatorType
|
||||
* Indicator type
|
||||
* @param {string} required
|
||||
* Required indicator
|
||||
* @return {string}
|
||||
* Error message
|
||||
*/
|
||||
generateMessage: function (indicatorType, required) {
|
||||
return 'Error: "' + indicatorType +
|
||||
'" indicator type requires "' + required +
|
||||
'" indicator loaded before. Please read docs: ' +
|
||||
'https://api.highcharts.com/highstock/plotOptions.' +
|
||||
indicatorType;
|
||||
}
|
||||
};
|
||||
|
||||
return requiredIndicatorMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/apo.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/indicator-required.js']], function (H, U, requiredIndicatorMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error,
|
||||
seriesType = U.seriesType;
|
||||
var EMA = H.seriesTypes.ema,
|
||||
requiredIndicator = requiredIndicatorMixin;
|
||||
/**
|
||||
* The APO series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.apo
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('apo', 'ema',
|
||||
/**
|
||||
* Absolute Price Oscillator. This series requires the `linkedTo` option to
|
||||
* be set and should be loaded after the `stock/indicators/indicators.js`
|
||||
* and `stock/indicators/ema.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/apo
|
||||
* Absolute Price Oscillator
|
||||
*
|
||||
* @extends plotOptions.ema
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, joinBy, keys, navigatorOptions,
|
||||
* pointInterval, pointIntervalUnit, pointPlacement,
|
||||
* pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/apo
|
||||
* @optionparent plotOptions.apo
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Paramters used in calculation of Absolute Price Oscillator
|
||||
* series points.
|
||||
*
|
||||
* @excluding period
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* Periods for Absolute Price Oscillator calculations.
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @default [10, 20]
|
||||
* @since 7.0.0
|
||||
*/
|
||||
periods: [10, 20]
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series.prototype
|
||||
*/
|
||||
{
|
||||
nameBase: 'APO',
|
||||
nameComponents: ['periods'],
|
||||
init: function () {
|
||||
var args = arguments,
|
||||
ctx = this;
|
||||
requiredIndicator.isParentLoaded(EMA, 'ema', ctx.type, function (indicator) {
|
||||
indicator.prototype.init.apply(ctx, args);
|
||||
return;
|
||||
});
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var periods = params.periods,
|
||||
index = params.index,
|
||||
// 0- date, 1- Absolute price oscillator
|
||||
APO = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
periodsOffset,
|
||||
// Shorter Period EMA
|
||||
SPE,
|
||||
// Longer Period EMA
|
||||
LPE,
|
||||
oscillator,
|
||||
i;
|
||||
// Check if periods are correct
|
||||
if (periods.length !== 2 || periods[1] <= periods[0]) {
|
||||
error('Error: "APO requires two periods. Notice, first period ' +
|
||||
'should be lower than the second one."');
|
||||
return;
|
||||
}
|
||||
SPE = EMA.prototype.getValues.call(this, series, {
|
||||
index: index,
|
||||
period: periods[0]
|
||||
});
|
||||
LPE = EMA.prototype.getValues.call(this, series, {
|
||||
index: index,
|
||||
period: periods[1]
|
||||
});
|
||||
// Check if ema is calculated properly, if not skip
|
||||
if (!SPE || !LPE) {
|
||||
return;
|
||||
}
|
||||
periodsOffset = periods[1] - periods[0];
|
||||
for (i = 0; i < LPE.yData.length; i++) {
|
||||
oscillator = (SPE.yData[i + periodsOffset] -
|
||||
LPE.yData[i]);
|
||||
APO.push([LPE.xData[i], oscillator]);
|
||||
xData.push(LPE.xData[i]);
|
||||
yData.push(oscillator);
|
||||
}
|
||||
return {
|
||||
values: APO,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* An `Absolute Price Oscillator` series. If the [type](#series.apo.type) option
|
||||
* is not specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.apo
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, dataParser, dataURL, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/apo
|
||||
* @apioption series.apo
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/apo.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.js
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/aroon-oscillator",["highcharts","highcharts/modules/stock"],function(e){a(e);a.Highcharts=e;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function e(a,f,k,c){a.hasOwnProperty(f)||(a[f]=c.apply(null,k))}a=a?a._modules:{};e(a,"mixins/multipe-lines.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){var k=
|
||||
f.defined,c=f.error,e=f.merge,g=a.each,h=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(b){var a=[];g(this.pointArrayMap,function(d){d!==b&&a.push("plot"+d.charAt(0).toUpperCase()+d.slice(1))});return a},toYData:function(b){var a=[];g(this.pointArrayMap,function(d){a.push(b[d])});return a},translate:function(){var b=this,a=b.pointArrayMap,d=[],c;d=b.getTranslatedLinesNames();h.prototype.translate.apply(b,arguments);
|
||||
g(b.points,function(h){g(a,function(a,g){c=h[a];null!==c&&(h[d[g]]=b.yAxis.toPixels(c,!0))})})},drawGraph:function(){var b=this,a=b.linesApiNames,d=b.points,f=d.length,m=b.options,p=b.graph,q={options:{gapSize:m.gapSize}},n=[],r=b.getTranslatedLinesNames(b.pointValKey),l;g(r,function(a,b){for(n[b]=[];f--;)l=d[f],n[b].push({x:l.x,plotX:l.plotX,plotY:l[a],isNull:!k(l[a])});f=d.length});g(a,function(a,d){n[d]?(b.points=n[d],m[a]?b.options=e(m[a].styles,q):c('Error: "There is no '+a+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),
|
||||
b.graph=b["graph"+a],h.prototype.drawGraph.call(b),b["graph"+a]=b.graph):c('Error: "'+a+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});b.points=d;b.options=m;b.graph=p;h.prototype.drawGraph.call(b)}}});e(a,"mixins/indicator-required.js",[a["parts/Utilities.js"]],function(a){var f=a.error;return{isParentLoaded:function(a,c,e,g,h){if(a)return g?g(a):!0;f(h||this.generateMessage(e,c));return!1},generateMessage:function(a,c){return'Error: "'+
|
||||
a+'" indicator type requires "'+c+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+a}}});e(a,"indicators/aroon-oscillator.src.js",[a["parts/Globals.js"],a["mixins/multipe-lines.js"],a["mixins/indicator-required.js"],a["parts/Utilities.js"]],function(a,f,e,c){var k=c.merge;c=c.seriesType;var g=a.seriesTypes.aroon;c("aroonoscillator","aroon",{params:{period:25},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b>: {point.y}'}},
|
||||
k(f,{nameBase:"Aroon Oscillator",pointArrayMap:["y"],pointValKey:"y",linesApiNames:[],init:function(){var a=arguments,b=this;e.isParentLoaded(g,"aroon",b.type,function(c){c.prototype.init.apply(b,a)})},getValues:function(a,b){var c=[],d=[],f=[];a=g.prototype.getValues.call(this,a,b);for(b=0;b<a.yData.length;b++){var e=a.yData[b][0];var h=a.yData[b][1];e-=h;c.push([a.xData[b],e]);d.push(a.xData[b]);f.push(e)}return{values:c,xData:d,yData:f}}}));""});e(a,"masters/indicators/aroon-oscillator.src.js",
|
||||
[],function(){})});
|
||||
//# sourceMappingURL=aroon-oscillator.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
409
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.src.js
vendored
Normal file
409
AdminPoll/bower_components/highcharts/indicators/aroon-oscillator.src.js
vendored
Normal file
@@ -0,0 +1,409 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/aroon-oscillator', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/multipe-lines.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var defined = U.defined,
|
||||
error = U.error,
|
||||
merge = U.merge;
|
||||
var each = H.each,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/**
|
||||
* Mixin useful for all indicators that have more than one line.
|
||||
* Merge it with your implementation where you will provide
|
||||
* getValues method appropriate to your indicator and pointArrayMap,
|
||||
* pointValKey, linesApiNames properites. Notice that pointArrayMap
|
||||
* should be consistent with amount of lines calculated in getValues method.
|
||||
*
|
||||
* @private
|
||||
* @mixin multipleLinesMixin
|
||||
*/
|
||||
var multipleLinesMixin = {
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* Lines ids. Required to plot appropriate amount of lines.
|
||||
* Notice that pointArrayMap should have more elements than
|
||||
* linesApiNames, because it contains main line and additional lines ids.
|
||||
* Also it should be consistent with amount of lines calculated in
|
||||
* getValues method from your implementation.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointArrayMap
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
pointArrayMap: ['top', 'bottom'],
|
||||
/**
|
||||
* Main line id.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointValKey
|
||||
* @type {string}
|
||||
*/
|
||||
pointValKey: 'top',
|
||||
/**
|
||||
* Additional lines DOCS names. Elements of linesApiNames array should
|
||||
* be consistent with DOCS line names defined in your implementation.
|
||||
* Notice that linesApiNames should have decreased amount of elements
|
||||
* relative to pointArrayMap (without pointValKey).
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.linesApiNames
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
linesApiNames: ['bottomLine'],
|
||||
/**
|
||||
* Create translatedLines Collection based on pointArrayMap.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.getTranslatedLinesNames
|
||||
* @param {string} [excludedValue]
|
||||
* Main line id
|
||||
* @return {Array<string>}
|
||||
* Returns translated lines names without excluded value.
|
||||
*/
|
||||
getTranslatedLinesNames: function (excludedValue) {
|
||||
var translatedLines = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
if (propertyName !== excludedValue) {
|
||||
translatedLines.push('plot' +
|
||||
propertyName.charAt(0).toUpperCase() +
|
||||
propertyName.slice(1));
|
||||
}
|
||||
});
|
||||
return translatedLines;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @function multipleLinesMixin.toYData
|
||||
* @param {Highcharts.Point} point
|
||||
* Indicator point
|
||||
* @return {Array<number>}
|
||||
* Returns point Y value for all lines
|
||||
*/
|
||||
toYData: function (point) {
|
||||
var pointColl = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
pointColl.push(point[propertyName]);
|
||||
});
|
||||
return pointColl;
|
||||
},
|
||||
/**
|
||||
* Add lines plot pixel values.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.translate
|
||||
* @return {void}
|
||||
*/
|
||||
translate: function () {
|
||||
var indicator = this,
|
||||
pointArrayMap = indicator.pointArrayMap,
|
||||
LinesNames = [],
|
||||
value;
|
||||
LinesNames = indicator.getTranslatedLinesNames();
|
||||
SMA.prototype.translate.apply(indicator, arguments);
|
||||
each(indicator.points, function (point) {
|
||||
each(pointArrayMap, function (propertyName, i) {
|
||||
value = point[propertyName];
|
||||
if (value !== null) {
|
||||
point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Draw main and additional lines.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.drawGraph
|
||||
* @return {void}
|
||||
*/
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
pointValKey = indicator.pointValKey,
|
||||
linesApiNames = indicator.linesApiNames,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
mainLinePath = indicator.graph,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
// additional lines point place holders:
|
||||
secondaryLines = [],
|
||||
secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
|
||||
point;
|
||||
// Generate points for additional lines:
|
||||
each(secondaryLinesNames, function (plotLine, index) {
|
||||
// create additional lines point place holders
|
||||
secondaryLines[index] = [];
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
secondaryLines[index].push({
|
||||
x: point.x,
|
||||
plotX: point.plotX,
|
||||
plotY: point[plotLine],
|
||||
isNull: !defined(point[plotLine])
|
||||
});
|
||||
}
|
||||
pointsLength = mainLinePoints.length;
|
||||
});
|
||||
// Modify options and generate additional lines:
|
||||
each(linesApiNames, function (lineName, i) {
|
||||
if (secondaryLines[i]) {
|
||||
indicator.points = secondaryLines[i];
|
||||
if (mainLineOptions[lineName]) {
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
}
|
||||
else {
|
||||
error('Error: "There is no ' + lineName +
|
||||
' in DOCS options declared. Check if linesApiNames' +
|
||||
' are consistent with your DOCS line names."' +
|
||||
' at mixin/multiple-line.js:34');
|
||||
}
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save lines:
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
else {
|
||||
error('Error: "' + lineName + ' doesn\'t have equivalent ' +
|
||||
'in pointArrayMap. To many elements in linesApiNames ' +
|
||||
'relative to pointArrayMap."');
|
||||
}
|
||||
});
|
||||
// Restore options and draw a main line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
};
|
||||
|
||||
return multipleLinesMixin;
|
||||
});
|
||||
_registerModule(_modules, 'mixins/indicator-required.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error;
|
||||
/* eslint-disable no-invalid-this, valid-jsdoc */
|
||||
var requiredIndicatorMixin = {
|
||||
/**
|
||||
* Check whether given indicator is loaded,
|
||||
else throw error.
|
||||
* @private
|
||||
* @param {Highcharts.Indicator} indicator
|
||||
* Indicator constructor function.
|
||||
* @param {string} requiredIndicator
|
||||
* Required indicator type.
|
||||
* @param {string} type
|
||||
* Type of indicator where function was called (parent).
|
||||
* @param {Highcharts.IndicatorCallbackFunction} callback
|
||||
* Callback which is triggered if the given indicator is loaded.
|
||||
* Takes indicator as an argument.
|
||||
* @param {string} errMessage
|
||||
* Error message that will be logged in console.
|
||||
* @return {boolean}
|
||||
* Returns false when there is no required indicator loaded.
|
||||
*/
|
||||
isParentLoaded: function (indicator,
|
||||
requiredIndicator,
|
||||
type,
|
||||
callback,
|
||||
errMessage) {
|
||||
if (indicator) {
|
||||
return callback ? callback(indicator) : true;
|
||||
}
|
||||
error(errMessage || this.generateMessage(type, requiredIndicator));
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {string} indicatorType
|
||||
* Indicator type
|
||||
* @param {string} required
|
||||
* Required indicator
|
||||
* @return {string}
|
||||
* Error message
|
||||
*/
|
||||
generateMessage: function (indicatorType, required) {
|
||||
return 'Error: "' + indicatorType +
|
||||
'" indicator type requires "' + required +
|
||||
'" indicator loaded before. Please read docs: ' +
|
||||
'https://api.highcharts.com/highstock/plotOptions.' +
|
||||
indicatorType;
|
||||
}
|
||||
};
|
||||
|
||||
return requiredIndicatorMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/aroon-oscillator.src.js', [_modules['parts/Globals.js'], _modules['mixins/multipe-lines.js'], _modules['mixins/indicator-required.js'], _modules['parts/Utilities.js']], function (H, multipleLinesMixin, requiredIndicatorMixin, U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var merge = U.merge,
|
||||
seriesType = U.seriesType;
|
||||
var AROON = H.seriesTypes.aroon,
|
||||
requiredIndicator = requiredIndicatorMixin;
|
||||
/**
|
||||
* The Aroon Oscillator series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.aroonoscillator
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('aroonoscillator', 'aroon',
|
||||
/**
|
||||
* Aroon Oscillator. This series requires the `linkedTo` option to be set
|
||||
* and should be loaded after the `stock/indicators/indicators.js` and
|
||||
* `stock/indicators/aroon.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/aroon-oscillator
|
||||
* Aroon Oscillator
|
||||
*
|
||||
* @extends plotOptions.aroon
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, aroonDown, colorAxis, compare, compareBase,
|
||||
* joinBy, keys, navigatorOptions, pointInterval,
|
||||
* pointIntervalUnit, pointPlacement, pointRange, pointStart,
|
||||
* showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/aroon
|
||||
* @requires stock/indicators/aroon-oscillator
|
||||
* @optionparent plotOptions.aroonoscillator
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Paramters used in calculation of aroon oscillator series points.
|
||||
*
|
||||
* @excluding periods, index
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* Period for Aroon Oscillator
|
||||
*
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
*/
|
||||
period: 25
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span><b> {series.name}</b>: {point.y}'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
merge(multipleLinesMixin, {
|
||||
nameBase: 'Aroon Oscillator',
|
||||
pointArrayMap: ['y'],
|
||||
pointValKey: 'y',
|
||||
linesApiNames: [],
|
||||
init: function () {
|
||||
var args = arguments,
|
||||
ctx = this;
|
||||
requiredIndicator.isParentLoaded(AROON, 'aroon', ctx.type, function (indicator) {
|
||||
indicator.prototype.init.apply(ctx, args);
|
||||
return;
|
||||
});
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
// 0- date, 1- Aroon Oscillator
|
||||
var ARO = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
aroon,
|
||||
aroonUp,
|
||||
aroonDown,
|
||||
oscillator,
|
||||
i;
|
||||
aroon = AROON.prototype.getValues.call(this, series, params);
|
||||
for (i = 0; i < aroon.yData.length; i++) {
|
||||
aroonUp = aroon.yData[i][0];
|
||||
aroonDown = aroon.yData[i][1];
|
||||
oscillator = aroonUp - aroonDown;
|
||||
ARO.push([aroon.xData[i], oscillator]);
|
||||
xData.push(aroon.xData[i]);
|
||||
yData.push(oscillator);
|
||||
}
|
||||
return {
|
||||
values: ARO,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* An `Aroon Oscillator` series. If the [type](#series.aroonoscillator.type)
|
||||
* option is not specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.aroonoscillator
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, aroonDown, colorAxis, compare, compareBase, dataParser,
|
||||
* dataURL, joinBy, keys, navigatorOptions, pointInterval,
|
||||
* pointIntervalUnit, pointPlacement, pointRange, pointStart,
|
||||
* showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/aroon
|
||||
* @requires stock/indicators/aroon-oscillator
|
||||
* @apioption series.aroonoscillator
|
||||
*/
|
||||
''; // adds doclet above to the transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/aroon-oscillator.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/aroon.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/aroon.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
16
AdminPoll/bower_components/highcharts/indicators/aroon.js
vendored
Normal file
16
AdminPoll/bower_components/highcharts/indicators/aroon.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/aroon",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,l,c,g){a.hasOwnProperty(l)||(a[l]=g.apply(null,c))}a=a?a._modules:{};c(a,"mixins/multipe-lines.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,c){var r=c.defined,
|
||||
g=c.error,l=c.merge,e=a.each,n=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(b){var a=[];e(this.pointArrayMap,function(d){d!==b&&a.push("plot"+d.charAt(0).toUpperCase()+d.slice(1))});return a},toYData:function(b){var a=[];e(this.pointArrayMap,function(d){a.push(b[d])});return a},translate:function(){var b=this,a=b.pointArrayMap,d=[],c;d=b.getTranslatedLinesNames();n.prototype.translate.apply(b,arguments);e(b.points,
|
||||
function(n){e(a,function(a,e){c=n[a];null!==c&&(n[d[e]]=b.yAxis.toPixels(c,!0))})})},drawGraph:function(){var b=this,a=b.linesApiNames,d=b.points,c=d.length,m=b.options,f=b.graph,h={options:{gapSize:m.gapSize}},k=[],t=b.getTranslatedLinesNames(b.pointValKey),p;e(t,function(a,b){for(k[b]=[];c--;)p=d[c],k[b].push({x:p.x,plotX:p.plotX,plotY:p[a],isNull:!r(p[a])});c=d.length});e(a,function(a,d){k[d]?(b.points=k[d],m[a]?b.options=l(m[a].styles,h):g('Error: "There is no '+a+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),
|
||||
b.graph=b["graph"+a],n.prototype.drawGraph.call(b),b["graph"+a]=b.graph):g('Error: "'+a+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});b.points=d;b.options=m;b.graph=f;n.prototype.drawGraph.call(b)}}});c(a,"indicators/aroon.src.js",[a["parts/Utilities.js"],a["mixins/multipe-lines.js"]],function(a,c){function l(a,c){var b=a[0],e=0,d;for(d=1;d<a.length;d++)if("max"===c&&a[d]>=b||"min"===c&&a[d]<=b)b=a[d],e=d;return e}var g=a.merge,q=a.pick;
|
||||
a=a.seriesType;a("aroon","sma",{params:{period:25},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Aroon Up: {point.y}<br/>Aroon Down: {point.aroonDown}<br/>'},aroonDown:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}},g(c,{nameBase:"Aroon",pointArrayMap:["y","aroonDown"],pointValKey:"y",linesApiNames:["aroonDown"],getValues:function(a,c){c=c.period;var b=a.xData,e=(a=a.yData)?a.length:0,d=[],g=[],m=
|
||||
[],f;for(f=c-1;f<e;f++){var h=a.slice(f-c+1,f+2);var k=l(h.map(function(a){return q(a[2],a)}),"min");h=l(h.map(function(a){return q(a[1],a)}),"max");h=h/c*100;k=k/c*100;b[f+1]&&(d.push([b[f+1],h,k]),g.push(b[f+1]),m.push([h,k]))}return{values:d,xData:g,yData:m}}}));""});c(a,"masters/indicators/aroon.src.js",[],function(){})});
|
||||
//# sourceMappingURL=aroon.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/aroon.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/aroon.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/aroon.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/aroon.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
395
AdminPoll/bower_components/highcharts/indicators/aroon.src.js
vendored
Normal file
395
AdminPoll/bower_components/highcharts/indicators/aroon.src.js
vendored
Normal file
@@ -0,0 +1,395 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/aroon', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/multipe-lines.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var defined = U.defined,
|
||||
error = U.error,
|
||||
merge = U.merge;
|
||||
var each = H.each,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/**
|
||||
* Mixin useful for all indicators that have more than one line.
|
||||
* Merge it with your implementation where you will provide
|
||||
* getValues method appropriate to your indicator and pointArrayMap,
|
||||
* pointValKey, linesApiNames properites. Notice that pointArrayMap
|
||||
* should be consistent with amount of lines calculated in getValues method.
|
||||
*
|
||||
* @private
|
||||
* @mixin multipleLinesMixin
|
||||
*/
|
||||
var multipleLinesMixin = {
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* Lines ids. Required to plot appropriate amount of lines.
|
||||
* Notice that pointArrayMap should have more elements than
|
||||
* linesApiNames, because it contains main line and additional lines ids.
|
||||
* Also it should be consistent with amount of lines calculated in
|
||||
* getValues method from your implementation.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointArrayMap
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
pointArrayMap: ['top', 'bottom'],
|
||||
/**
|
||||
* Main line id.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointValKey
|
||||
* @type {string}
|
||||
*/
|
||||
pointValKey: 'top',
|
||||
/**
|
||||
* Additional lines DOCS names. Elements of linesApiNames array should
|
||||
* be consistent with DOCS line names defined in your implementation.
|
||||
* Notice that linesApiNames should have decreased amount of elements
|
||||
* relative to pointArrayMap (without pointValKey).
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.linesApiNames
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
linesApiNames: ['bottomLine'],
|
||||
/**
|
||||
* Create translatedLines Collection based on pointArrayMap.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.getTranslatedLinesNames
|
||||
* @param {string} [excludedValue]
|
||||
* Main line id
|
||||
* @return {Array<string>}
|
||||
* Returns translated lines names without excluded value.
|
||||
*/
|
||||
getTranslatedLinesNames: function (excludedValue) {
|
||||
var translatedLines = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
if (propertyName !== excludedValue) {
|
||||
translatedLines.push('plot' +
|
||||
propertyName.charAt(0).toUpperCase() +
|
||||
propertyName.slice(1));
|
||||
}
|
||||
});
|
||||
return translatedLines;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @function multipleLinesMixin.toYData
|
||||
* @param {Highcharts.Point} point
|
||||
* Indicator point
|
||||
* @return {Array<number>}
|
||||
* Returns point Y value for all lines
|
||||
*/
|
||||
toYData: function (point) {
|
||||
var pointColl = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
pointColl.push(point[propertyName]);
|
||||
});
|
||||
return pointColl;
|
||||
},
|
||||
/**
|
||||
* Add lines plot pixel values.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.translate
|
||||
* @return {void}
|
||||
*/
|
||||
translate: function () {
|
||||
var indicator = this,
|
||||
pointArrayMap = indicator.pointArrayMap,
|
||||
LinesNames = [],
|
||||
value;
|
||||
LinesNames = indicator.getTranslatedLinesNames();
|
||||
SMA.prototype.translate.apply(indicator, arguments);
|
||||
each(indicator.points, function (point) {
|
||||
each(pointArrayMap, function (propertyName, i) {
|
||||
value = point[propertyName];
|
||||
if (value !== null) {
|
||||
point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Draw main and additional lines.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.drawGraph
|
||||
* @return {void}
|
||||
*/
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
pointValKey = indicator.pointValKey,
|
||||
linesApiNames = indicator.linesApiNames,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
mainLinePath = indicator.graph,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
// additional lines point place holders:
|
||||
secondaryLines = [],
|
||||
secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
|
||||
point;
|
||||
// Generate points for additional lines:
|
||||
each(secondaryLinesNames, function (plotLine, index) {
|
||||
// create additional lines point place holders
|
||||
secondaryLines[index] = [];
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
secondaryLines[index].push({
|
||||
x: point.x,
|
||||
plotX: point.plotX,
|
||||
plotY: point[plotLine],
|
||||
isNull: !defined(point[plotLine])
|
||||
});
|
||||
}
|
||||
pointsLength = mainLinePoints.length;
|
||||
});
|
||||
// Modify options and generate additional lines:
|
||||
each(linesApiNames, function (lineName, i) {
|
||||
if (secondaryLines[i]) {
|
||||
indicator.points = secondaryLines[i];
|
||||
if (mainLineOptions[lineName]) {
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
}
|
||||
else {
|
||||
error('Error: "There is no ' + lineName +
|
||||
' in DOCS options declared. Check if linesApiNames' +
|
||||
' are consistent with your DOCS line names."' +
|
||||
' at mixin/multiple-line.js:34');
|
||||
}
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save lines:
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
else {
|
||||
error('Error: "' + lineName + ' doesn\'t have equivalent ' +
|
||||
'in pointArrayMap. To many elements in linesApiNames ' +
|
||||
'relative to pointArrayMap."');
|
||||
}
|
||||
});
|
||||
// Restore options and draw a main line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
};
|
||||
|
||||
return multipleLinesMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/aroon.src.js', [_modules['parts/Utilities.js'], _modules['mixins/multipe-lines.js']], function (U, multipleLinesMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var merge = U.merge,
|
||||
pick = U.pick,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils
|
||||
// Index of element with extreme value from array (min or max)
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getExtremeIndexInArray(arr, extreme) {
|
||||
var extremeValue = arr[0],
|
||||
valueIndex = 0,
|
||||
i;
|
||||
for (i = 1; i < arr.length; i++) {
|
||||
if (extreme === 'max' && arr[i] >= extremeValue ||
|
||||
extreme === 'min' && arr[i] <= extremeValue) {
|
||||
extremeValue = arr[i];
|
||||
valueIndex = i;
|
||||
}
|
||||
}
|
||||
return valueIndex;
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The Aroon series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.aroon
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('aroon', 'sma',
|
||||
/**
|
||||
* Aroon. This series requires the `linkedTo` option to be
|
||||
* set and should be loaded after the `stock/indicators/indicators.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/aroon
|
||||
* Aroon
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/aroon
|
||||
* @optionparent plotOptions.aroon
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Paramters used in calculation of aroon series points.
|
||||
*
|
||||
* @excluding periods, index
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* Period for Aroon indicator
|
||||
*/
|
||||
period: 25
|
||||
},
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span><b> {series.name}</b><br/>Aroon Up: {point.y}<br/>Aroon Down: {point.aroonDown}<br/>'
|
||||
},
|
||||
/**
|
||||
* aroonDown line options.
|
||||
*/
|
||||
aroonDown: {
|
||||
/**
|
||||
* Styles for an aroonDown line.
|
||||
*/
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line. If not set, it's inherited from
|
||||
* [plotOptions.aroon.color](#plotOptions.aroon.color).
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'averages'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
merge(multipleLinesMixin, {
|
||||
nameBase: 'Aroon',
|
||||
pointArrayMap: ['y', 'aroonDown'],
|
||||
pointValKey: 'y',
|
||||
linesApiNames: ['aroonDown'],
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
// 0- date, 1- Aroon Up, 2- Aroon Down
|
||||
AR = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
slicedY,
|
||||
low = 2,
|
||||
high = 1,
|
||||
aroonUp,
|
||||
aroonDown,
|
||||
xLow,
|
||||
xHigh,
|
||||
i;
|
||||
// For a N-period, we start from N-1 point, to calculate Nth point
|
||||
// That is why we later need to comprehend slice() elements list
|
||||
// with (+1)
|
||||
for (i = period - 1; i < yValLen; i++) {
|
||||
slicedY = yVal.slice(i - period + 1, i + 2);
|
||||
xLow = getExtremeIndexInArray(slicedY.map(function (elem) {
|
||||
return pick(elem[low], elem);
|
||||
}), 'min');
|
||||
xHigh = getExtremeIndexInArray(slicedY.map(function (elem) {
|
||||
return pick(elem[high], elem);
|
||||
}), 'max');
|
||||
aroonUp = (xHigh / period) * 100;
|
||||
aroonDown = (xLow / period) * 100;
|
||||
if (xVal[i + 1]) {
|
||||
AR.push([xVal[i + 1], aroonUp, aroonDown]);
|
||||
xData.push(xVal[i + 1]);
|
||||
yData.push([aroonUp, aroonDown]);
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: AR,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* A Aroon indicator. If the [type](#series.aroon.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.aroon
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
|
||||
* joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/aroon
|
||||
* @apioption series.aroon
|
||||
*/
|
||||
''; // to avoid removal of the above jsdoc
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/aroon.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/atr.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/atr.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/atr.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/atr.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/atr",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,b,k,e){a.hasOwnProperty(b)||(a[b]=e.apply(null,k))}a=a?a._modules:{};b(a,"indicators/atr.src.js",[a["parts/Utilities.js"]],function(a){function b(a,b){return Math.max(a[1]-a[2],
|
||||
b===e?0:Math.abs(a[1]-b[3]),b===e?0:Math.abs(a[2]-b[3]))}var k=a.isArray;a=a.seriesType;var e;a("atr","sma",{params:{period:14}},{getValues:function(a,f){f=f.period;var g=a.xData,e=(a=a.yData)?a.length:0,l=1,h=0,q=0,m=[],n=[],p=[],c;var r=[[g[0],a[0]]];if(!(g.length<=f)&&k(a[0])&&4===a[0].length){for(c=1;c<=e;c++)if(r.push([g[c],a[c]]),f<l){var d=f;var t=g[c-1],u=b(a[c-1],a[c-2]);d=[t,(h*(d-1)+u)/d];h=d[1];m.push(d);n.push(d[0]);p.push(d[1])}else f===l?(h=q/(c-1),m.push([g[c-1],h]),n.push(g[c-1]),
|
||||
p.push(h)):q+=b(a[c-1],a[c-2]),l++;return{values:m,xData:n,yData:p}}}});""});b(a,"masters/indicators/atr.src.js",[],function(){})});
|
||||
//# sourceMappingURL=atr.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/atr.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/atr.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"atr.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,2BAAP,CAAoC,CAAC,YAAD,CAAe,0BAAf,CAApC,CAAgF,QAAS,CAACE,CAAD,CAAa,CAClGL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH2F,CAAtG,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAA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AHUlB,CAGV,EAHgBoB,CAGhB,CAHoB,CAGpB,EAFAD,CAAAK,KAAA,CAAS,CAACb,CAAA,CAAKS,CAAL,CAAS,CAAT,CAAD,CAAcF,CAAd,CAAT,CAEA,CADAN,CAAAY,KAAA,CAAWb,CAAA,CAAKS,CAAL,CAAS,CAAT,CAAX,CACA;AAAAL,CAAAS,KAAA,CAAWN,CAAX,CAJC,EAQDlB,CARC,EAQKL,CAAA,CAAMmB,CAAA,CAAKM,CAAL,CAAS,CAAT,CAAN,CAAmBN,CAAA,CAAKM,CAAL,CAAS,CAAT,CAAnB,CAHN,CAAAH,CAAA,EAOR,OAAO,CACHU,OAAQR,CADL,CAEHP,MAAOA,CAFJ,CAGHG,MAAOA,CAHJ,CA1BP,CAHiC,CADzC,CAvBA,CAwEA,GApH8F,CAAlG,CAuHA7B,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B,CAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CA9HoB,CAbvB;","sources":["atr.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","getTR","currentPoint","prevPoint","Math","max","TR","HCp","UNDEFINED","abs","LCp","isArray","seriesType","params","period","getValues","series","xVal","xData","yValLen","yVal","yData","length","range","prevATR","ATR","i","points","xValue","yValue","push","x","point","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/atr.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/atr.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
180
AdminPoll/bower_components/highcharts/indicators/atr.src.js
vendored
Normal file
180
AdminPoll/bower_components/highcharts/indicators/atr.src.js
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/atr', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/atr.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
var UNDEFINED;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils:
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function accumulateAverage(points, xVal, yVal, i) {
|
||||
var xValue = xVal[i],
|
||||
yValue = yVal[i];
|
||||
points.push([xValue, yValue]);
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getTR(currentPoint, prevPoint) {
|
||||
var pointY = currentPoint,
|
||||
prevY = prevPoint,
|
||||
HL = pointY[1] - pointY[2],
|
||||
HCp = prevY === UNDEFINED ? 0 : Math.abs(pointY[1] - prevY[3]),
|
||||
LCp = prevY === UNDEFINED ? 0 : Math.abs(pointY[2] - prevY[3]),
|
||||
TR = Math.max(HL,
|
||||
HCp,
|
||||
LCp);
|
||||
return TR;
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function populateAverage(points, xVal, yVal, i, period, prevATR) {
|
||||
var x = xVal[i - 1],
|
||||
TR = getTR(yVal[i - 1],
|
||||
yVal[i - 2]),
|
||||
y;
|
||||
y = (((prevATR * (period - 1)) + TR) / period);
|
||||
return [x, y];
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The ATR series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.atr
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('atr', 'sma',
|
||||
/**
|
||||
* Average true range indicator (ATR). This series requires `linkedTo`
|
||||
* option to be set.
|
||||
*
|
||||
* @sample stock/indicators/atr
|
||||
* ATR indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/atr
|
||||
* @optionparent plotOptions.atr
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 14
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
xValue = xVal[0],
|
||||
yValue = yVal[0],
|
||||
range = 1,
|
||||
prevATR = 0,
|
||||
TR = 0,
|
||||
ATR = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
point,
|
||||
i,
|
||||
points;
|
||||
points = [[xValue, yValue]];
|
||||
if ((xVal.length <= period) ||
|
||||
!isArray(yVal[0]) ||
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
for (i = 1; i <= yValLen; i++) {
|
||||
accumulateAverage(points, xVal, yVal, i);
|
||||
if (period < range) {
|
||||
point = populateAverage(points, xVal, yVal, i, period, prevATR);
|
||||
prevATR = point[1];
|
||||
ATR.push(point);
|
||||
xData.push(point[0]);
|
||||
yData.push(point[1]);
|
||||
}
|
||||
else if (period === range) {
|
||||
prevATR = TR / (i - 1);
|
||||
ATR.push([xVal[i - 1], prevATR]);
|
||||
xData.push(xVal[i - 1]);
|
||||
yData.push(prevATR);
|
||||
range++;
|
||||
}
|
||||
else {
|
||||
TR += getTR(yVal[i - 1], yVal[i - 2]);
|
||||
range++;
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: ATR,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `ATR` series. If the [type](#series.atr.type) option is not specified, it
|
||||
* is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.atr
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/atr
|
||||
* @apioption series.atr
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/atr.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
27
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.d.ts
vendored
Normal file
27
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {
|
||||
/**
|
||||
* Utility function to check if an item is an array.
|
||||
*
|
||||
* @param obj
|
||||
* The item to check.
|
||||
*
|
||||
* @return True if the argument is an array.
|
||||
*/
|
||||
function isArray(obj: any): boolean;
|
||||
}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
17
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.js
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Pawe Fus
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/bollinger-bands",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,b,c,r){a.hasOwnProperty(b)||(a[b]=r.apply(null,c))}a=a?a._modules:{};c(a,"mixins/multipe-lines.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var c=
|
||||
b.defined,r=b.error,m=b.merge,f=a.each,h=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(e){var a=[];f(this.pointArrayMap,function(d){d!==e&&a.push("plot"+d.charAt(0).toUpperCase()+d.slice(1))});return a},toYData:function(e){var a=[];f(this.pointArrayMap,function(d){a.push(e[d])});return a},translate:function(){var e=this,a=e.pointArrayMap,d=[],b;d=e.getTranslatedLinesNames();h.prototype.translate.apply(e,arguments);
|
||||
f(e.points,function(c){f(a,function(a,h){b=c[a];null!==b&&(c[d[h]]=e.yAxis.toPixels(b,!0))})})},drawGraph:function(){var a=this,b=a.linesApiNames,d=a.points,w=d.length,t=a.options,z=a.graph,A={options:{gapSize:t.gapSize}},n=[],g=a.getTranslatedLinesNames(a.pointValKey),p;f(g,function(a,b){for(n[b]=[];w--;)p=d[w],n[b].push({x:p.x,plotX:p.plotX,plotY:p[a],isNull:!c(p[a])});w=d.length});f(b,function(b,d){n[d]?(a.points=n[d],t[b]?a.options=m(t[b].styles,A):r('Error: "There is no '+b+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),
|
||||
a.graph=a["graph"+b],h.prototype.drawGraph.call(a),a["graph"+b]=a.graph):r('Error: "'+b+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=d;a.options=t;a.graph=z;h.prototype.drawGraph.call(a)}}});c(a,"indicators/bollinger-bands.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/multipe-lines.js"]],function(a,b,c){var r=b.isArray,m=b.merge;b=b.seriesType;var f=a.seriesTypes.sma;b("bb","sma",{params:{period:20,standardDeviation:2,
|
||||
index:3},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Top: {point.top}<br/>Middle: {point.middle}<br/>Bottom: {point.bottom}<br/>'},marker:{enabled:!1},dataGrouping:{approximation:"averages"}},m(c,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",nameComponents:["period","standardDeviation"],linesApiNames:["topLine","bottomLine"],init:function(){f.prototype.init.apply(this,
|
||||
arguments);this.options=m({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},getValues:function(a,b){var c=b.period,d=b.standardDeviation,e=a.xData,t=(a=a.yData)?a.length:0,h=[],m=[],n=[],g;if(!(e.length<c)){var p=r(a[0]);for(g=c;g<=t;g++){var u=e.slice(g-c,g);var q=a.slice(g-c,g);var k=f.prototype.getValues.call(this,{xData:u,yData:q},b);u=k.xData[0];k=k.yData[0];for(var x=0,y=q.length,v=0;v<y;v++){var l=(p?q[v][b.index]:q[v])-k;x+=l*l}l=Math.sqrt(x/
|
||||
(y-1));q=k+d*l;l=k-d*l;h.push([u,q,k,l]);m.push(u);n.push([q,k,l])}return{values:h,xData:m,yData:n}}}}));""});c(a,"masters/indicators/bollinger-bands.src.js",[],function(){})});
|
||||
//# sourceMappingURL=bollinger-bands.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
27
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.src.d.ts
vendored
Normal file
27
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.src.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {
|
||||
/**
|
||||
* Utility function to check if an item is an array.
|
||||
*
|
||||
* @param obj
|
||||
* The item to check.
|
||||
*
|
||||
* @return True if the argument is an array.
|
||||
*/
|
||||
function isArray(obj: any): boolean;
|
||||
}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
422
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.src.js
vendored
Normal file
422
AdminPoll/bower_components/highcharts/indicators/bollinger-bands.src.js
vendored
Normal file
@@ -0,0 +1,422 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Paweł Fus
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/bollinger-bands', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/multipe-lines.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var defined = U.defined,
|
||||
error = U.error,
|
||||
merge = U.merge;
|
||||
var each = H.each,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/**
|
||||
* Mixin useful for all indicators that have more than one line.
|
||||
* Merge it with your implementation where you will provide
|
||||
* getValues method appropriate to your indicator and pointArrayMap,
|
||||
* pointValKey, linesApiNames properites. Notice that pointArrayMap
|
||||
* should be consistent with amount of lines calculated in getValues method.
|
||||
*
|
||||
* @private
|
||||
* @mixin multipleLinesMixin
|
||||
*/
|
||||
var multipleLinesMixin = {
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* Lines ids. Required to plot appropriate amount of lines.
|
||||
* Notice that pointArrayMap should have more elements than
|
||||
* linesApiNames, because it contains main line and additional lines ids.
|
||||
* Also it should be consistent with amount of lines calculated in
|
||||
* getValues method from your implementation.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointArrayMap
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
pointArrayMap: ['top', 'bottom'],
|
||||
/**
|
||||
* Main line id.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointValKey
|
||||
* @type {string}
|
||||
*/
|
||||
pointValKey: 'top',
|
||||
/**
|
||||
* Additional lines DOCS names. Elements of linesApiNames array should
|
||||
* be consistent with DOCS line names defined in your implementation.
|
||||
* Notice that linesApiNames should have decreased amount of elements
|
||||
* relative to pointArrayMap (without pointValKey).
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.linesApiNames
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
linesApiNames: ['bottomLine'],
|
||||
/**
|
||||
* Create translatedLines Collection based on pointArrayMap.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.getTranslatedLinesNames
|
||||
* @param {string} [excludedValue]
|
||||
* Main line id
|
||||
* @return {Array<string>}
|
||||
* Returns translated lines names without excluded value.
|
||||
*/
|
||||
getTranslatedLinesNames: function (excludedValue) {
|
||||
var translatedLines = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
if (propertyName !== excludedValue) {
|
||||
translatedLines.push('plot' +
|
||||
propertyName.charAt(0).toUpperCase() +
|
||||
propertyName.slice(1));
|
||||
}
|
||||
});
|
||||
return translatedLines;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @function multipleLinesMixin.toYData
|
||||
* @param {Highcharts.Point} point
|
||||
* Indicator point
|
||||
* @return {Array<number>}
|
||||
* Returns point Y value for all lines
|
||||
*/
|
||||
toYData: function (point) {
|
||||
var pointColl = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
pointColl.push(point[propertyName]);
|
||||
});
|
||||
return pointColl;
|
||||
},
|
||||
/**
|
||||
* Add lines plot pixel values.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.translate
|
||||
* @return {void}
|
||||
*/
|
||||
translate: function () {
|
||||
var indicator = this,
|
||||
pointArrayMap = indicator.pointArrayMap,
|
||||
LinesNames = [],
|
||||
value;
|
||||
LinesNames = indicator.getTranslatedLinesNames();
|
||||
SMA.prototype.translate.apply(indicator, arguments);
|
||||
each(indicator.points, function (point) {
|
||||
each(pointArrayMap, function (propertyName, i) {
|
||||
value = point[propertyName];
|
||||
if (value !== null) {
|
||||
point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Draw main and additional lines.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.drawGraph
|
||||
* @return {void}
|
||||
*/
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
pointValKey = indicator.pointValKey,
|
||||
linesApiNames = indicator.linesApiNames,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
mainLinePath = indicator.graph,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
// additional lines point place holders:
|
||||
secondaryLines = [],
|
||||
secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
|
||||
point;
|
||||
// Generate points for additional lines:
|
||||
each(secondaryLinesNames, function (plotLine, index) {
|
||||
// create additional lines point place holders
|
||||
secondaryLines[index] = [];
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
secondaryLines[index].push({
|
||||
x: point.x,
|
||||
plotX: point.plotX,
|
||||
plotY: point[plotLine],
|
||||
isNull: !defined(point[plotLine])
|
||||
});
|
||||
}
|
||||
pointsLength = mainLinePoints.length;
|
||||
});
|
||||
// Modify options and generate additional lines:
|
||||
each(linesApiNames, function (lineName, i) {
|
||||
if (secondaryLines[i]) {
|
||||
indicator.points = secondaryLines[i];
|
||||
if (mainLineOptions[lineName]) {
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
}
|
||||
else {
|
||||
error('Error: "There is no ' + lineName +
|
||||
' in DOCS options declared. Check if linesApiNames' +
|
||||
' are consistent with your DOCS line names."' +
|
||||
' at mixin/multiple-line.js:34');
|
||||
}
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save lines:
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
else {
|
||||
error('Error: "' + lineName + ' doesn\'t have equivalent ' +
|
||||
'in pointArrayMap. To many elements in linesApiNames ' +
|
||||
'relative to pointArrayMap."');
|
||||
}
|
||||
});
|
||||
// Restore options and draw a main line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
};
|
||||
|
||||
return multipleLinesMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/bollinger-bands.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/multipe-lines.js']], function (H, U, multipleLinesMixin) {
|
||||
/**
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var isArray = U.isArray,
|
||||
merge = U.merge,
|
||||
seriesType = U.seriesType;
|
||||
var SMA = H.seriesTypes.sma;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils:
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function getStandardDeviation(arr, index, isOHLC, mean) {
|
||||
var variance = 0,
|
||||
arrLen = arr.length,
|
||||
std = 0,
|
||||
i = 0,
|
||||
value;
|
||||
for (; i < arrLen; i++) {
|
||||
value = (isOHLC ? arr[i][index] : arr[i]) - mean;
|
||||
variance += value * value;
|
||||
}
|
||||
variance = variance / (arrLen - 1);
|
||||
std = Math.sqrt(variance);
|
||||
return std;
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* Bollinger Bands series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.bb
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('bb', 'sma',
|
||||
/**
|
||||
* Bollinger bands (BB). This series requires the `linkedTo` option to be
|
||||
* set and should be loaded after the `stock/indicators/indicators.js` file.
|
||||
*
|
||||
* @sample stock/indicators/bollinger-bands
|
||||
* Bollinger bands
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/bollinger-bands
|
||||
* @optionparent plotOptions.bb
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 20,
|
||||
/**
|
||||
* Standard deviation for top and bottom bands.
|
||||
*/
|
||||
standardDeviation: 2,
|
||||
index: 3
|
||||
},
|
||||
/**
|
||||
* Bottom line options.
|
||||
*/
|
||||
bottomLine: {
|
||||
/**
|
||||
* Styles for a bottom line.
|
||||
*/
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line. If not set, it's inherited from
|
||||
* [plotOptions.bb.color](#plotOptions.bb.color).
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Top line options.
|
||||
*
|
||||
* @extends plotOptions.bb.bottomLine
|
||||
*/
|
||||
topLine: {
|
||||
styles: {
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span><b> {series.name}</b><br/>Top: {point.top}<br/>Middle: {point.middle}<br/>Bottom: {point.bottom}<br/>'
|
||||
},
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'averages'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
merge(multipleLinesMixin, {
|
||||
pointArrayMap: ['top', 'middle', 'bottom'],
|
||||
pointValKey: 'middle',
|
||||
nameComponents: ['period', 'standardDeviation'],
|
||||
linesApiNames: ['topLine', 'bottomLine'],
|
||||
init: function () {
|
||||
SMA.prototype.init.apply(this, arguments);
|
||||
// Set default color for lines:
|
||||
this.options = merge({
|
||||
topLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
bottomLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
}
|
||||
}, this.options);
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
standardDeviation = params.standardDeviation,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
// 0- date, 1-middle line, 2-top line, 3-bottom line
|
||||
BB = [],
|
||||
// middle line, top line and bottom line
|
||||
ML,
|
||||
TL,
|
||||
BL,
|
||||
date,
|
||||
xData = [],
|
||||
yData = [],
|
||||
slicedX,
|
||||
slicedY,
|
||||
stdDev,
|
||||
isOHLC,
|
||||
point,
|
||||
i;
|
||||
if (xVal.length < period) {
|
||||
return;
|
||||
}
|
||||
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);
|
||||
date = point.xData[0];
|
||||
ML = point.yData[0];
|
||||
stdDev = getStandardDeviation(slicedY, params.index, isOHLC, ML);
|
||||
TL = ML + standardDeviation * stdDev;
|
||||
BL = ML - standardDeviation * stdDev;
|
||||
BB.push([date, TL, ML, BL]);
|
||||
xData.push(date);
|
||||
yData.push([TL, ML, BL]);
|
||||
}
|
||||
return {
|
||||
values: BB,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* A bollinger bands indicator. If the [type](#series.bb.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.bb
|
||||
* @since 6.0.0
|
||||
* @excluding dataParser, dataURL
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/bollinger-bands
|
||||
* @apioption series.bb
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/bollinger-bands.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/cci.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/cci.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/cci.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/cci.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/cci",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,c,k,l){a.hasOwnProperty(c)||(a[c]=l.apply(null,k))}a=a?a._modules:{};c(a,"indicators/cci.src.js",[a["parts/Utilities.js"]],function(a){function c(a){return a.reduce(function(a,
|
||||
c){return a+c},0)}var k=a.isArray;a=a.seriesType;a("cci","sma",{params:{period:14}},{getValues:function(a,e){e=e.period;var m=a.xData,l=(a=a.yData)?a.length:0,n=[],d=1,p=[],q=[],r=[];if(!(m.length<=e)&&k(a[0])&&4===a[0].length){for(;d<e;){var b=a[d-1];n.push((b[1]+b[2]+b[3])/3);d++}for(d=e;d<=l;d++){b=a[d-1];b=(b[1]+b[2]+b[3])/3;var g=n.push(b);var f=n.slice(g-e);g=c(f)/e;var h,u=f.length,t=0;for(h=0;h<u;h++)t+=Math.abs(g-f[h]);f=t/e;b=(b-g)/(.015*f);p.push([m[d-1],b]);q.push(m[d-1]);r.push(b)}return{values:p,
|
||||
xData:q,yData:r}}}});""});c(a,"masters/indicators/cci.src.js",[],function(){})});
|
||||
//# sourceMappingURL=cci.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/cci.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/cci.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cci.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,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CAAT,CAAYA,CAAZ,CAAgBE,CAAhB,CAAqBF,CAAA,EAArB,CACIM,CAAA,EAAOC,IAAAC,IAAA,CA0D+BH,CA1D/B,CA0DqBF,CA1DL,CAAIH,CAAJ,CAAhB,CA0DHS,EAAA,CAxDDH,CAwDC,CAA2CpB,CAC3CwB,EAAA,EAAaT,CAAb,CAAsBI,CAAtB,GAAgC,IAAhC,CAAwCI,CAAxC,CACAZ,EAAAE,KAAA,CAAS,CAACV,CAAA,CAAKW,CAAL,CAAS,CAAT,CAAD,CAAcU,CAAd,CAAT,CACApB,EAAAS,KAAA,CAAWV,CAAA,CAAKW,CAAL,CAAS,CAAT,CAAX,CACAP,EAAAM,KAAA,CAAWW,CAAX,CAVgC,CAYpC,MAAO,CACHC,OAAQd,CADL;AAEHP,MAAOA,CAFJ,CAGHG,MAAOA,CAHJ,CAvBP,CAHiC,CADzC,CAvBA,CAqEA,GA3G8F,CAAlG,CA8GAxB,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B,CAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CArHoB,CAbvB;","sources":["cci.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","sumArray","array","reduce","prev","cur","isArray","seriesType","params","period","getValues","series","xVal","xData","yValLen","yVal","yData","length","TP","range","CCI","p","push","i","TPtemp","len","periodTP","slice","smaTP","sum","Math","abs","meanDev","CCIPoint","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/cci.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/cci.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
164
AdminPoll/bower_components/highcharts/indicators/cci.src.js
vendored
Normal file
164
AdminPoll/bower_components/highcharts/indicators/cci.src.js
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/cci', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/cci.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
* */
|
||||
var isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils:
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function sumArray(array) {
|
||||
return array.reduce(function (prev, cur) {
|
||||
return prev + cur;
|
||||
}, 0);
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function meanDeviation(arr, sma) {
|
||||
var len = arr.length,
|
||||
sum = 0,
|
||||
i;
|
||||
for (i = 0; i < len; i++) {
|
||||
sum += Math.abs(sma - (arr[i]));
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The CCI series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.cci
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('cci', 'sma',
|
||||
/**
|
||||
* Commodity Channel Index (CCI). This series requires `linkedTo` option to
|
||||
* be set.
|
||||
*
|
||||
* @sample stock/indicators/cci
|
||||
* CCI indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/cci
|
||||
* @optionparent plotOptions.cci
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 14
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
TP = [],
|
||||
periodTP = [],
|
||||
range = 1,
|
||||
CCI = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
CCIPoint,
|
||||
p,
|
||||
len,
|
||||
smaTP,
|
||||
TPtemp,
|
||||
meanDev,
|
||||
i;
|
||||
// CCI requires close value
|
||||
if (xVal.length <= period ||
|
||||
!isArray(yVal[0]) ||
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
// accumulate first N-points
|
||||
while (range < period) {
|
||||
p = yVal[range - 1];
|
||||
TP.push((p[1] + p[2] + p[3]) / 3);
|
||||
range++;
|
||||
}
|
||||
for (i = period; i <= yValLen; i++) {
|
||||
p = yVal[i - 1];
|
||||
TPtemp = (p[1] + p[2] + p[3]) / 3;
|
||||
len = TP.push(TPtemp);
|
||||
periodTP = TP.slice(len - period);
|
||||
smaTP = sumArray(periodTP) / period;
|
||||
meanDev = meanDeviation(periodTP, smaTP) / period;
|
||||
CCIPoint = ((TPtemp - smaTP) / (0.015 * meanDev));
|
||||
CCI.push([xVal[i - 1], CCIPoint]);
|
||||
xData.push(xVal[i - 1]);
|
||||
yData.push(CCIPoint);
|
||||
}
|
||||
return {
|
||||
values: CCI,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `CCI` series. If the [type](#series.cci.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.cci
|
||||
* @since 6.0.0
|
||||
* @excluding dataParser, dataURL
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/cci
|
||||
* @apioption series.cci
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/cci.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/chaikin.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/chaikin.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
15
AdminPoll/bower_components/highcharts/indicators/chaikin.js
vendored
Normal file
15
AdminPoll/bower_components/highcharts/indicators/chaikin.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/chaikin",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,f,k,g){a.hasOwnProperty(f)||(a[f]=g.apply(null,k))}a=a?a._modules:{};b(a,"indicators/accumulation-distribution.src.js",[a["parts/Utilities.js"]],function(a){var f=a.error;
|
||||
a=a.seriesType;a("ad","sma",{params:{volumeSeriesID:"volume"}},{nameComponents:!1,nameBase:"Accumulation/Distribution",getValues:function(a,g){var e=g.period,k=a.xData,h=a.yData,d=g.volumeSeriesID,c=a.chart.get(d);g=c&&c.yData;var q=h?h.length:0,p=[],b=[],n=[];if(!(k.length<=e&&q&&4!==h[0].length)){if(c){for(;e<q;e++){a=p.length;d=h[e][1];c=h[e][2];var m=h[e][3],l=g[e];d=[k[e],m===d&&m===c||d===c?0:(2*m-c-d)/(d-c)*l];0<a&&(d[1]+=p[a-1][1]);p.push(d);b.push(d[0]);n.push(d[1])}return{values:p,xData:b,
|
||||
yData:n}}f("Series "+d+" not found! Check `volumeSeriesID`.",!0,a.chart)}}});""});b(a,"mixins/indicator-required.js",[a["parts/Utilities.js"]],function(a){var f=a.error;return{isParentLoaded:function(a,g,e,b,h){if(a)return b?b(a):!0;f(h||this.generateMessage(e,g));return!1},generateMessage:function(a,b){return'Error: "'+a+'" indicator type requires "'+b+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+a}}});b(a,"indicators/chaikin.src.js",[a["parts/Globals.js"],
|
||||
a["parts/Utilities.js"],a["mixins/indicator-required.js"]],function(a,b,k){var g=b.correctFloat,e=b.error;b=b.seriesType;var f=a.seriesTypes.ema,h=a.seriesTypes.ad;b("chaikin","ema",{params:{volumeSeriesID:"volume",periods:[3,10]}},{nameBase:"Chaikin Osc",nameComponents:["periods"],init:function(){var a=arguments,c=this;k.isParentLoaded(f,"ema",c.type,function(b){b.prototype.init.apply(c,a)})},getValues:function(a,c){var b=c.periods,d=c.period,k=[],n=[],m=[],l;if(2!==b.length||b[1]<=b[0])e('Error: "Chaikin requires two periods. Notice, first period should be lower than the second one."');
|
||||
else if(c=h.prototype.getValues.call(this,a,{volumeSeriesID:c.volumeSeriesID,period:d}))if(a=f.prototype.getValues.call(this,c,{period:b[0]}),c=f.prototype.getValues.call(this,c,{period:b[1]}),a&&c){b=b[1]-b[0];for(l=0;l<c.yData.length;l++)d=g(a.yData[l+b]-c.yData[l]),k.push([c.xData[l],d]),n.push(c.xData[l]),m.push(d);return{values:k,xData:n,yData:m}}}});""});b(a,"masters/indicators/chaikin.src.js",[],function(){})});
|
||||
//# sourceMappingURL=chaikin.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/chaikin.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/chaikin.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/chaikin.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/chaikin.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
377
AdminPoll/bower_components/highcharts/indicators/chaikin.src.js
vendored
Normal file
377
AdminPoll/bower_components/highcharts/indicators/chaikin.src.js
vendored
Normal file
@@ -0,0 +1,377 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/chaikin', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/accumulation-distribution.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
* */
|
||||
var error = U.error,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils:
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function populateAverage(xVal, yVal, yValVolume, i) {
|
||||
var high = yVal[i][1],
|
||||
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,
|
||||
adX = xVal[i];
|
||||
return [adX, adY];
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The AD series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.ad
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('ad', 'sma',
|
||||
/**
|
||||
* Accumulation Distribution (AD). This series requires `linkedTo` option to
|
||||
* be set.
|
||||
*
|
||||
* @sample stock/indicators/accumulation-distribution
|
||||
* Accumulation/Distribution indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/accumulation-distribution
|
||||
* @optionparent plotOptions.ad
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
/**
|
||||
* The id of volume series which is mandatory.
|
||||
* For example using OHLC data, volumeSeriesID='volume' means
|
||||
* the indicator will be calculated using OHLC and volume values.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
volumeSeriesID: 'volume'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameComponents: false,
|
||||
nameBase: 'Accumulation/Distribution',
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
volumeSeriesID = params.volumeSeriesID,
|
||||
volumeSeries = series.chart.get(volumeSeriesID),
|
||||
yValVolume = volumeSeries && volumeSeries.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
AD = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
len,
|
||||
i,
|
||||
ADPoint;
|
||||
if (xVal.length <= period &&
|
||||
yValLen &&
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
if (!volumeSeries) {
|
||||
error('Series ' +
|
||||
volumeSeriesID +
|
||||
' not found! Check `volumeSeriesID`.', true, series.chart);
|
||||
return;
|
||||
}
|
||||
// i = period <-- skip first N-points
|
||||
// Calculate value one-by-one for each period in visible data
|
||||
for (i = period; i < yValLen; i++) {
|
||||
len = AD.length;
|
||||
ADPoint = populateAverage(xVal, yVal, yValVolume, i, period);
|
||||
if (len > 0) {
|
||||
ADPoint[1] += AD[len - 1][1];
|
||||
}
|
||||
AD.push(ADPoint);
|
||||
xData.push(ADPoint[0]);
|
||||
yData.push(ADPoint[1]);
|
||||
}
|
||||
return {
|
||||
values: AD,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `AD` series. If the [type](#series.ad.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ad
|
||||
* @since 6.0.0
|
||||
* @excluding dataParser, dataURL
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/accumulation-distribution
|
||||
* @apioption series.ad
|
||||
*/
|
||||
''; // add doclet above to transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'mixins/indicator-required.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error;
|
||||
/* eslint-disable no-invalid-this, valid-jsdoc */
|
||||
var requiredIndicatorMixin = {
|
||||
/**
|
||||
* Check whether given indicator is loaded,
|
||||
else throw error.
|
||||
* @private
|
||||
* @param {Highcharts.Indicator} indicator
|
||||
* Indicator constructor function.
|
||||
* @param {string} requiredIndicator
|
||||
* Required indicator type.
|
||||
* @param {string} type
|
||||
* Type of indicator where function was called (parent).
|
||||
* @param {Highcharts.IndicatorCallbackFunction} callback
|
||||
* Callback which is triggered if the given indicator is loaded.
|
||||
* Takes indicator as an argument.
|
||||
* @param {string} errMessage
|
||||
* Error message that will be logged in console.
|
||||
* @return {boolean}
|
||||
* Returns false when there is no required indicator loaded.
|
||||
*/
|
||||
isParentLoaded: function (indicator,
|
||||
requiredIndicator,
|
||||
type,
|
||||
callback,
|
||||
errMessage) {
|
||||
if (indicator) {
|
||||
return callback ? callback(indicator) : true;
|
||||
}
|
||||
error(errMessage || this.generateMessage(type, requiredIndicator));
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {string} indicatorType
|
||||
* Indicator type
|
||||
* @param {string} required
|
||||
* Required indicator
|
||||
* @return {string}
|
||||
* Error message
|
||||
*/
|
||||
generateMessage: function (indicatorType, required) {
|
||||
return 'Error: "' + indicatorType +
|
||||
'" indicator type requires "' + required +
|
||||
'" indicator loaded before. Please read docs: ' +
|
||||
'https://api.highcharts.com/highstock/plotOptions.' +
|
||||
indicatorType;
|
||||
}
|
||||
};
|
||||
|
||||
return requiredIndicatorMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/chaikin.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/indicator-required.js']], function (H, U, requiredIndicatorMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
error = U.error,
|
||||
seriesType = U.seriesType;
|
||||
var EMA = H.seriesTypes.ema,
|
||||
AD = H.seriesTypes.ad,
|
||||
requiredIndicator = requiredIndicatorMixin;
|
||||
/**
|
||||
* The Chaikin series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.chaikin
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('chaikin', 'ema',
|
||||
/**
|
||||
* Chaikin Oscillator. This series requires the `linkedTo` option to
|
||||
* be set and should be loaded after the `stock/indicators/indicators.js`
|
||||
* and `stock/indicators/ema.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/chaikin
|
||||
* Chaikin Oscillator
|
||||
*
|
||||
* @extends plotOptions.ema
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, joinBy, keys, navigatorOptions,
|
||||
* pointInterval, pointIntervalUnit, pointPlacement,
|
||||
* pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/chaikin
|
||||
* @optionparent plotOptions.chaikin
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Paramters used in calculation of Chaikin Oscillator
|
||||
* series points.
|
||||
*
|
||||
* @excluding index, period
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* The id of volume series which is mandatory.
|
||||
* For example using OHLC data, volumeSeriesID='volume' means
|
||||
* the indicator will be calculated using OHLC and volume values.
|
||||
*/
|
||||
volumeSeriesID: 'volume',
|
||||
/**
|
||||
* Periods for Chaikin Oscillator calculations.
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @default [3, 10]
|
||||
*/
|
||||
periods: [3, 10]
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameBase: 'Chaikin Osc',
|
||||
nameComponents: ['periods'],
|
||||
init: function () {
|
||||
var args = arguments,
|
||||
ctx = this;
|
||||
requiredIndicator.isParentLoaded(EMA, 'ema', ctx.type, function (indicator) {
|
||||
indicator.prototype.init.apply(ctx, args);
|
||||
return;
|
||||
});
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var periods = params.periods,
|
||||
period = params.period,
|
||||
// Accumulation Distribution Line data
|
||||
ADL,
|
||||
// 0- date, 1- Chaikin Oscillator
|
||||
CHA = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
periodsOffset,
|
||||
// Shorter Period EMA
|
||||
SPE,
|
||||
// Longer Period EMA
|
||||
LPE,
|
||||
oscillator,
|
||||
i;
|
||||
// Check if periods are correct
|
||||
if (periods.length !== 2 || periods[1] <= periods[0]) {
|
||||
error('Error: "Chaikin requires two periods. Notice, first ' +
|
||||
'period should be lower than the second one."');
|
||||
return;
|
||||
}
|
||||
ADL = AD.prototype.getValues.call(this, series, {
|
||||
volumeSeriesID: params.volumeSeriesID,
|
||||
period: period
|
||||
});
|
||||
// Check if adl is calculated properly, if not skip
|
||||
if (!ADL) {
|
||||
return;
|
||||
}
|
||||
SPE = EMA.prototype.getValues.call(this, ADL, {
|
||||
period: periods[0]
|
||||
});
|
||||
LPE = EMA.prototype.getValues.call(this, ADL, {
|
||||
period: periods[1]
|
||||
});
|
||||
// Check if ema is calculated properly, if not skip
|
||||
if (!SPE || !LPE) {
|
||||
return;
|
||||
}
|
||||
periodsOffset = periods[1] - periods[0];
|
||||
for (i = 0; i < LPE.yData.length; i++) {
|
||||
oscillator = correctFloat(SPE.yData[i + periodsOffset] -
|
||||
LPE.yData[i]);
|
||||
CHA.push([LPE.xData[i], oscillator]);
|
||||
xData.push(LPE.xData[i]);
|
||||
yData.push(oscillator);
|
||||
}
|
||||
return {
|
||||
values: CHA,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `Chaikin Oscillator` series. If the [type](#series.chaikin.type)
|
||||
* option is not specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.chaikin
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, dataParser, dataURL, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, stacking, showInNavigator
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/chaikin
|
||||
* @apioption series.chaikin
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/chaikin.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/cmf.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/cmf.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/cmf.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/cmf.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
(c) 2010-2019 Highsoft AS
|
||||
Author: Sebastian Domas
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/cmf",["highcharts","highcharts/modules/stock"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,h,d,c){a.hasOwnProperty(h)||(a[h]=c.apply(null,d))}a=a?a._modules:{};f(a,"indicators/cmf.src.js",[a["parts/Utilities.js"]],function(a){a=a.seriesType;a("cmf","sma",{params:{period:14,
|
||||
volumeSeriesID:"volume"}},{nameBase:"Chaikin Money Flow",isValid:function(){var a=this.chart,d=this.options,c=this.linkedParent;a=this.volumeSeries||(this.volumeSeries=a.get(d.params.volumeSeriesID));var e=c&&c.yData&&4===c.yData[0].length;return!!(c&&a&&c.xData&&c.xData.length>=d.params.period&&a.xData&&a.xData.length>=d.params.period&&e)},getValues:function(a,d){if(this.isValid())return this.getMoneyFlow(a.xData,a.yData,this.volumeSeries.yData,d.period)},getMoneyFlow:function(a,d,c,e){function f(a,
|
||||
c){var d=a[1],e=a[2];a=a[3];return null!==c&&null!==d&&null!==e&&null!==a&&d!==e?(a-e-(d-a))/(d-e)*c:(q=b,null)}var h=d.length,k=[],g=0,l=0,m=[],n=[],r=[],b,q=-1;if(0<e&&e<=h){for(b=0;b<e;b++)k[b]=f(d[b],c[b]),g+=c[b],l+=k[b];m.push(a[b-1]);n.push(b-q>=e&&0!==g?l/g:null);for(r.push([m[0],n[0]]);b<h;b++){k[b]=f(d[b],c[b]);g-=c[b-e];g+=c[b];l-=k[b-e];l+=k[b];var p=[a[b],b-q>=e?l/g:null];m.push(p[0]);n.push(p[1]);r.push([p[0],p[1]])}}return{values:r,xData:m,yData:n}}});""});f(a,"masters/indicators/cmf.src.js",
|
||||
[],function(){})});
|
||||
//# sourceMappingURL=cmf.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/cmf.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/cmf.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cmf.js.map","lineCount":12,"mappings":"A;;;;;;;;AASC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,2BAAP,CAAoC,CAAC,YAAD,CAAe,0BAAf,CAApC,CAAgF,QAAS,CAACE,CAAD,CA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,CAAZ,CAdiB,CAXQ,CA4BjC,MAAO,CACHF,OAAQA,CADL,CAEHnB,MAAOiB,CAFJ,CAGHnB,MAAOoB,CAHJ,CA1D4D,CAtD3E,CA5BA,CA+JA,GAvL8F,CAAlG,CA0LA1C,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B;AAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CAjMoB,CAbvB;","sources":["cmf.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","seriesType","params","period","volumeSeriesID","nameBase","isValid","chart","options","series","linkedParent","volumeSeries","get","isSeriesOHLC","yData","length","xData","getValues","getMoneyFlow","seriesYData","volumeSeriesYData","getMoneyFlowVolume","ohlc","volume","high","low","close","nullIndex","i","len","moneyFlowVolume","sumVolume","sumMoneyFlowVolume","moneyFlowXData","moneyFlowYData","values","push","point"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/cmf.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/cmf.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
236
AdminPoll/bower_components/highcharts/indicators/cmf.src.js
vendored
Normal file
236
AdminPoll/bower_components/highcharts/indicators/cmf.src.js
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* (c) 2010-2019 Highsoft AS
|
||||
* Author: Sebastian Domas
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/cmf', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/cmf.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* (c) 2010-2020 Highsoft AS
|
||||
*
|
||||
* Author: Sebastian Domas
|
||||
*
|
||||
* Chaikin Money Flow indicator for Highstock
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var seriesType = U.seriesType;
|
||||
/**
|
||||
* The CMF series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.cmf
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('cmf', 'sma',
|
||||
/**
|
||||
* Chaikin Money Flow indicator (cmf).
|
||||
*
|
||||
* @sample stock/indicators/cmf/
|
||||
* Chaikin Money Flow indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @excluding animationLimit
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/cmf
|
||||
* @optionparent plotOptions.cmf
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 14,
|
||||
/**
|
||||
* The id of another series to use its data as volume data for the
|
||||
* indiator calculation.
|
||||
*/
|
||||
volumeSeriesID: 'volume'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
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
|
||||
* @private
|
||||
* @param {Highcharts.CMFIndicator} this indicator to use.
|
||||
* @return {boolean} True if series is valid and can be computed,
|
||||
* otherwise false.
|
||||
*/
|
||||
isValid: function () {
|
||||
var chart = this.chart,
|
||||
options = this.options,
|
||||
series = this.linkedParent,
|
||||
volumeSeries = (this.volumeSeries ||
|
||||
(this.volumeSeries =
|
||||
chart.get(options.params.volumeSeriesID))),
|
||||
isSeriesOHLC = (series &&
|
||||
series.yData &&
|
||||
series.yData[0].length === 4);
|
||||
/**
|
||||
* @private
|
||||
* @param {Highcharts.Series} serie to check length validity on.
|
||||
* @return {boolean|undefined} true if length is valid.
|
||||
*/
|
||||
function isLengthValid(serie) {
|
||||
return serie.xData &&
|
||||
serie.xData.length >= options.params.period;
|
||||
}
|
||||
return !!(series &&
|
||||
volumeSeries &&
|
||||
isLengthValid(series) &&
|
||||
isLengthValid(volumeSeries) && isSeriesOHLC);
|
||||
},
|
||||
/**
|
||||
* Returns indicator's data.
|
||||
* @private
|
||||
* @param {Highcharts.CMFIndicator} this indicator to use.
|
||||
* @param {Highcharts.Series} series to calculate values from
|
||||
* @param {Highcharts.CMFIndicatorParamsOptions} params to pass
|
||||
* @return {boolean|Highcharts.IndicatorNullableValuesObject} Returns false if the
|
||||
* indicator is not valid, otherwise returns Values object.
|
||||
*/
|
||||
getValues: function (series, params) {
|
||||
if (!this.isValid()) {
|
||||
return;
|
||||
}
|
||||
return this.getMoneyFlow(series.xData, series.yData, this.volumeSeries.yData, params.period);
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {Array<number>} xData - x timestamp values
|
||||
* @param {Array<number>} seriesYData - yData of basic series
|
||||
* @param {Array<number>} volumeSeriesYData - yData of volume series
|
||||
* @param {number} period - indicator's param
|
||||
* @return {Highcharts.IndicatorNullableValuesObject} object containing computed money
|
||||
* flow data
|
||||
*/
|
||||
getMoneyFlow: function (xData, seriesYData, volumeSeriesYData, period) {
|
||||
var len = seriesYData.length,
|
||||
moneyFlowVolume = [],
|
||||
sumVolume = 0,
|
||||
sumMoneyFlowVolume = 0,
|
||||
moneyFlowXData = [],
|
||||
moneyFlowYData = [],
|
||||
values = [],
|
||||
i,
|
||||
point,
|
||||
nullIndex = -1;
|
||||
/**
|
||||
* Calculates money flow volume, changes i, nullIndex vars from
|
||||
* upper scope!
|
||||
* @private
|
||||
* @param {Array<number>} ohlc - OHLC point
|
||||
* @param {number} volume - Volume point's y value
|
||||
* @return {number|null} - volume * moneyFlowMultiplier
|
||||
**/
|
||||
function getMoneyFlowVolume(ohlc, volume) {
|
||||
var high = ohlc[1],
|
||||
low = ohlc[2],
|
||||
close = ohlc[3],
|
||||
isValid = volume !== null &&
|
||||
high !== null &&
|
||||
low !== null &&
|
||||
close !== null &&
|
||||
high !== low;
|
||||
/**
|
||||
* @private
|
||||
* @param {number} h - High value
|
||||
* @param {number} l - Low value
|
||||
* @param {number} c - Close value
|
||||
* @return {number} calculated multiplier for the point
|
||||
**/
|
||||
function getMoneyFlowMultiplier(h, l, c) {
|
||||
return ((c - l) - (h - c)) / (h - l);
|
||||
}
|
||||
return isValid ?
|
||||
getMoneyFlowMultiplier(high, low, close) * volume :
|
||||
((nullIndex = i), null);
|
||||
}
|
||||
if (period > 0 && period <= len) {
|
||||
for (i = 0; i < period; i++) {
|
||||
moneyFlowVolume[i] = getMoneyFlowVolume(seriesYData[i], volumeSeriesYData[i]);
|
||||
sumVolume += volumeSeriesYData[i];
|
||||
sumMoneyFlowVolume += moneyFlowVolume[i];
|
||||
}
|
||||
moneyFlowXData.push(xData[i - 1]);
|
||||
moneyFlowYData.push(i - nullIndex >= period && sumVolume !== 0 ?
|
||||
sumMoneyFlowVolume / sumVolume :
|
||||
null);
|
||||
values.push([moneyFlowXData[0], moneyFlowYData[0]]);
|
||||
for (; i < len; i++) {
|
||||
moneyFlowVolume[i] = getMoneyFlowVolume(seriesYData[i], volumeSeriesYData[i]);
|
||||
sumVolume -= volumeSeriesYData[i - period];
|
||||
sumVolume += volumeSeriesYData[i];
|
||||
sumMoneyFlowVolume -= moneyFlowVolume[i - period];
|
||||
sumMoneyFlowVolume += moneyFlowVolume[i];
|
||||
point = [
|
||||
xData[i],
|
||||
i - nullIndex >= period ?
|
||||
sumMoneyFlowVolume / sumVolume :
|
||||
null
|
||||
];
|
||||
moneyFlowXData.push(point[0]);
|
||||
moneyFlowYData.push(point[1]);
|
||||
values.push([point[0], point[1]]);
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: values,
|
||||
xData: moneyFlowXData,
|
||||
yData: moneyFlowYData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `CMF` series. If the [type](#series.cmf.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.cmf
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/cmf
|
||||
* @apioption series.cmf
|
||||
*/
|
||||
''; // adds doclet above to the transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/cmf.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/dema.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/dema.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
14
AdminPoll/bower_components/highcharts/indicators/dema.js
vendored
Normal file
14
AdminPoll/bower_components/highcharts/indicators/dema.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Rafa Sebestjaski
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/dema",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,b,m,e){a.hasOwnProperty(b)||(a[b]=e.apply(null,m))}a=a?a._modules:{};c(a,"mixins/indicator-required.js",[a["parts/Utilities.js"]],function(a){var b=a.error;return{isParentLoaded:function(a,
|
||||
e,c,h,k){if(a)return h?h(a):!0;b(k||this.generateMessage(c,e));return!1},generateMessage:function(a,b){return'Error: "'+a+'" indicator type requires "'+b+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+a}}});c(a,"indicators/dema.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/indicator-required.js"]],function(a,b,c){var e=b.correctFloat,m=b.isArray;b=b.seriesType;var h=a.seriesTypes.ema;b("dema","ema",{},{init:function(){var a=arguments,
|
||||
b=this;c.isParentLoaded(h,"ema",b.type,function(k){k.prototype.init.apply(b,a)})},getEMA:function(a,b,c,e,l,f){return h.prototype.calculateEma(f||[],a,"undefined"===typeof l?1:l,this.chart.series[0].EMApercent,b,"undefined"===typeof e?-1:e,c)},getValues:function(a,b){var c=b.period,k=2*c,l=a.xData,f=a.yData,n=f?f.length:0,p=-1,r=[],t=[],u=[],g=0,v=[],d;a.EMApercent=2/(c+1);if(!(n<2*c-1)){m(f[0])&&(p=b.index?b.index:0);a=h.prototype.accumulatePeriodPoints(c,p,f);b=a/c;a=0;for(d=c;d<n+2;d++){d<n+1&&
|
||||
(g=this.getEMA(f,x,b,p,d)[1],v.push(g));var x=g;if(d<k)a+=g;else{d===k&&(b=a/c);g=v[d-c-1];var w=this.getEMA([g],w,b)[1];var q=[l[d-2],e(2*g-w)];r.push(q);t.push(q[0]);u.push(q[1])}}return{values:r,xData:t,yData:u}}}});""});c(a,"masters/indicators/dema.src.js",[],function(){})});
|
||||
//# sourceMappingURL=dema.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/dema.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/dema.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dema.js.map","lineCount":13,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,4BAAP,CAAqC,CAAC,YAAD,CAAe,0BAAf,CAArC,CAAiF,QAAS,CAACE,CAAD,CAAa,CACnGL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH4F,CAAvG,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC,QAAS,CA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,CACAP,EAAAI,KAAA,CAAeG,CAAA,CAAU,CAAV,CAAf,CAdC,CAV8B,CA4BvC,MAAO,CACHC,OAAQV,CADL,CAEHJ,MAAOK,CAFJ,CAGHJ,MAAOK,CAHJ,CA1CP,CAViC,CAXzC,CAzBA,CA8GA,GAjIkM,CAAtM,CAoIApD,EAAA,CAAgBO,CAAhB,CAA0B,gCAA1B,CAA4D,EAA5D,CAAgE,QAAS,EAAG,EAA5E,CApMoB,CAbvB;","sources":["dema.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","error","requiredIndicatorMixin","isParentLoaded","indicator","requiredIndicator","type","callback","errMessage","generateMessage","indicatorType","required","H","correctFloat","isArray","seriesType","EMAindicator","seriesTypes","ema","init","arguments","ctx","prototype","getEMA","yVal","prevEMA","SMA","index","i","xVal","calculateEma","chart","series","EMApercent","getValues","params","period","doubledPeriod","xData","yData","yValLen","length","DEMA","xDataDema","yDataDema","EMA","EMAvalues","accumulatePeriodPoints","push","EMAlevel2","prevEMAlevel2","DEMAPoint","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/dema.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/dema.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
247
AdminPoll/bower_components/highcharts/indicators/dema.src.js
vendored
Normal file
247
AdminPoll/bower_components/highcharts/indicators/dema.src.js
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Rafał Sebestjański
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/dema', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/indicator-required.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error;
|
||||
/* eslint-disable no-invalid-this, valid-jsdoc */
|
||||
var requiredIndicatorMixin = {
|
||||
/**
|
||||
* Check whether given indicator is loaded,
|
||||
else throw error.
|
||||
* @private
|
||||
* @param {Highcharts.Indicator} indicator
|
||||
* Indicator constructor function.
|
||||
* @param {string} requiredIndicator
|
||||
* Required indicator type.
|
||||
* @param {string} type
|
||||
* Type of indicator where function was called (parent).
|
||||
* @param {Highcharts.IndicatorCallbackFunction} callback
|
||||
* Callback which is triggered if the given indicator is loaded.
|
||||
* Takes indicator as an argument.
|
||||
* @param {string} errMessage
|
||||
* Error message that will be logged in console.
|
||||
* @return {boolean}
|
||||
* Returns false when there is no required indicator loaded.
|
||||
*/
|
||||
isParentLoaded: function (indicator,
|
||||
requiredIndicator,
|
||||
type,
|
||||
callback,
|
||||
errMessage) {
|
||||
if (indicator) {
|
||||
return callback ? callback(indicator) : true;
|
||||
}
|
||||
error(errMessage || this.generateMessage(type, requiredIndicator));
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {string} indicatorType
|
||||
* Indicator type
|
||||
* @param {string} required
|
||||
* Required indicator
|
||||
* @return {string}
|
||||
* Error message
|
||||
*/
|
||||
generateMessage: function (indicatorType, required) {
|
||||
return 'Error: "' + indicatorType +
|
||||
'" indicator type requires "' + required +
|
||||
'" indicator loaded before. Please read docs: ' +
|
||||
'https://api.highcharts.com/highstock/plotOptions.' +
|
||||
indicatorType;
|
||||
}
|
||||
};
|
||||
|
||||
return requiredIndicatorMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/dema.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/indicator-required.js']], function (H, U, requiredIndicatorMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
var EMAindicator = H.seriesTypes.ema,
|
||||
requiredIndicator = requiredIndicatorMixin;
|
||||
/**
|
||||
* The DEMA series Type
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.dema
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('dema', 'ema',
|
||||
/**
|
||||
* Double exponential moving average (DEMA) indicator. This series requires
|
||||
* `linkedTo` option to be set and should be loaded after the
|
||||
* `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/dema
|
||||
* DEMA indicator
|
||||
*
|
||||
* @extends plotOptions.ema
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/dema
|
||||
* @optionparent plotOptions.dema
|
||||
*/
|
||||
{},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
init: function () {
|
||||
var args = arguments,
|
||||
ctx = this;
|
||||
requiredIndicator.isParentLoaded(EMAindicator, 'ema', ctx.type, function (indicator) {
|
||||
indicator.prototype.init.apply(ctx, args);
|
||||
return;
|
||||
});
|
||||
},
|
||||
getEMA: function (yVal, prevEMA, SMA, index, i, xVal) {
|
||||
return EMAindicator.prototype.calculateEma(xVal || [], yVal, typeof i === 'undefined' ? 1 : i, this.chart.series[0].EMApercent, prevEMA, typeof index === 'undefined' ? -1 : index, SMA);
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
doubledPeriod = 2 * period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
index = -1,
|
||||
accumulatePeriodPoints = 0,
|
||||
SMA = 0,
|
||||
DEMA = [],
|
||||
xDataDema = [],
|
||||
yDataDema = [],
|
||||
EMA = 0,
|
||||
// EMA(EMA)
|
||||
EMAlevel2,
|
||||
// EMA of previous point
|
||||
prevEMA,
|
||||
prevEMAlevel2,
|
||||
// EMA values array
|
||||
EMAvalues = [],
|
||||
i,
|
||||
DEMAPoint;
|
||||
series.EMApercent = (2 / (period + 1));
|
||||
// Check period, if bigger than EMA points length, skip
|
||||
if (yValLen < 2 * period - 1) {
|
||||
return;
|
||||
}
|
||||
// Switch index for OHLC / Candlestick / Arearange
|
||||
if (isArray(yVal[0])) {
|
||||
index = params.index ? params.index : 0;
|
||||
}
|
||||
// Accumulate first N-points
|
||||
accumulatePeriodPoints =
|
||||
EMAindicator.prototype.accumulatePeriodPoints(period, index, yVal);
|
||||
// first point
|
||||
SMA = accumulatePeriodPoints / period;
|
||||
accumulatePeriodPoints = 0;
|
||||
// Calculate value one-by-one for each period in visible data
|
||||
for (i = period; i < yValLen + 2; i++) {
|
||||
if (i < yValLen + 1) {
|
||||
EMA = this.getEMA(yVal, prevEMA, SMA, index, i)[1];
|
||||
EMAvalues.push(EMA);
|
||||
}
|
||||
prevEMA = EMA;
|
||||
// Summing first period points for EMA(EMA)
|
||||
if (i < doubledPeriod) {
|
||||
accumulatePeriodPoints += EMA;
|
||||
}
|
||||
else {
|
||||
// Calculate DEMA
|
||||
// First DEMA point
|
||||
if (i === doubledPeriod) {
|
||||
SMA = accumulatePeriodPoints / period;
|
||||
}
|
||||
EMA = EMAvalues[i - period - 1];
|
||||
EMAlevel2 = this.getEMA([EMA], prevEMAlevel2, SMA)[1];
|
||||
DEMAPoint = [
|
||||
xVal[i - 2],
|
||||
correctFloat(2 * EMA - EMAlevel2)
|
||||
];
|
||||
DEMA.push(DEMAPoint);
|
||||
xDataDema.push(DEMAPoint[0]);
|
||||
yDataDema.push(DEMAPoint[1]);
|
||||
prevEMAlevel2 = EMAlevel2;
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: DEMA,
|
||||
xData: xDataDema,
|
||||
yData: yDataDema
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `DEMA` series. If the [type](#series.ema.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ema
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
|
||||
* joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @requires stock/indicators/dema
|
||||
* @apioption series.dema
|
||||
*/
|
||||
''; // adds doclet above to the transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/dema.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/dpo.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/dpo.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/dpo.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/dpo.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Wojciech Chmiel
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/dpo",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,n,b,p){a.hasOwnProperty(n)||(a[n]=p.apply(null,b))}a=a?a._modules:{};b(a,"indicators/dpo.src.js",[a["parts/Utilities.js"]],function(a){function b(a,c,b,k,l){c=p(c[b][k],c[b]);
|
||||
return l?g(a-c):g(a+c)}var g=a.correctFloat,p=a.pick;a=a.seriesType;a("dpo","sma",{params:{period:21}},{nameBase:"DPO",getValues:function(a,c){var h=c.period;c=c.index;var k=h+Math.floor(h/2+1),l=a.xData||[];a=a.yData||[];var n=a.length,g=[],q=[],r=[],e=0,d,f;if(!(l.length<=k)){for(d=0;d<h-1;d++)e=b(e,a,d,c);for(f=0;f<=n-k;f++){var m=f+h-1;d=f+k-1;e=b(e,a,m,c);m=p(a[d][c],a[d]);m-=e/h;e=b(e,a,f,c,!0);g.push([l[d],m]);q.push(l[d]);r.push(m)}return{values:g,xData:q,yData:r}}}});""});b(a,"masters/indicators/dpo.src.js",
|
||||
[],function(){})});
|
||||
//# sourceMappingURL=dpo.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/dpo.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/dpo.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dpo.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,2BAAP,CAAoC,CAAC,YAAD,CAAe,0BAAf,CAApC,CAAgF,QAAS,CAACE,CAAD,CAAa,CAClGL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB,OAAOL,EAH2F,CAAtG,CADG,CAOHA,CAAA,CAA8B,WAAtB,GAAA,MAAOK,WAAP,CAAoCA,UAApC,CAAiDC,IAAAA,EAAzD,CAXY,CAAnB,CAAA,CAaC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,CAHJ,CAtBP,CAJiC,CAFzC,CAlCA,CAmFA,GAlH8F,CAAlG,CAqHA9B,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B;AAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CA5HoB,CAbvB;","sources":["dpo.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","accumulatePoints","sum","yVal","i","index","subtract","price","pick","correctFloat","seriesType","params","period","nameBase","getValues","series","range","Math","floor","offset","xVal","xData","yData","yValLen","length","DPO","rangeIndex","j","periodIndex","push","oscillator","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/dpo.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/dpo.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
170
AdminPoll/bower_components/highcharts/indicators/dpo.src.js
vendored
Normal file
170
AdminPoll/bower_components/highcharts/indicators/dpo.src.js
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/dpo', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/dpo.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
pick = U.pick,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable valid-jsdoc */
|
||||
// Utils
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
function accumulatePoints(sum, yVal, i, index, subtract) {
|
||||
var price = pick(yVal[i][index],
|
||||
yVal[i]);
|
||||
if (subtract) {
|
||||
return correctFloat(sum - price);
|
||||
}
|
||||
return correctFloat(sum + price);
|
||||
}
|
||||
/* eslint-enable valid-jsdoc */
|
||||
/**
|
||||
* The DPO series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.dpo
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('dpo', 'sma',
|
||||
/**
|
||||
* Detrended Price Oscillator. This series requires the `linkedTo` option to
|
||||
* be set and should be loaded after the `stock/indicators/indicators.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/dpo
|
||||
* Detrended Price Oscillator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/dpo
|
||||
* @optionparent plotOptions.dpo
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* Parameters used in calculation of Detrended Price Oscillator series
|
||||
* points.
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* Period for Detrended Price Oscillator
|
||||
*/
|
||||
period: 21
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameBase: 'DPO',
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
index = params.index,
|
||||
offset = Math.floor(period / 2 + 1),
|
||||
range = period + offset,
|
||||
xVal = series.xData || [],
|
||||
yVal = series.yData || [],
|
||||
yValLen = yVal.length,
|
||||
// 0- date, 1- Detrended Price Oscillator
|
||||
DPO = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
sum = 0,
|
||||
oscillator,
|
||||
periodIndex,
|
||||
rangeIndex,
|
||||
price,
|
||||
i,
|
||||
j;
|
||||
if (xVal.length <= range) {
|
||||
return;
|
||||
}
|
||||
// Accumulate first N-points for SMA
|
||||
for (i = 0; i < period - 1; i++) {
|
||||
sum = accumulatePoints(sum, yVal, i, index);
|
||||
}
|
||||
// Detrended Price Oscillator formula:
|
||||
// DPO = Price - Simple moving average [from (n / 2 + 1) days ago]
|
||||
for (j = 0; j <= yValLen - range; j++) {
|
||||
periodIndex = j + period - 1;
|
||||
rangeIndex = j + range - 1;
|
||||
// adding the last period point
|
||||
sum = accumulatePoints(sum, yVal, periodIndex, index);
|
||||
price = pick(yVal[rangeIndex][index], yVal[rangeIndex]);
|
||||
oscillator = price - sum / period;
|
||||
// substracting the first period point
|
||||
sum = accumulatePoints(sum, yVal, j, index, true);
|
||||
DPO.push([xVal[rangeIndex], oscillator]);
|
||||
xData.push(xVal[rangeIndex]);
|
||||
yData.push(oscillator);
|
||||
}
|
||||
return {
|
||||
values: DPO,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A Detrended Price Oscillator. If the [type](#series.dpo.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.dpo
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
|
||||
* joinBy, keys, navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/dpo
|
||||
* @apioption series.dpo
|
||||
*/
|
||||
''; // to include the above in the js output'
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/dpo.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/ema.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ema.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/ema.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/ema.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/ema",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,b,l,e){a.hasOwnProperty(b)||(a[b]=e.apply(null,l))}a=a?a._modules:{};b(a,"indicators/ema.src.js",[a["parts/Utilities.js"]],function(a){var b=a.correctFloat,l=a.isArray;a=a.seriesType;
|
||||
a("ema","sma",{params:{index:3,period:9}},{accumulatePeriodPoints:function(a,d,c){for(var e=0,b=0,f;b<a;)f=0>d?c[b]:c[b][d],e+=f,b++;return e},calculateEma:function(a,d,c,k,h,f,q){a=a[c-1];d=0>f?d[c-1]:d[c-1][f];k="undefined"===typeof h?q:b(d*k+h*(1-k));return[a,k]},getValues:function(a,b){var c=b.period,d=a.xData,h=(a=a.yData)?a.length:0,f=2/(c+1),e=[],n=[],p=[],m=-1;if(!(h<c)){l(a[0])&&(m=b.index?b.index:0);b=this.accumulatePeriodPoints(c,m,a);for(b/=c;c<h+1;c++){var g=this.calculateEma(d,a,c,f,
|
||||
g,m,b);e.push(g);n.push(g[0]);p.push(g[1]);g=g[1]}return{values:e,xData:n,yData:p}}}});""});b(a,"masters/indicators/ema.src.js",[],function(){})});
|
||||
//# sourceMappingURL=ema.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/ema.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/ema.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ema.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAA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D,CAA5B,CAAoCD,CAApC,CAA2CG,CAA3C,CAIN,KAFMC,CAEN,EAFYH,CAEZ,CAAiBI,CAAjB,CAAqBY,CAArB,CAA+B,CAA/B,CAAkCZ,CAAA,EAAlC,CAAuC,CACnC,IAAAgB,EAAW,IAAAd,aAAA,CAAkBC,CAAlB,CAAwBL,CAAxB,CAA8BE,CAA9B,CAAiCI,CAAjC;AAA6CC,CAA7C,CAAqDV,CAArD,CAA4DW,CAA5D,CACXS,EAAAE,KAAA,CAASD,CAAT,CACAL,EAAAM,KAAA,CAAWD,CAAA,CAAS,CAAT,CAAX,CACAH,EAAAI,KAAA,CAAWD,CAAA,CAAS,CAAT,CAAX,CACAX,EAAA,CAASW,CAAA,CAAS,CAAT,CAL0B,CAOvC,MAAO,CACHE,OAAQH,CADL,CAEHJ,MAAOA,CAFJ,CAGHE,MAAOA,CAHJ,CAnBP,CAHiC,CAnBzC,CAjCA,CA6FA,GA/G8F,CAAlG,CAkHA/B,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B,CAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CAzHoB,CAbvB;","sources":["ema.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","correctFloat","isArray","seriesType","params","index","period","accumulatePeriodPoints","yVal","sum","i","y","calculateEma","xVal","EMApercent","calEMA","SMA","x","yValue","getValues","series","xData","yValLen","yData","length","EMA","EMAPoint","push","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/ema.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ema.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
168
AdminPoll/bower_components/highcharts/indicators/ema.src.js
vendored
Normal file
168
AdminPoll/bower_components/highcharts/indicators/ema.src.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/ema', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/ema.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
/**
|
||||
* The EMA series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.ema
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('ema', 'sma',
|
||||
/**
|
||||
* Exponential moving average indicator (EMA). This series requires the
|
||||
* `linkedTo` option to be set.
|
||||
*
|
||||
* @sample stock/indicators/ema
|
||||
* Exponential moving average indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @optionparent plotOptions.ema
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
/**
|
||||
* The point index which indicator calculations will base. For
|
||||
* example using OHLC data, index=2 means the indicator will be
|
||||
* calculated using Low values.
|
||||
*
|
||||
* By default index value used to be set to 0. Since Highstock 7
|
||||
* by default index is set to 3 which means that the ema
|
||||
* indicator will be calculated using Close values.
|
||||
*/
|
||||
index: 3,
|
||||
period: 9 // @merge 14 in v6.2
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
accumulatePeriodPoints: function (period, index, yVal) {
|
||||
var sum = 0,
|
||||
i = 0,
|
||||
y = 0;
|
||||
while (i < period) {
|
||||
y = index < 0 ? yVal[i] : yVal[i][index];
|
||||
sum = sum + y;
|
||||
i++;
|
||||
}
|
||||
return sum;
|
||||
},
|
||||
calculateEma: function (xVal, yVal, i, EMApercent, calEMA, index, SMA) {
|
||||
var x = xVal[i - 1],
|
||||
yValue = index < 0 ?
|
||||
yVal[i - 1] :
|
||||
yVal[i - 1][index],
|
||||
y;
|
||||
y = typeof calEMA === 'undefined' ?
|
||||
SMA : correctFloat((yValue * EMApercent) +
|
||||
(calEMA * (1 - EMApercent)));
|
||||
return [x, y];
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
EMApercent = 2 / (period + 1),
|
||||
sum = 0,
|
||||
EMA = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
index = -1,
|
||||
SMA = 0,
|
||||
calEMA,
|
||||
EMAPoint,
|
||||
i;
|
||||
// Check period, if bigger than points length, skip
|
||||
if (yValLen < period) {
|
||||
return;
|
||||
}
|
||||
// Switch index for OHLC / Candlestick / Arearange
|
||||
if (isArray(yVal[0])) {
|
||||
index = params.index ? params.index : 0;
|
||||
}
|
||||
// Accumulate first N-points
|
||||
sum = this.accumulatePeriodPoints(period, index, yVal);
|
||||
// first point
|
||||
SMA = sum / period;
|
||||
// Calculate value one-by-one for each period in visible data
|
||||
for (i = period; i < yValLen + 1; i++) {
|
||||
EMAPoint = this.calculateEma(xVal, yVal, i, EMApercent, calEMA, index, SMA);
|
||||
EMA.push(EMAPoint);
|
||||
xData.push(EMAPoint[0]);
|
||||
yData.push(EMAPoint[1]);
|
||||
calEMA = EMAPoint[1];
|
||||
}
|
||||
return {
|
||||
values: EMA,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `EMA` series. If the [type](#series.ema.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ema
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ema
|
||||
* @apioption series.ema
|
||||
*/
|
||||
''; // adds doclet above to the transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/ema.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
23
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.js
vendored
Normal file
23
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define("highcharts/indicators/ichimoku-kinko-hyo",["highcharts","highcharts/modules/stock"],function(g){e(g);e.Highcharts=g;return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){function g(e,x,m,g){e.hasOwnProperty(x)||(e[x]=g.apply(null,m))}e=e?e._modules:{};g(e,"indicators/ichimoku-kinko-hyo.src.js",[e["parts/Globals.js"],e["parts/Color.js"],e["parts/Utilities.js"]],
|
||||
function(e,g,m){function x(a){return a.reduce(function(a,b){return Math.max(a,b[1])},-Infinity)}function F(a){return a.reduce(function(a,b){return Math.min(a,b[2])},Infinity)}function y(a){return{high:x(a),low:F(a)}}function G(a){var d,b,n,e,k;a.series.forEach(function(a){if(a.xData)for(e=a.xData,k=b=a.xIncrement?1:e.length-1;0<k;k--)if(n=e[k]-e[k-1],d===q||n<d)d=n});return d}function H(a,d,b,n){if(a&&d&&b&&n){var e=d.plotX-a.plotX;d=d.plotY-a.plotY;var k=n.plotX-b.plotX;n=n.plotY-b.plotY;var g=a.plotX-
|
||||
b.plotX,h=a.plotY-b.plotY;b=(-d*g+e*h)/(-k*d+e*n);k=(k*h-n*g)/(-k*d+e*n);if(0<=b&&1>=b&&0<=k&&1>=k)return{plotX:a.plotX+k*e,plotY:a.plotY+k*d}}return!1}function D(a){var d=a.indicator;d.points=a.points;d.nextPoints=a.nextPoints;d.color=a.color;d.options=B(a.options.senkouSpan.styles,a.gap);d.graph=a.graph;d.fillGraph=!0;u.prototype.drawGraph.call(d)}var C=g.parse,E=m.defined,I=m.isArray,B=m.merge,J=m.objectEach;g=m.seriesType;var q,u=e.seriesTypes.sma;e.approximations["ichimoku-averages"]=function(){var a=
|
||||
[],d;[].forEach.call(arguments,function(b,n){a.push(e.approximations.average(b));d=!d&&"undefined"===typeof a[n]});return d?void 0:a};g("ikh","sma",{params:{period:26,periodTenkan:9,periodSenkouSpanB:52},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>TENKAN SEN: {point.tenkanSen:.3f}<br/>KIJUN SEN: {point.kijunSen:.3f}<br/>CHIKOU SPAN: {point.chikouSpan:.3f}<br/>SENKOU SPAN A: {point.senkouSpanA:.3f}<br/>SENKOU SPAN B: {point.senkouSpanB:.3f}<br/>'},
|
||||
tenkanLine:{styles:{lineWidth:1,lineColor:void 0}},kijunLine:{styles:{lineWidth:1,lineColor:void 0}},chikouLine:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanA:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanB:{styles:{lineWidth:1,lineColor:void 0}},senkouSpan:{styles:{fill:"rgba(255, 0, 0, 0.5)"}},dataGrouping:{approximation:"ichimoku-averages"}},{pointArrayMap:["tenkanSen","kijunSen","chikouSpan","senkouSpanA","senkouSpanB"],pointValKey:"tenkanSen",nameComponents:["periodSenkouSpanB","period",
|
||||
"periodTenkan"],init:function(){u.prototype.init.apply(this,arguments);this.options=B({tenkanLine:{styles:{lineColor:this.color}},kijunLine:{styles:{lineColor:this.color}},chikouLine:{styles:{lineColor:this.color}},senkouSpanA:{styles:{lineColor:this.color,fill:C(this.color).setOpacity(.5).get()}},senkouSpanB:{styles:{lineColor:this.color,fill:C(this.color).setOpacity(.5).get()}},senkouSpan:{styles:{fill:C(this.color).setOpacity(.2).get()}}},this.options)},toYData:function(a){return[a.tenkanSen,a.kijunSen,
|
||||
a.chikouSpan,a.senkouSpanA,a.senkouSpanB]},translate:function(){var a=this;u.prototype.translate.apply(a);a.points.forEach(function(d){a.pointArrayMap.forEach(function(b){E(d[b])&&(d["plot"+b]=a.yAxis.toPixels(d[b],!0),d.plotY=d["plot"+b],d.tooltipPos=[d.plotX,d["plot"+b]],d.isNull=!1)})})},drawGraph:function(){var a=this,d=a.points,b=d.length,e=a.options,g=a.graph,k=a.color,m={options:{gapSize:e.gapSize}},h=a.pointArrayMap.length,p=[[],[],[],[],[],[]],c={tenkanLine:p[0],kijunLine:p[1],chikouLine:p[2],
|
||||
senkouSpanA:p[3],senkouSpanB:p[4],senkouSpan:p[5]},v=[],f=a.options.senkouSpan,w=f.color||f.styles.fill,q=f.negativeColor,r=[[],[]],A=[[],[]],x=0,t,y,z;for(a.ikhMap=c;b--;){var l=d[b];for(t=0;t<h;t++)f=a.pointArrayMap[t],E(l[f])&&p[t].push({plotX:l.plotX,plotY:l["plot"+f],isNull:!1});q&&b!==d.length-1&&(f=c.senkouSpanB.length-1,l=H(c.senkouSpanA[f-1],c.senkouSpanA[f],c.senkouSpanB[f-1],c.senkouSpanB[f]),t={plotX:l.plotX,plotY:l.plotY,isNull:!1,intersectPoint:!0},l&&(c.senkouSpanA.splice(f,0,t),c.senkouSpanB.splice(f,
|
||||
0,t),v.push(f)))}J(c,function(b,c){e[c]&&"senkouSpan"!==c&&(a.points=p[x],a.options=B(e[c].styles,m),a.graph=a["graph"+c],a.fillGraph=!1,a.color=k,u.prototype.drawGraph.call(a),a["graph"+c]=a.graph);x++});a.graphCollection&&a.graphCollection.forEach(function(b){a[b].destroy();delete a[b]});a.graphCollection=[];if(q&&c.senkouSpanA[0]&&c.senkouSpanB[0]){v.unshift(0);v.push(c.senkouSpanA.length-1);for(h=0;h<v.length-1;h++){f=v[h];l=v[h+1];b=c.senkouSpanB.slice(f,l+1);f=c.senkouSpanA.slice(f,l+1);if(1<=
|
||||
Math.floor(b.length/2))if(l=Math.floor(b.length/2),b[l].plotY===f[l].plotY){for(z=t=l=0;z<b.length;z++)l+=b[z].plotY,t+=f[z].plotY;l=l>t?0:1}else l=b[l].plotY>f[l].plotY?0:1;else l=b[0].plotY>f[0].plotY?0:1;r[l]=r[l].concat(b);A[l]=A[l].concat(f)}["graphsenkouSpanColor","graphsenkouSpanNegativeColor"].forEach(function(b,c){r[c].length&&A[c].length&&(y=0===c?w:q,D({indicator:a,points:r[c],nextPoints:A[c],color:y,options:e,gap:m,graph:a[b]}),a[b]=a.graph,a.graphCollection.push(b))})}else D({indicator:a,
|
||||
points:c.senkouSpanB,nextPoints:c.senkouSpanA,color:w,options:e,gap:m,graph:a.graphsenkouSpan}),a.graphsenkouSpan=a.graph;delete a.nextPoints;delete a.fillGraph;a.points=d;a.options=e;a.graph=g},getGraphPath:function(a){var d=[];a=a||this.points;if(this.fillGraph&&this.nextPoints){var b=u.prototype.getGraphPath.call(this,this.nextPoints);b[0]="L";var e=u.prototype.getGraphPath.call(this,a);b=b.slice(0,e.length);for(var g=b.length-1;0<g;g-=3)d.push(b[g-2],b[g-1],b[g]);e=e.concat(d)}else e=u.prototype.getGraphPath.apply(this,
|
||||
arguments);return e},getValues:function(a,d){var b=d.period,e=d.periodTenkan;d=d.periodSenkouSpanB;var g=a.xData,k=a.yData,m=k&&k.length||0;a=G(a.xAxis);var h=[],p=[],c;if(!(g.length<=b)&&I(k[0])&&4===k[0].length){var v=g[0]-b*a;for(c=0;c<b;c++)p.push(v+c*a);for(c=0;c<m;c++){if(c>=e){var f=k.slice(c-e,c);f=y(f);f=(f.high+f.low)/2}if(c>=b){var w=k.slice(c-b,c);w=y(w);w=(w.high+w.low)/2;var x=(f+w)/2}if(c>=d){var r=k.slice(c-d,c);r=y(r);r=(r.high+r.low)/2}v=k[c][3];var u=g[c];h[c]===q&&(h[c]=[]);h[c+
|
||||
b]===q&&(h[c+b]=[]);h[c+b][0]=f;h[c+b][1]=w;h[c+b][2]=q;h[c][2]=v;c<=b&&(h[c+b][3]=q,h[c+b][4]=q);h[c+2*b]===q&&(h[c+2*b]=[]);h[c+2*b][3]=x;h[c+2*b][4]=r;p.push(u)}for(c=1;c<=b;c++)p.push(u+c*a);return{values:h,xData:p,yData:h}}}});""});g(e,"masters/indicators/ichimoku-kinko-hyo.src.js",[],function(){})});
|
||||
//# sourceMappingURL=ichimoku-kinko-hyo.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
750
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.src.js
vendored
Normal file
750
AdminPoll/bower_components/highcharts/indicators/ichimoku-kinko-hyo.src.js
vendored
Normal file
@@ -0,0 +1,750 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/ichimoku-kinko-hyo', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/ichimoku-kinko-hyo.src.js', [_modules['parts/Globals.js'], _modules['parts/Color.js'], _modules['parts/Utilities.js']], function (H, Color, U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
/* eslint-enable @typescript-eslint/interface-name-prefix */
|
||||
var color = Color.parse;
|
||||
var defined = U.defined,
|
||||
isArray = U.isArray,
|
||||
merge = U.merge,
|
||||
objectEach = U.objectEach,
|
||||
seriesType = U.seriesType;
|
||||
var UNDEFINED,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/* eslint-disable require-jsdoc */
|
||||
// Utils:
|
||||
function maxHigh(arr) {
|
||||
return arr.reduce(function (max, res) {
|
||||
return Math.max(max, res[1]);
|
||||
}, -Infinity);
|
||||
}
|
||||
function minLow(arr) {
|
||||
return arr.reduce(function (min, res) {
|
||||
return Math.min(min, res[2]);
|
||||
}, Infinity);
|
||||
}
|
||||
function highlowLevel(arr) {
|
||||
return {
|
||||
high: maxHigh(arr),
|
||||
low: minLow(arr)
|
||||
};
|
||||
}
|
||||
function getClosestPointRange(axis) {
|
||||
var closestDataRange,
|
||||
loopLength,
|
||||
distance,
|
||||
xData,
|
||||
i;
|
||||
axis.series.forEach(function (series) {
|
||||
if (series.xData) {
|
||||
xData = series.xData;
|
||||
loopLength = series.xIncrement ? 1 : xData.length - 1;
|
||||
for (i = loopLength; i > 0; i--) {
|
||||
distance = xData[i] - xData[i - 1];
|
||||
if (closestDataRange === UNDEFINED ||
|
||||
distance < closestDataRange) {
|
||||
closestDataRange = distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return closestDataRange;
|
||||
}
|
||||
// Check two lines intersection (line a1-a2 and b1-b2)
|
||||
// Source: https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
|
||||
function checkLineIntersection(a1, a2, b1, b2) {
|
||||
if (a1 && a2 && b1 && b2) {
|
||||
var saX = a2.plotX - a1.plotX, // Auxiliary section a2-a1 X
|
||||
saY = a2.plotY - a1.plotY, // Auxiliary section a2-a1 Y
|
||||
sbX = b2.plotX - b1.plotX, // Auxiliary section b2-b1 X
|
||||
sbY = b2.plotY - b1.plotY, // Auxiliary section b2-b1 Y
|
||||
sabX = a1.plotX - b1.plotX, // Auxiliary section a1-b1 X
|
||||
sabY = a1.plotY - b1.plotY, // Auxiliary section a1-b1 Y
|
||||
// First degree Bézier parameters
|
||||
u,
|
||||
t;
|
||||
u = (-saY * sabX + saX * sabY) / (-sbX * saY + saX * sbY);
|
||||
t = (sbX * sabY - sbY * sabX) / (-sbX * saY + saX * sbY);
|
||||
if (u >= 0 && u <= 1 && t >= 0 && t <= 1) {
|
||||
return {
|
||||
plotX: a1.plotX + (t * saX),
|
||||
plotY: a1.plotY + (t * saY)
|
||||
};
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Parameter opt (indicator options object) include indicator, points,
|
||||
// nextPoints, color, options, gappedExtend and graph properties
|
||||
function drawSenkouSpan(opt) {
|
||||
var indicator = opt.indicator;
|
||||
indicator.points = opt.points;
|
||||
indicator.nextPoints = opt.nextPoints;
|
||||
indicator.color = opt.color;
|
||||
indicator.options = merge(opt.options.senkouSpan.styles, opt.gap);
|
||||
indicator.graph = opt.graph;
|
||||
indicator.fillGraph = true;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
// Data integrity in Ichimoku is different than default "averages":
|
||||
// Point: [undefined, value, value, ...] is correct
|
||||
// Point: [undefined, undefined, undefined, ...] is incorrect
|
||||
H.approximations['ichimoku-averages'] = function () {
|
||||
var ret = [],
|
||||
isEmptyRange;
|
||||
[].forEach.call(arguments, function (arr, i) {
|
||||
ret.push(H.approximations.average(arr));
|
||||
isEmptyRange = !isEmptyRange && typeof ret[i] === 'undefined';
|
||||
});
|
||||
// Return undefined when first elem. is undefined and let
|
||||
// sum method handle null (#7377)
|
||||
return isEmptyRange ? void 0 : ret;
|
||||
};
|
||||
/* eslint-enable require-jsdoc */
|
||||
/**
|
||||
* The IKH series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.ikh
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('ikh', 'sma',
|
||||
/**
|
||||
* Ichimoku Kinko Hyo (IKH). This series requires `linkedTo` option to be
|
||||
* set.
|
||||
*
|
||||
* @sample stock/indicators/ichimoku-kinko-hyo
|
||||
* Ichimoku Kinko Hyo indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ichimoku-kinko-hyo
|
||||
* @optionparent plotOptions.ikh
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 26,
|
||||
/**
|
||||
* The base period for Tenkan calculations.
|
||||
*/
|
||||
periodTenkan: 9,
|
||||
/**
|
||||
* The base period for Senkou Span B calculations
|
||||
*/
|
||||
periodSenkouSpanB: 52
|
||||
},
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span> <b> {series.name}</b><br/>' +
|
||||
'TENKAN SEN: {point.tenkanSen:.3f}<br/>' +
|
||||
'KIJUN SEN: {point.kijunSen:.3f}<br/>' +
|
||||
'CHIKOU SPAN: {point.chikouSpan:.3f}<br/>' +
|
||||
'SENKOU SPAN A: {point.senkouSpanA:.3f}<br/>' +
|
||||
'SENKOU SPAN B: {point.senkouSpanB:.3f}<br/>'
|
||||
},
|
||||
/**
|
||||
* The styles for Tenkan line
|
||||
*/
|
||||
tenkanLine: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for Kijun line
|
||||
*/
|
||||
kijunLine: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for Chikou line
|
||||
*/
|
||||
chikouLine: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for Senkou Span A line
|
||||
*/
|
||||
senkouSpanA: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for Senkou Span B line
|
||||
*/
|
||||
senkouSpanB: {
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for area between Senkou Span A and B.
|
||||
*/
|
||||
senkouSpan: {
|
||||
/**
|
||||
* Color of the area between Senkou Span A and B,
|
||||
* when Senkou Span A is above Senkou Span B. Note that if
|
||||
* a `style.fill` is defined, the `color` takes precedence and
|
||||
* the `style.fill` is ignored.
|
||||
*
|
||||
* @see [senkouSpan.styles.fill](#series.ikh.senkouSpan.styles.fill)
|
||||
*
|
||||
* @sample stock/indicators/ichimoku-kinko-hyo
|
||||
* Ichimoku Kinko Hyo color
|
||||
*
|
||||
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
||||
* @since 7.0.0
|
||||
* @apioption plotOptions.ikh.senkouSpan.color
|
||||
*/
|
||||
/**
|
||||
* Color of the area between Senkou Span A and B,
|
||||
* when Senkou Span A is under Senkou Span B.
|
||||
*
|
||||
* @sample stock/indicators/ikh-negative-color
|
||||
* Ichimoku Kinko Hyo negativeColor
|
||||
*
|
||||
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
||||
* @since 7.0.0
|
||||
* @apioption plotOptions.ikh.senkouSpan.negativeColor
|
||||
*/
|
||||
styles: {
|
||||
/**
|
||||
* Color of the area between Senkou Span A and B.
|
||||
*
|
||||
* @deprecated
|
||||
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
||||
*/
|
||||
fill: 'rgba(255, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'ichimoku-averages'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
pointArrayMap: [
|
||||
'tenkanSen',
|
||||
'kijunSen',
|
||||
'chikouSpan',
|
||||
'senkouSpanA',
|
||||
'senkouSpanB'
|
||||
],
|
||||
pointValKey: 'tenkanSen',
|
||||
nameComponents: ['periodSenkouSpanB', 'period', 'periodTenkan'],
|
||||
init: function () {
|
||||
SMA.prototype.init.apply(this, arguments);
|
||||
// Set default color for lines:
|
||||
this.options = merge({
|
||||
tenkanLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
kijunLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
chikouLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
senkouSpanA: {
|
||||
styles: {
|
||||
lineColor: this.color,
|
||||
fill: color(this.color).setOpacity(0.5).get()
|
||||
}
|
||||
},
|
||||
senkouSpanB: {
|
||||
styles: {
|
||||
lineColor: this.color,
|
||||
fill: color(this.color).setOpacity(0.5).get()
|
||||
}
|
||||
},
|
||||
senkouSpan: {
|
||||
styles: {
|
||||
fill: color(this.color).setOpacity(0.2).get()
|
||||
}
|
||||
}
|
||||
}, this.options);
|
||||
},
|
||||
toYData: function (point) {
|
||||
return [
|
||||
point.tenkanSen,
|
||||
point.kijunSen,
|
||||
point.chikouSpan,
|
||||
point.senkouSpanA,
|
||||
point.senkouSpanB
|
||||
];
|
||||
},
|
||||
translate: function () {
|
||||
var indicator = this;
|
||||
SMA.prototype.translate.apply(indicator);
|
||||
indicator.points.forEach(function (point) {
|
||||
indicator.pointArrayMap.forEach(function (value) {
|
||||
if (defined(point[value])) {
|
||||
point['plot' + value] =
|
||||
indicator.yAxis.toPixels(point[value], true);
|
||||
// Add extra parameters for support tooltip in moved
|
||||
// lines
|
||||
point.plotY = point['plot' + value];
|
||||
point.tooltipPos = [
|
||||
point.plotX,
|
||||
point['plot' + value]
|
||||
];
|
||||
point.isNull = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// One does not simply
|
||||
// Render five linesZ
|
||||
// And an arearange
|
||||
// In just one series..
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
mainLinePoints = (indicator.points),
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = (indicator.options),
|
||||
mainLinePath = (indicator.graph),
|
||||
mainColor = indicator.color,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
pointArrayMapLength = indicator.pointArrayMap.length,
|
||||
allIchimokuPoints = [[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]],
|
||||
ikhMap = {
|
||||
tenkanLine: allIchimokuPoints[0],
|
||||
kijunLine: allIchimokuPoints[1],
|
||||
chikouLine: allIchimokuPoints[2],
|
||||
senkouSpanA: allIchimokuPoints[3],
|
||||
senkouSpanB: allIchimokuPoints[4],
|
||||
senkouSpan: allIchimokuPoints[5]
|
||||
},
|
||||
intersectIndexColl = [],
|
||||
senkouSpanOptions = indicator.options.senkouSpan,
|
||||
color = (senkouSpanOptions.color ||
|
||||
senkouSpanOptions.styles.fill),
|
||||
negativeColor = (senkouSpanOptions.negativeColor),
|
||||
// Points to create color and negativeColor senkouSpan
|
||||
points = [
|
||||
[],
|
||||
[] // Points negative color
|
||||
],
|
||||
// For span, we need an access to the next points, used in
|
||||
// getGraphPath()
|
||||
nextPoints = [
|
||||
[],
|
||||
[] // NextPoints negative color
|
||||
],
|
||||
lineIndex = 0,
|
||||
position,
|
||||
point,
|
||||
i,
|
||||
startIntersect,
|
||||
endIntersect,
|
||||
sectionPoints,
|
||||
sectionNextPoints,
|
||||
pointsPlotYSum,
|
||||
nextPointsPlotYSum,
|
||||
senkouSpanTempColor,
|
||||
concatArrIndex,
|
||||
j,
|
||||
k;
|
||||
indicator.ikhMap = ikhMap;
|
||||
// Generate points for all lines and spans lines:
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
for (i = 0; i < pointArrayMapLength; i++) {
|
||||
position = indicator.pointArrayMap[i];
|
||||
if (defined(point[position])) {
|
||||
allIchimokuPoints[i].push({
|
||||
plotX: point.plotX,
|
||||
plotY: point['plot' + position],
|
||||
isNull: false
|
||||
});
|
||||
}
|
||||
}
|
||||
if (negativeColor &&
|
||||
pointsLength !== mainLinePoints.length - 1) {
|
||||
// Check if lines intersect
|
||||
var index = ikhMap.senkouSpanB.length - 1,
|
||||
intersect = checkLineIntersection(ikhMap.senkouSpanA[index - 1],
|
||||
ikhMap.senkouSpanA[index],
|
||||
ikhMap.senkouSpanB[index - 1],
|
||||
ikhMap.senkouSpanB[index]),
|
||||
intersectPointObj = {
|
||||
plotX: intersect.plotX,
|
||||
plotY: intersect.plotY,
|
||||
isNull: false,
|
||||
intersectPoint: true
|
||||
};
|
||||
if (intersect) {
|
||||
// Add intersect point to ichimoku points collection
|
||||
// Create senkouSpan sections
|
||||
ikhMap.senkouSpanA.splice(index, 0, intersectPointObj);
|
||||
ikhMap.senkouSpanB.splice(index, 0, intersectPointObj);
|
||||
intersectIndexColl.push(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Modify options and generate lines:
|
||||
objectEach(ikhMap, function (values, lineName) {
|
||||
if (mainLineOptions[lineName] &&
|
||||
lineName !== 'senkouSpan') {
|
||||
// First line is rendered by default option
|
||||
indicator.points = allIchimokuPoints[lineIndex];
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
indicator.fillGraph = false;
|
||||
indicator.color = mainColor;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save line
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
lineIndex++;
|
||||
});
|
||||
// Generate senkouSpan area:
|
||||
// If graphColection exist then remove svg
|
||||
// element and indicator property
|
||||
if (indicator.graphCollection) {
|
||||
indicator.graphCollection.forEach(function (graphName) {
|
||||
indicator[graphName].destroy();
|
||||
delete indicator[graphName];
|
||||
});
|
||||
}
|
||||
// Clean grapCollection or initialize it
|
||||
indicator.graphCollection = [];
|
||||
// When user set negativeColor property
|
||||
if (negativeColor &&
|
||||
ikhMap.senkouSpanA[0] &&
|
||||
ikhMap.senkouSpanB[0]) {
|
||||
// Add first and last point to senkouSpan area sections
|
||||
intersectIndexColl.unshift(0);
|
||||
intersectIndexColl.push(ikhMap.senkouSpanA.length - 1);
|
||||
// Populate points and nextPoints arrays
|
||||
for (j = 0; j < intersectIndexColl.length - 1; j++) {
|
||||
startIntersect = intersectIndexColl[j];
|
||||
endIntersect = intersectIndexColl[j + 1];
|
||||
sectionPoints = ikhMap.senkouSpanB.slice(startIntersect, endIntersect + 1);
|
||||
sectionNextPoints = ikhMap.senkouSpanA.slice(startIntersect, endIntersect + 1);
|
||||
// Add points to color or negativeColor arrays
|
||||
// Check the middle point (if exist)
|
||||
if (Math.floor(sectionPoints.length / 2) >= 1) {
|
||||
var x = Math.floor(sectionPoints.length / 2);
|
||||
// When middle points has equal values
|
||||
// Compare all ponints plotY value sum
|
||||
if (sectionPoints[x].plotY ===
|
||||
sectionNextPoints[x].plotY) {
|
||||
pointsPlotYSum = 0;
|
||||
nextPointsPlotYSum = 0;
|
||||
for (k = 0; k < sectionPoints.length; k++) {
|
||||
pointsPlotYSum +=
|
||||
sectionPoints[k].plotY;
|
||||
nextPointsPlotYSum +=
|
||||
sectionNextPoints[k].plotY;
|
||||
}
|
||||
concatArrIndex = (pointsPlotYSum > nextPointsPlotYSum ? 0 : 1);
|
||||
points[concatArrIndex] = (points[concatArrIndex].concat(sectionPoints));
|
||||
nextPoints[concatArrIndex] = (nextPoints[concatArrIndex].concat(sectionNextPoints));
|
||||
}
|
||||
else {
|
||||
// Compare middle point of the section
|
||||
concatArrIndex = (sectionPoints[x].plotY >
|
||||
sectionNextPoints[x].plotY ?
|
||||
0 : 1);
|
||||
points[concatArrIndex] = (points[concatArrIndex].concat(sectionPoints));
|
||||
nextPoints[concatArrIndex] = (nextPoints[concatArrIndex].concat(sectionNextPoints));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Compare first point of the section
|
||||
concatArrIndex = (sectionPoints[0].plotY >
|
||||
sectionNextPoints[0].plotY ?
|
||||
0 : 1);
|
||||
points[concatArrIndex] = (points[concatArrIndex].concat(sectionPoints));
|
||||
nextPoints[concatArrIndex] = (nextPoints[concatArrIndex].concat(sectionNextPoints));
|
||||
}
|
||||
}
|
||||
// Render color and negativeColor paths
|
||||
[
|
||||
'graphsenkouSpanColor', 'graphsenkouSpanNegativeColor'
|
||||
].forEach(function (areaName, i) {
|
||||
if (points[i].length && nextPoints[i].length) {
|
||||
senkouSpanTempColor = (i === 0) ?
|
||||
color : negativeColor;
|
||||
drawSenkouSpan({
|
||||
indicator: indicator,
|
||||
points: points[i],
|
||||
nextPoints: nextPoints[i],
|
||||
color: senkouSpanTempColor,
|
||||
options: mainLineOptions,
|
||||
gap: gappedExtend,
|
||||
graph: indicator[areaName]
|
||||
});
|
||||
// Now save line
|
||||
indicator[areaName] = indicator.graph;
|
||||
indicator.graphCollection.push(areaName);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
// When user set only senkouSpan style.fill property
|
||||
drawSenkouSpan({
|
||||
indicator: indicator,
|
||||
points: ikhMap.senkouSpanB,
|
||||
nextPoints: ikhMap.senkouSpanA,
|
||||
color: color,
|
||||
options: mainLineOptions,
|
||||
gap: gappedExtend,
|
||||
graph: indicator.graphsenkouSpan
|
||||
});
|
||||
// Now save line
|
||||
indicator.graphsenkouSpan = indicator.graph;
|
||||
}
|
||||
// Clean temporary properties:
|
||||
delete indicator.nextPoints;
|
||||
delete indicator.fillGraph;
|
||||
// Restore options and draw the Tenkan line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
},
|
||||
getGraphPath: function (points) {
|
||||
var indicator = this,
|
||||
path = [],
|
||||
spanA,
|
||||
fillArray = [],
|
||||
spanAarr = [];
|
||||
points = points || this.points;
|
||||
// Render Senkou Span
|
||||
if (indicator.fillGraph && indicator.nextPoints) {
|
||||
spanA = SMA.prototype.getGraphPath.call(indicator,
|
||||
// Reverse points, so Senkou Span A will start from the end:
|
||||
indicator.nextPoints);
|
||||
spanA[0] = 'L';
|
||||
path = SMA.prototype.getGraphPath.call(indicator, points);
|
||||
spanAarr = spanA.slice(0, path.length);
|
||||
for (var i = (spanAarr.length - 1); i > 0; i -= 3) {
|
||||
fillArray.push(spanAarr[i - 2], spanAarr[i - 1], spanAarr[i]);
|
||||
}
|
||||
path = path.concat(fillArray);
|
||||
}
|
||||
else {
|
||||
path = SMA.prototype.getGraphPath.apply(indicator, arguments);
|
||||
}
|
||||
return path;
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
periodTenkan = params.periodTenkan,
|
||||
periodSenkouSpanB = params.periodSenkouSpanB,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
xAxis = series.xAxis,
|
||||
yValLen = (yVal && yVal.length) || 0,
|
||||
closestPointRange = getClosestPointRange(xAxis),
|
||||
IKH = [],
|
||||
xData = [],
|
||||
dateStart,
|
||||
date,
|
||||
slicedTSY,
|
||||
slicedKSY,
|
||||
slicedSSBY,
|
||||
pointTS,
|
||||
pointKS,
|
||||
pointSSB,
|
||||
i,
|
||||
TS,
|
||||
KS,
|
||||
CS,
|
||||
SSA,
|
||||
SSB;
|
||||
// Ikh requires close value
|
||||
if (xVal.length <= period ||
|
||||
!isArray(yVal[0]) ||
|
||||
yVal[0].length !== 4) {
|
||||
return;
|
||||
}
|
||||
// Add timestamps at the beginning
|
||||
dateStart = xVal[0] - (period * closestPointRange);
|
||||
for (i = 0; i < period; i++) {
|
||||
xData.push(dateStart + i * closestPointRange);
|
||||
}
|
||||
for (i = 0; i < yValLen; i++) {
|
||||
// Tenkan Sen
|
||||
if (i >= periodTenkan) {
|
||||
slicedTSY = yVal.slice(i - periodTenkan, i);
|
||||
pointTS = highlowLevel(slicedTSY);
|
||||
TS = (pointTS.high + pointTS.low) / 2;
|
||||
}
|
||||
if (i >= period) {
|
||||
slicedKSY = yVal.slice(i - period, i);
|
||||
pointKS = highlowLevel(slicedKSY);
|
||||
KS = (pointKS.high + pointKS.low) / 2;
|
||||
SSA = (TS + KS) / 2;
|
||||
}
|
||||
if (i >= periodSenkouSpanB) {
|
||||
slicedSSBY = yVal.slice(i - periodSenkouSpanB, i);
|
||||
pointSSB = highlowLevel(slicedSSBY);
|
||||
SSB = (pointSSB.high + pointSSB.low) / 2;
|
||||
}
|
||||
CS = yVal[i][3];
|
||||
date = xVal[i];
|
||||
if (IKH[i] === UNDEFINED) {
|
||||
IKH[i] = [];
|
||||
}
|
||||
if (IKH[i + period] === UNDEFINED) {
|
||||
IKH[i + period] = [];
|
||||
}
|
||||
IKH[i + period][0] = TS;
|
||||
IKH[i + period][1] = KS;
|
||||
IKH[i + period][2] = UNDEFINED;
|
||||
IKH[i][2] = CS;
|
||||
if (i <= period) {
|
||||
IKH[i + period][3] = UNDEFINED;
|
||||
IKH[i + period][4] = UNDEFINED;
|
||||
}
|
||||
if (IKH[i + 2 * period] === UNDEFINED) {
|
||||
IKH[i + 2 * period] = [];
|
||||
}
|
||||
IKH[i + 2 * period][3] = SSA;
|
||||
IKH[i + 2 * period][4] = SSB;
|
||||
xData.push(date);
|
||||
}
|
||||
// Add timestamps for further points
|
||||
for (i = 1; i <= period; i++) {
|
||||
xData.push(date + i * closestPointRange);
|
||||
}
|
||||
return {
|
||||
values: IKH,
|
||||
xData: xData,
|
||||
yData: IKH
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `IKH` series. If the [type](#series.ikh.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.ikh
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/ichimoku-kinko-hyo
|
||||
* @apioption series.ikh
|
||||
*/
|
||||
''; // add doclet above to transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/ichimoku-kinko-hyo.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
27
AdminPoll/bower_components/highcharts/indicators/indicators-all.d.ts
vendored
Normal file
27
AdminPoll/bower_components/highcharts/indicators/indicators-all.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {
|
||||
/**
|
||||
* Utility function to check if an item is an array.
|
||||
*
|
||||
* @param obj
|
||||
* The item to check.
|
||||
*
|
||||
* @return True if the argument is an array.
|
||||
*/
|
||||
function isArray(obj: any): boolean;
|
||||
}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
126
AdminPoll/bower_components/highcharts/indicators/indicators-all.js
vendored
Normal file
126
AdminPoll/bower_components/highcharts/indicators/indicators-all.js
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
All technical indicators for Highstock
|
||||
|
||||
(c) 2010-2019 Pawel Fus
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(h){"object"===typeof module&&module.exports?(h["default"]=h,module.exports=h):"function"===typeof define&&define.amd?define("highcharts/indicators/indicators-all",["highcharts","highcharts/modules/stock"],function(t){h(t);h.Highcharts=t;return h}):h("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(h){function t(e,g,l,k){e.hasOwnProperty(g)||(e[g]=k.apply(null,l))}h=h?h._modules:{};t(h,"mixins/indicator-required.js",[h["parts/Utilities.js"]],function(e){var g=e.error;return{isParentLoaded:function(l,
|
||||
k,f,d,c){if(l)return d?d(l):!0;g(c||this.generateMessage(f,k));return!1},generateMessage:function(l,k){return'Error: "'+l+'" indicator type requires "'+k+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+l}}});t(h,"indicators/indicators.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.addEvent,f=g.error,d=g.extend,c=g.isArray,a=g.pick,b=g.seriesType,u=g.splat,r=e.Series,n=e.seriesTypes,
|
||||
q=e.seriesTypes.ohlc.prototype,m=l.generateMessage;k(e.Series,"init",function(a){a=a.options;a.useOhlcData&&"highcharts-navigator-series"!==a.id&&d(this,{pointValKey:q.pointValKey,keys:q.keys,pointArrayMap:q.pointArrayMap,toYData:q.toYData})});k(r,"afterSetOptions",function(a){a=a.options;var c=a.dataGrouping;c&&a.useOhlcData&&"highcharts-navigator-series"!==a.id&&(c.approximation="ohlc")});b("sma","line",{name:void 0,tooltip:{valueDecimals:4},linkedTo:void 0,compareToMain:!1,params:{index:0,period:14}},
|
||||
{processData:function(){var a=this.options.compareToMain,c=this.linkedParent;r.prototype.processData.apply(this,arguments);c&&c.compareValue&&a&&(this.compareValue=c.compareValue)},bindTo:{series:!0,eventName:"updatedData"},hasDerivedData:!0,useCommonDataGrouping:!0,nameComponents:["period"],nameSuffixes:[],calculateOn:"init",requiredIndicators:[],requireIndicators:function(){var a={allLoaded:!0};this.requiredIndicators.forEach(function(c){n[c]?n[c].prototype.requireIndicators():(a.allLoaded=!1,a.needed=
|
||||
c)});return a},init:function(a,c){function d(){var a=b.points||[],c=(b.xData||[]).length,d=b.getValues(b.linkedParent,b.options.params)||{values:[],xData:[],yData:[]},f=[],p=!0;if(c&&!b.hasGroupedData&&b.visible&&b.points)if(b.cropped){if(b.xAxis){var n=b.xAxis.min;var r=b.xAxis.max}c=b.cropData(d.xData,d.yData,n,r);for(n=0;n<c.xData.length;n++)f.push([c.xData[n]].concat(u(c.yData[n])));c=d.xData.indexOf(b.xData[0]);n=d.xData.indexOf(b.xData[b.xData.length-1]);-1===c&&n===d.xData.length-2&&f[0][0]===
|
||||
a[0].x&&f.shift();b.updateData(f)}else d.xData.length!==c-1&&d.xData.length!==c+1&&(p=!1,b.updateData(d.values));p&&(b.xData=d.xData,b.yData=d.yData,b.options.data=d.values);!1===b.bindTo.series&&(delete b.processedXData,b.isDirty=!0,b.redraw());b.isDirtyData=!1}var b=this,p=b.requireIndicators();if(!p.allLoaded)return f(m(b.type,p.needed));r.prototype.init.call(b,a,c);a.linkSeries();b.dataEventsToUnbind=[];if(!b.linkedParent)return f("Series "+b.options.linkedTo+" not found! Check `linkedTo`.",!1,
|
||||
a);b.dataEventsToUnbind.push(k(b.bindTo.series?b.linkedParent:b.linkedParent.xAxis,b.bindTo.eventName,d));if("init"===b.calculateOn)d();else var n=k(b.chart,b.calculateOn,function(){d();n()});return b},getName:function(){var b=this.name,c=[];b||((this.nameComponents||[]).forEach(function(b,d){c.push(this.options.params[b]+a(this.nameSuffixes[d],""))},this),b=(this.nameBase||this.type.toUpperCase())+(this.nameComponents?" ("+c.join(", ")+")":""));return b},getValues:function(a,b){var d=b.period,f=
|
||||
a.xData;a=a.yData;var u=a.length,n=0,p=0,r=[],k=[],q=[],m=-1;if(!(f.length<d)){for(c(a[0])&&(m=b.index?b.index:0);n<d-1;)p+=0>m?a[n]:a[n][m],n++;for(b=n;b<u;b++){p+=0>m?a[b]:a[b][m];var l=[f[b],p/d];r.push(l);k.push(l[0]);q.push(l[1]);p-=0>m?a[b-n]:a[b-n][m]}return{values:r,xData:k,yData:q}}},destroy:function(){this.dataEventsToUnbind.forEach(function(a){a()});r.prototype.destroy.apply(this,arguments)}});""});t(h,"indicators/accumulation-distribution.src.js",[h["parts/Utilities.js"]],function(e){var g=
|
||||
e.error;e=e.seriesType;e("ad","sma",{params:{volumeSeriesID:"volume"}},{nameComponents:!1,nameBase:"Accumulation/Distribution",getValues:function(l,k){var f=k.period,d=l.xData,c=l.yData,a=k.volumeSeriesID,b=l.chart.get(a);k=b&&b.yData;var u=c?c.length:0,r=[],n=[],q=[];if(!(d.length<=f&&u&&4!==c[0].length)){if(b){for(;f<u;f++){l=r.length;a=c[f][1];b=c[f][2];var m=c[f][3],p=k[f];a=[d[f],m===a&&m===b||a===b?0:(2*m-b-a)/(a-b)*p];0<l&&(a[1]+=r[l-1][1]);r.push(a);n.push(a[0]);q.push(a[1])}return{values:r,
|
||||
xData:n,yData:q}}g("Series "+a+" not found! Check `volumeSeriesID`.",!0,l.chart)}}});""});t(h,"indicators/ao.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){var l=g.correctFloat,k=g.isArray;g=g.seriesType;g("ao","sma",{greaterBarColor:"#06B535",lowerBarColor:"#F21313",threshold:0,groupPadding:.2,pointPadding:.2,states:{hover:{halo:{size:0}}}},{nameBase:"AO",nameComponents:!1,markerAttribs:e.noop,getColumnMetrics:e.seriesTypes.column.prototype.getColumnMetrics,crispCol:e.seriesTypes.column.prototype.crispCol,
|
||||
translate:e.seriesTypes.column.prototype.translate,drawPoints:e.seriesTypes.column.prototype.drawPoints,drawGraph:function(){var f=this.options,d=this.points,c=f.greaterBarColor;f=f.lowerBarColor;var a=d[0];if(!this.userOptions.color&&a)for(a.color=c,a=1;a<d.length;a++)d[a].color=d[a].y>d[a-1].y?c:d[a].y<d[a-1].y?f:d[a-1].color},getValues:function(f){var d=f.xData||[];f=f.yData||[];var c=f.length,a=[],b=[],u=[],r=0,n=0,q;if(!(34>=d.length)&&k(f[0])&&4===f[0].length){for(q=0;33>q;q++){var m=(f[q][1]+
|
||||
f[q][2])/2;29<=q&&(r=l(r+m));n=l(n+m)}for(q=33;q<c;q++){m=(f[q][1]+f[q][2])/2;r=l(r+m);n=l(n+m);m=r/5;var p=n/34;m=l(m-p);a.push([d[q],m]);b.push(d[q]);u.push(m);m=q+1-5;p=q+1-34;r=l(r-(f[m][1]+f[m][2])/2);n=l(n-(f[p][1]+f[p][2])/2)}return{values:a,xData:b,yData:u}}}});""});t(h,"mixins/multipe-lines.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){var l=g.defined,k=g.error,f=g.merge,d=e.each,c=e.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],
|
||||
getTranslatedLinesNames:function(a){var b=[];d(this.pointArrayMap,function(c){c!==a&&b.push("plot"+c.charAt(0).toUpperCase()+c.slice(1))});return b},toYData:function(a){var b=[];d(this.pointArrayMap,function(c){b.push(a[c])});return b},translate:function(){var a=this,b=a.pointArrayMap,f=[],r;f=a.getTranslatedLinesNames();c.prototype.translate.apply(a,arguments);d(a.points,function(c){d(b,function(b,d){r=c[b];null!==r&&(c[f[d]]=a.yAxis.toPixels(r,!0))})})},drawGraph:function(){var a=this,b=a.linesApiNames,
|
||||
u=a.points,r=u.length,n=a.options,q=a.graph,m={options:{gapSize:n.gapSize}},p=[],g=a.getTranslatedLinesNames(a.pointValKey),w;d(g,function(a,b){for(p[b]=[];r--;)w=u[r],p[b].push({x:w.x,plotX:w.plotX,plotY:w[a],isNull:!l(w[a])});r=u.length});d(b,function(b,d){p[d]?(a.points=p[d],n[b]?a.options=f(n[b].styles,m):k('Error: "There is no '+b+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),a.graph=a["graph"+b],c.prototype.drawGraph.call(a),
|
||||
a["graph"+b]=a.graph):k('Error: "'+b+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=u;a.options=n;a.graph=q;c.prototype.drawGraph.call(a)}}});t(h,"indicators/aroon.src.js",[h["parts/Utilities.js"],h["mixins/multipe-lines.js"]],function(e,g){function l(d,c){var a=d[0],b=0,f;for(f=1;f<d.length;f++)if("max"===c&&d[f]>=a||"min"===c&&d[f]<=a)a=d[f],b=f;return b}var k=e.merge,f=e.pick;e=e.seriesType;e("aroon","sma",{params:{period:25},
|
||||
marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Aroon Up: {point.y}<br/>Aroon Down: {point.aroonDown}<br/>'},aroonDown:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}},k(g,{nameBase:"Aroon",pointArrayMap:["y","aroonDown"],pointValKey:"y",linesApiNames:["aroonDown"],getValues:function(d,c){c=c.period;var a=d.xData,b=(d=d.yData)?d.length:0,u=[],r=[],n=[],k;for(k=c-1;k<b;k++){var m=d.slice(k-c+1,k+2);var p=
|
||||
l(m.map(function(a){return f(a[2],a)}),"min");m=l(m.map(function(a){return f(a[1],a)}),"max");m=m/c*100;p=p/c*100;a[k+1]&&(u.push([a[k+1],m,p]),r.push(a[k+1]),n.push([m,p]))}return{values:u,xData:r,yData:n}}}));""});t(h,"indicators/aroon-oscillator.src.js",[h["parts/Globals.js"],h["mixins/multipe-lines.js"],h["mixins/indicator-required.js"],h["parts/Utilities.js"]],function(e,g,l,k){var f=k.merge;k=k.seriesType;var d=e.seriesTypes.aroon;k("aroonoscillator","aroon",{params:{period:25},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b>: {point.y}'}},
|
||||
f(g,{nameBase:"Aroon Oscillator",pointArrayMap:["y"],pointValKey:"y",linesApiNames:[],init:function(){var c=arguments,a=this;l.isParentLoaded(d,"aroon",a.type,function(b){b.prototype.init.apply(a,c)})},getValues:function(c,a){var b=[],f=[],k=[];c=d.prototype.getValues.call(this,c,a);for(a=0;a<c.yData.length;a++){var n=c.yData[a][0];var q=c.yData[a][1];n-=q;b.push([c.xData[a],n]);f.push(c.xData[a]);k.push(n)}return{values:b,xData:f,yData:k}}}));""});t(h,"indicators/atr.src.js",[h["parts/Utilities.js"]],
|
||||
function(e){function g(f,d){return Math.max(f[1]-f[2],d===k?0:Math.abs(f[1]-d[3]),d===k?0:Math.abs(f[2]-d[3]))}var l=e.isArray;e=e.seriesType;var k;e("atr","sma",{params:{period:14}},{getValues:function(f,d){d=d.period;var c=f.xData,a=(f=f.yData)?f.length:0,b=1,k=0,r=0,n=[],q=[],m=[],p;var e=[[c[0],f[0]]];if(!(c.length<=d)&&l(f[0])&&4===f[0].length){for(p=1;p<=a;p++)if(e.push([c[p],f[p]]),d<b){var w=d;var v=c[p-1],A=g(f[p-1],f[p-2]);w=[v,(k*(w-1)+A)/w];k=w[1];n.push(w);q.push(w[0]);m.push(w[1])}else d===
|
||||
b?(k=r/(p-1),n.push([c[p-1],k]),q.push(c[p-1]),m.push(k)):r+=g(f[p-1],f[p-2]),b++;return{values:n,xData:q,yData:m}}}});""});t(h,"indicators/bollinger-bands.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/multipe-lines.js"]],function(e,g,l){var k=g.isArray,f=g.merge;g=g.seriesType;var d=e.seriesTypes.sma;g("bb","sma",{params:{period:20,standardDeviation:2,index:3},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Top: {point.top}<br/>Middle: {point.middle}<br/>Bottom: {point.bottom}<br/>'},
|
||||
marker:{enabled:!1},dataGrouping:{approximation:"averages"}},f(l,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",nameComponents:["period","standardDeviation"],linesApiNames:["topLine","bottomLine"],init:function(){d.prototype.init.apply(this,arguments);this.options=f({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},getValues:function(c,a){var b=a.period,f=a.standardDeviation,r=c.xData,n=(c=c.yData)?c.length:0,q=[],m=[],p=[],l;if(!(r.length<
|
||||
b)){var w=k(c[0]);for(l=b;l<=n;l++){var v=r.slice(l-b,l);var g=c.slice(l-b,l);var e=d.prototype.getValues.call(this,{xData:v,yData:g},a);v=e.xData[0];e=e.yData[0];for(var h=0,x=g.length,y=0;y<x;y++){var E=(w?g[y][a.index]:g[y])-e;h+=E*E}E=Math.sqrt(h/(x-1));g=e+f*E;E=e-f*E;q.push([v,g,e,E]);m.push(v);p.push([g,e,E])}return{values:q,xData:m,yData:p}}}}));""});t(h,"indicators/cci.src.js",[h["parts/Utilities.js"]],function(e){function g(k){return k.reduce(function(f,d){return f+d},0)}var l=e.isArray;
|
||||
e=e.seriesType;e("cci","sma",{params:{period:14}},{getValues:function(k,f){f=f.period;var d=k.xData,c=(k=k.yData)?k.length:0,a=[],b=1,u=[],r=[],n=[];if(!(d.length<=f)&&l(k[0])&&4===k[0].length){for(;b<f;){var q=k[b-1];a.push((q[1]+q[2]+q[3])/3);b++}for(b=f;b<=c;b++){q=k[b-1];q=(q[1]+q[2]+q[3])/3;var m=a.push(q);var p=a.slice(m-f);m=g(p)/f;var e,w=p.length,v=0;for(e=0;e<w;e++)v+=Math.abs(m-p[e]);p=v/f;q=(q-m)/(.015*p);u.push([d[b-1],q]);r.push(d[b-1]);n.push(q)}return{values:u,xData:r,yData:n}}}});
|
||||
""});t(h,"indicators/cmf.src.js",[h["parts/Utilities.js"]],function(e){e=e.seriesType;e("cmf","sma",{params:{period:14,volumeSeriesID:"volume"}},{nameBase:"Chaikin Money Flow",isValid:function(){var g=this.chart,l=this.options,k=this.linkedParent;g=this.volumeSeries||(this.volumeSeries=g.get(l.params.volumeSeriesID));var f=k&&k.yData&&4===k.yData[0].length;return!!(k&&g&&k.xData&&k.xData.length>=l.params.period&&g.xData&&g.xData.length>=l.params.period&&f)},getValues:function(g,l){if(this.isValid())return this.getMoneyFlow(g.xData,
|
||||
g.yData,this.volumeSeries.yData,l.period)},getMoneyFlow:function(g,l,k,f){function d(a,b){var c=a[1],d=a[2];a=a[3];return null!==b&&null!==c&&null!==d&&null!==a&&c!==d?(a-d-(c-a))/(c-d)*b:(p=m,null)}var c=l.length,a=[],b=0,u=0,r=[],n=[],q=[],m,p=-1;if(0<f&&f<=c){for(m=0;m<f;m++)a[m]=d(l[m],k[m]),b+=k[m],u+=a[m];r.push(g[m-1]);n.push(m-p>=f&&0!==b?u/b:null);for(q.push([r[0],n[0]]);m<c;m++){a[m]=d(l[m],k[m]);b-=k[m-f];b+=k[m];u-=a[m-f];u+=a[m];var e=[g[m],m-p>=f?u/b:null];r.push(e[0]);n.push(e[1]);
|
||||
q.push([e[0],e[1]])}}return{values:q,xData:r,yData:n}}});""});t(h,"indicators/dpo.src.js",[h["parts/Utilities.js"]],function(e){function g(f,d,c,a,b){d=k(d[c][a],d[c]);return b?l(f-d):l(f+d)}var l=e.correctFloat,k=e.pick;e=e.seriesType;e("dpo","sma",{params:{period:21}},{nameBase:"DPO",getValues:function(f,d){var c=d.period;d=d.index;var a=c+Math.floor(c/2+1),b=f.xData||[];f=f.yData||[];var u=f.length,r=[],n=[],l=[],m=0,p,e;if(!(b.length<=a)){for(p=0;p<c-1;p++)m=g(m,f,p,d);for(e=0;e<=u-a;e++){var w=
|
||||
e+c-1;p=e+a-1;m=g(m,f,w,d);w=k(f[p][d],f[p]);w-=m/c;m=g(m,f,e,d,!0);r.push([b[p],w]);n.push(b[p]);l.push(w)}return{values:r,xData:n,yData:l}}}});""});t(h,"indicators/ema.src.js",[h["parts/Utilities.js"]],function(e){var g=e.correctFloat,l=e.isArray;e=e.seriesType;e("ema","sma",{params:{index:3,period:9}},{accumulatePeriodPoints:function(k,f,d){for(var c=0,a=0,b;a<k;)b=0>f?d[a]:d[a][f],c+=b,a++;return c},calculateEma:function(k,f,d,c,a,b,u){k=k[d-1];f=0>b?f[d-1]:f[d-1][b];c="undefined"===typeof a?
|
||||
u:g(f*c+a*(1-c));return[k,c]},getValues:function(k,f){var d=f.period,c=k.xData,a=(k=k.yData)?k.length:0,b=2/(d+1),u=[],r=[],n=[],q=-1;if(!(a<d)){l(k[0])&&(q=f.index?f.index:0);f=this.accumulatePeriodPoints(d,q,k);for(f/=d;d<a+1;d++){var m=this.calculateEma(c,k,d,b,m,q,f);u.push(m);r.push(m[0]);n.push(m[1]);m=m[1]}return{values:u,xData:r,yData:n}}}});""});t(h,"indicators/chaikin.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.correctFloat,
|
||||
f=g.error;g=g.seriesType;var d=e.seriesTypes.ema,c=e.seriesTypes.ad;g("chaikin","ema",{params:{volumeSeriesID:"volume",periods:[3,10]}},{nameBase:"Chaikin Osc",nameComponents:["periods"],init:function(){var a=arguments,b=this;l.isParentLoaded(d,"ema",b.type,function(c){c.prototype.init.apply(b,a)})},getValues:function(a,b){var u=b.periods,r=b.period,n=[],l=[],m=[],p;if(2!==u.length||u[1]<=u[0])f('Error: "Chaikin requires two periods. Notice, first period should be lower than the second one."');else if(b=
|
||||
c.prototype.getValues.call(this,a,{volumeSeriesID:b.volumeSeriesID,period:r}))if(a=d.prototype.getValues.call(this,b,{period:u[0]}),b=d.prototype.getValues.call(this,b,{period:u[1]}),a&&b){u=u[1]-u[0];for(p=0;p<b.yData.length;p++)r=k(a.yData[p+u]-b.yData[p]),n.push([b.xData[p],r]),l.push(b.xData[p]),m.push(r);return{values:n,xData:l,yData:m}}}});""});t(h,"indicators/dema.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.correctFloat,
|
||||
f=g.isArray;g=g.seriesType;var d=e.seriesTypes.ema;g("dema","ema",{},{init:function(){var c=arguments,a=this;l.isParentLoaded(d,"ema",a.type,function(b){b.prototype.init.apply(a,c)})},getEMA:function(c,a,b,f,k,n){return d.prototype.calculateEma(n||[],c,"undefined"===typeof k?1:k,this.chart.series[0].EMApercent,a,"undefined"===typeof f?-1:f,b)},getValues:function(c,a){var b=a.period,l=2*b,r=c.xData,n=c.yData,q=n?n.length:0,m=-1,p=[],g=[],w=[],e=0,A=[],h;c.EMApercent=2/(b+1);if(!(q<2*b-1)){f(n[0])&&
|
||||
(m=a.index?a.index:0);c=d.prototype.accumulatePeriodPoints(b,m,n);a=c/b;c=0;for(h=b;h<q+2;h++){h<q+1&&(e=this.getEMA(n,z,a,m,h)[1],A.push(e));var z=e;if(h<l)c+=e;else{h===l&&(a=c/b);e=A[h-b-1];var x=this.getEMA([e],x,a)[1];var y=[r[h-2],k(2*e-x)];p.push(y);g.push(y[0]);w.push(y[1])}}return{values:p,xData:g,yData:w}}}});""});t(h,"indicators/tema.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.correctFloat,f=g.isArray;g=g.seriesType;
|
||||
var d=e.seriesTypes.ema;g("tema","ema",{},{init:function(){var c=arguments,a=this;l.isParentLoaded(d,"ema",a.type,function(b){b.prototype.init.apply(a,c)})},getEMA:function(c,a,b,f,k,n){return d.prototype.calculateEma(n||[],c,"undefined"===typeof k?1:k,this.chart.series[0].EMApercent,a,"undefined"===typeof f?-1:f,b)},getTemaPoint:function(c,a,b,d){return[c[d-3],k(3*b.level1-3*b.level2+b.level3)]},getValues:function(c,a){var b=a.period,k=2*b,l=3*b,n=c.xData,g=c.yData,m=g?g.length:0,p=-1,e=[],w=[],
|
||||
v=[],A=[],h=[],z,x,y={};c.EMApercent=2/(b+1);if(!(m<3*b-2)){f(g[0])&&(p=a.index?a.index:0);c=d.prototype.accumulatePeriodPoints(b,p,g);a=c/b;c=0;for(z=b;z<m+3;z++){z<m+1&&(y.level1=this.getEMA(g,E,a,p,z)[1],A.push(y.level1));var E=y.level1;if(z<k)c+=y.level1;else{z===k&&(a=c/b,c=0);y.level1=A[z-b-1];y.level2=this.getEMA([y.level1],L,a)[1];h.push(y.level2);var L=y.level2;if(z<l)c+=y.level2;else{z===l&&(a=c/b);z===m+1&&(y.level1=A[z-b-1],y.level2=this.getEMA([y.level1],L,a)[1],h.push(y.level2));y.level1=
|
||||
A[z-b-2];y.level2=h[z-2*b-1];y.level3=this.getEMA([y.level2],y.prevLevel3,a)[1];if(x=this.getTemaPoint(n,l,y,z))e.push(x),w.push(x[0]),v.push(x[1]);y.prevLevel3=y.level3}}}return{values:e,xData:w,yData:v}}}});""});t(h,"indicators/trix.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.correctFloat;g=g.seriesType;var f=e.seriesTypes.tema;g("trix","tema",{},{init:function(){var d=arguments,c=this;l.isParentLoaded(f,"tema",c.type,function(a){a.prototype.init.apply(c,
|
||||
d)})},getTemaPoint:function(d,c,a,b){if(b>c)var f=[d[b-3],0!==a.prevLevel3?k(a.level3-a.prevLevel3)/a.prevLevel3*100:null];return f}});""});t(h,"indicators/apo.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.error;g=g.seriesType;var f=e.seriesTypes.ema;g("apo","ema",{params:{periods:[10,20]}},{nameBase:"APO",nameComponents:["periods"],init:function(){var d=arguments,c=this;l.isParentLoaded(f,"ema",c.type,function(a){a.prototype.init.apply(c,
|
||||
d)})},getValues:function(d,c){var a=c.periods,b=c.index;c=[];var l=[],r=[],n;if(2!==a.length||a[1]<=a[0])k('Error: "APO requires two periods. Notice, first period should be lower than the second one."');else{var g=f.prototype.getValues.call(this,d,{index:b,period:a[0]});d=f.prototype.getValues.call(this,d,{index:b,period:a[1]});if(g&&d){a=a[1]-a[0];for(n=0;n<d.yData.length;n++)b=g.yData[n+a]-d.yData[n],c.push([d.xData[n],b]),l.push(d.xData[n]),r.push(b);return{values:c,xData:l,yData:r}}}}});""});
|
||||
t(h,"indicators/ichimoku-kinko-hyo.src.js",[h["parts/Globals.js"],h["parts/Color.js"],h["parts/Utilities.js"]],function(e,g,l){function k(a){return a.reduce(function(a,b){return Math.max(a,b[1])},-Infinity)}function f(a){return a.reduce(function(a,b){return Math.min(a,b[2])},Infinity)}function d(a){return{high:k(a),low:f(a)}}function c(a){var b,c,d,f,k;a.series.forEach(function(a){if(a.xData)for(f=a.xData,k=c=a.xIncrement?1:f.length-1;0<k;k--)if(d=f[k]-f[k-1],b===p||d<b)b=d});return b}function a(a,
|
||||
b,c,d){if(a&&b&&c&&d){var f=b.plotX-a.plotX;b=b.plotY-a.plotY;var k=d.plotX-c.plotX;d=d.plotY-c.plotY;var n=a.plotX-c.plotX,p=a.plotY-c.plotY;c=(-b*n+f*p)/(-k*b+f*d);k=(k*p-d*n)/(-k*b+f*d);if(0<=c&&1>=c&&0<=k&&1>=k)return{plotX:a.plotX+k*f,plotY:a.plotY+k*b}}return!1}function b(a){var b=a.indicator;b.points=a.points;b.nextPoints=a.nextPoints;b.color=a.color;b.options=q(a.options.senkouSpan.styles,a.gap);b.graph=a.graph;b.fillGraph=!0;h.prototype.drawGraph.call(b)}var u=g.parse,r=l.defined,n=l.isArray,
|
||||
q=l.merge,m=l.objectEach;g=l.seriesType;var p,h=e.seriesTypes.sma;e.approximations["ichimoku-averages"]=function(){var a=[],b;[].forEach.call(arguments,function(c,d){a.push(e.approximations.average(c));b=!b&&"undefined"===typeof a[d]});return b?void 0:a};g("ikh","sma",{params:{period:26,periodTenkan:9,periodSenkouSpanB:52},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>TENKAN SEN: {point.tenkanSen:.3f}<br/>KIJUN SEN: {point.kijunSen:.3f}<br/>CHIKOU SPAN: {point.chikouSpan:.3f}<br/>SENKOU SPAN A: {point.senkouSpanA:.3f}<br/>SENKOU SPAN B: {point.senkouSpanB:.3f}<br/>'},
|
||||
tenkanLine:{styles:{lineWidth:1,lineColor:void 0}},kijunLine:{styles:{lineWidth:1,lineColor:void 0}},chikouLine:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanA:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanB:{styles:{lineWidth:1,lineColor:void 0}},senkouSpan:{styles:{fill:"rgba(255, 0, 0, 0.5)"}},dataGrouping:{approximation:"ichimoku-averages"}},{pointArrayMap:["tenkanSen","kijunSen","chikouSpan","senkouSpanA","senkouSpanB"],pointValKey:"tenkanSen",nameComponents:["periodSenkouSpanB","period",
|
||||
"periodTenkan"],init:function(){h.prototype.init.apply(this,arguments);this.options=q({tenkanLine:{styles:{lineColor:this.color}},kijunLine:{styles:{lineColor:this.color}},chikouLine:{styles:{lineColor:this.color}},senkouSpanA:{styles:{lineColor:this.color,fill:u(this.color).setOpacity(.5).get()}},senkouSpanB:{styles:{lineColor:this.color,fill:u(this.color).setOpacity(.5).get()}},senkouSpan:{styles:{fill:u(this.color).setOpacity(.2).get()}}},this.options)},toYData:function(a){return[a.tenkanSen,a.kijunSen,
|
||||
a.chikouSpan,a.senkouSpanA,a.senkouSpanB]},translate:function(){var a=this;h.prototype.translate.apply(a);a.points.forEach(function(b){a.pointArrayMap.forEach(function(c){r(b[c])&&(b["plot"+c]=a.yAxis.toPixels(b[c],!0),b.plotY=b["plot"+c],b.tooltipPos=[b.plotX,b["plot"+c]],b.isNull=!1)})})},drawGraph:function(){var c=this,d=c.points,f=d.length,k=c.options,n=c.graph,p=c.color,l={options:{gapSize:k.gapSize}},g=c.pointArrayMap.length,e=[[],[],[],[],[],[]],u={tenkanLine:e[0],kijunLine:e[1],chikouLine:e[2],
|
||||
senkouSpanA:e[3],senkouSpanB:e[4],senkouSpan:e[5]},B=[],D=c.options.senkouSpan,t=D.color||D.styles.fill,N=D.negativeColor,J=[[],[]],M=[[],[]],P=0,K,Q,O;for(c.ikhMap=u;f--;){var F=d[f];for(K=0;K<g;K++)D=c.pointArrayMap[K],r(F[D])&&e[K].push({plotX:F.plotX,plotY:F["plot"+D],isNull:!1});N&&f!==d.length-1&&(D=u.senkouSpanB.length-1,F=a(u.senkouSpanA[D-1],u.senkouSpanA[D],u.senkouSpanB[D-1],u.senkouSpanB[D]),K={plotX:F.plotX,plotY:F.plotY,isNull:!1,intersectPoint:!0},F&&(u.senkouSpanA.splice(D,0,K),u.senkouSpanB.splice(D,
|
||||
0,K),B.push(D)))}m(u,function(a,b){k[b]&&"senkouSpan"!==b&&(c.points=e[P],c.options=q(k[b].styles,l),c.graph=c["graph"+b],c.fillGraph=!1,c.color=p,h.prototype.drawGraph.call(c),c["graph"+b]=c.graph);P++});c.graphCollection&&c.graphCollection.forEach(function(a){c[a].destroy();delete c[a]});c.graphCollection=[];if(N&&u.senkouSpanA[0]&&u.senkouSpanB[0]){B.unshift(0);B.push(u.senkouSpanA.length-1);for(g=0;g<B.length-1;g++){D=B[g];F=B[g+1];f=u.senkouSpanB.slice(D,F+1);D=u.senkouSpanA.slice(D,F+1);if(1<=
|
||||
Math.floor(f.length/2))if(F=Math.floor(f.length/2),f[F].plotY===D[F].plotY){for(O=K=F=0;O<f.length;O++)F+=f[O].plotY,K+=D[O].plotY;F=F>K?0:1}else F=f[F].plotY>D[F].plotY?0:1;else F=f[0].plotY>D[0].plotY?0:1;J[F]=J[F].concat(f);M[F]=M[F].concat(D)}["graphsenkouSpanColor","graphsenkouSpanNegativeColor"].forEach(function(a,d){J[d].length&&M[d].length&&(Q=0===d?t:N,b({indicator:c,points:J[d],nextPoints:M[d],color:Q,options:k,gap:l,graph:c[a]}),c[a]=c.graph,c.graphCollection.push(a))})}else b({indicator:c,
|
||||
points:u.senkouSpanB,nextPoints:u.senkouSpanA,color:t,options:k,gap:l,graph:c.graphsenkouSpan}),c.graphsenkouSpan=c.graph;delete c.nextPoints;delete c.fillGraph;c.points=d;c.options=k;c.graph=n},getGraphPath:function(a){var b=[];a=a||this.points;if(this.fillGraph&&this.nextPoints){var c=h.prototype.getGraphPath.call(this,this.nextPoints);c[0]="L";var d=h.prototype.getGraphPath.call(this,a);c=c.slice(0,d.length);for(var f=c.length-1;0<f;f-=3)b.push(c[f-2],c[f-1],c[f]);d=d.concat(b)}else d=h.prototype.getGraphPath.apply(this,
|
||||
arguments);return d},getValues:function(a,b){var f=b.period,k=b.periodTenkan;b=b.periodSenkouSpanB;var l=a.xData,g=a.yData,u=g&&g.length||0;a=c(a.xAxis);var r=[],e=[],m;if(!(l.length<=f)&&n(g[0])&&4===g[0].length){var q=l[0]-f*a;for(m=0;m<f;m++)e.push(q+m*a);for(m=0;m<u;m++){if(m>=k){var h=g.slice(m-k,m);h=d(h);h=(h.high+h.low)/2}if(m>=f){var B=g.slice(m-f,m);B=d(B);B=(B.high+B.low)/2;var v=(h+B)/2}if(m>=b){var w=g.slice(m-b,m);w=d(w);w=(w.high+w.low)/2}q=g[m][3];var t=l[m];r[m]===p&&(r[m]=[]);r[m+
|
||||
f]===p&&(r[m+f]=[]);r[m+f][0]=h;r[m+f][1]=B;r[m+f][2]=p;r[m][2]=q;m<=f&&(r[m+f][3]=p,r[m+f][4]=p);r[m+2*f]===p&&(r[m+2*f]=[]);r[m+2*f][3]=v;r[m+2*f][4]=w;e.push(t)}for(m=1;m<=f;m++)e.push(t+m*a);return{values:r,xData:e,yData:r}}}});""});t(h,"indicators/keltner-channels.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/multipe-lines.js"]],function(e,g,l){var k=g.correctFloat,f=g.merge;g=g.seriesType;var d=e.seriesTypes.sma,c=e.seriesTypes.ema,a=e.seriesTypes.atr;g("keltnerchannels",
|
||||
"sma",{params:{period:20,periodATR:10,multiplierATR:2},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Upper Channel: {point.top}<br/>EMA({series.options.params.period}): {point.middle}<br/>Lower Channel: {point.bottom}<br/>'},marker:{enabled:!1},dataGrouping:{approximation:"averages"},lineWidth:1},f(l,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",
|
||||
nameBase:"Keltner Channels",nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],requiredIndicators:["ema","atr"],init:function(){d.prototype.init.apply(this,arguments);this.options=f({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},getValues:function(b,d){var f=d.period,n=d.periodATR,l=d.multiplierATR,m=b.yData;m=m?m.length:0;var p=[];d=c.prototype.getValues(b,{period:f,index:d.index});var g=a.prototype.getValues(b,
|
||||
{period:n}),e=[],u=[],h;if(!(m<f)){for(h=f;h<=m;h++){var C=d.values[h-f];var z=g.values[h-n];var x=C[0];b=k(C[1]+l*z[1]);z=k(C[1]-l*z[1]);C=C[1];p.push([x,b,C,z]);e.push(x);u.push([b,C,z])}return{values:p,xData:e,yData:u}}}}));""});t(h,"indicators/macd.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){var l=g.correctFloat,k=g.defined,f=g.merge;g=g.seriesType;var d=e.seriesTypes.sma,c=e.seriesTypes.ema;g("macd","sma",{params:{shortPeriod:12,longPeriod:26,signalPeriod:9,period:26},
|
||||
signalLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},macdLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},threshold:0,groupPadding:.1,pointPadding:.1,states:{hover:{halo:{size:0}}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Value: {point.MACD}<br/>Signal: {point.signal}<br/>Histogram: {point.y}<br/>'},dataGrouping:{approximation:"averages"},minPointLength:0},{nameComponents:["longPeriod","shortPeriod","signalPeriod"],requiredIndicators:["ema"],
|
||||
pointArrayMap:["y","signal","MACD"],parallelArrays:["x","y","signal","MACD"],pointValKey:"y",markerAttribs:e.noop,getColumnMetrics:e.seriesTypes.column.prototype.getColumnMetrics,crispCol:e.seriesTypes.column.prototype.crispCol,init:function(){d.prototype.init.apply(this,arguments);this.options&&(this.options=f({signalLine:{styles:{lineColor:this.color}},macdLine:{styles:{color:this.color}}},this.options),this.macdZones={zones:this.options.macdLine.zones,startIndex:0},this.signalZones={zones:this.macdZones.zones.concat(this.options.signalLine.zones),
|
||||
startIndex:this.macdZones.zones.length},this.resetZones=!0)},toYData:function(a){return[a.y,a.signal,a.MACD]},translate:function(){var a=this,b=["plotSignal","plotMACD"];e.seriesTypes.column.prototype.translate.apply(a);a.points.forEach(function(c){[c.signal,c.MACD].forEach(function(d,f){null!==d&&(c[b[f]]=a.yAxis.toPixels(d,!0))})})},destroy:function(){this.graph=null;this.graphmacd=this.graphmacd&&this.graphmacd.destroy();this.graphsignal=this.graphsignal&&this.graphsignal.destroy();d.prototype.destroy.apply(this,
|
||||
arguments)},drawPoints:e.seriesTypes.column.prototype.drawPoints,drawGraph:function(){for(var a=this,b=a.points,c=b.length,l=a.options,n=a.zones,g={options:{gapSize:l.gapSize}},m=[[],[]],p;c--;)p=b[c],k(p.plotMACD)&&m[0].push({plotX:p.plotX,plotY:p.plotMACD,isNull:!k(p.plotMACD)}),k(p.plotSignal)&&m[1].push({plotX:p.plotX,plotY:p.plotSignal,isNull:!k(p.plotMACD)});["macd","signal"].forEach(function(b,c){a.points=m[c];a.options=f(l[b+"Line"].styles,g);a.graph=a["graph"+b];a.currentLineZone=b+"Zones";
|
||||
a.zones=a[a.currentLineZone].zones;d.prototype.drawGraph.call(a);a["graph"+b]=a.graph});a.points=b;a.options=l;a.zones=n;a.currentLineZone=null},getZonesGraphs:function(a){var b=d.prototype.getZonesGraphs.call(this,a),c=b;this.currentLineZone&&(c=b.splice(this[this.currentLineZone].startIndex+1),c.length?c.splice(0,0,a[0]):c=[a[0]]);return c},applyZones:function(){var a=this.zones;this.zones=this.signalZones.zones;d.prototype.applyZones.call(this);this.graphmacd&&this.options.macdLine.zones.length&&
|
||||
this.graphmacd.hide();this.zones=a},getValues:function(a,b){var d=0,f=[],n=[],g=[];if(!(a.xData.length<b.longPeriod+b.signalPeriod)){var m=c.prototype.getValues(a,{period:b.shortPeriod});var p=c.prototype.getValues(a,{period:b.longPeriod});m=m.values;p=p.values;for(a=1;a<=m.length;a++)k(p[a-1])&&k(p[a-1][1])&&k(m[a+b.shortPeriod+1])&&k(m[a+b.shortPeriod+1][0])&&f.push([m[a+b.shortPeriod+1][0],0,null,m[a+b.shortPeriod+1][1]-p[a-1][1]]);for(a=0;a<f.length;a++)n.push(f[a][0]),g.push([0,null,f[a][3]]);
|
||||
b=c.prototype.getValues({xData:n,yData:g},{period:b.signalPeriod,index:2});b=b.values;for(a=0;a<f.length;a++)f[a][0]>=b[0][0]&&(f[a][2]=b[d][1],g[a]=[0,b[d][1],f[a][3]],null===f[a][3]?(f[a][1]=0,g[a][0]=0):(f[a][1]=l(f[a][3]-b[d][1]),g[a][0]=l(f[a][3]-b[d][1])),d++);return{values:f,xData:n,yData:g}}}});""});t(h,"indicators/mfi.src.js",[h["parts/Utilities.js"]],function(e){function g(d){return d.reduce(function(c,a){return c+a})}function l(d){return(d[1]+d[2]+d[3])/3}var k=e.error,f=e.isArray;e=e.seriesType;
|
||||
e("mfi","sma",{params:{period:14,volumeSeriesID:"volume",decimals:4}},{nameBase:"Money Flow Index",getValues:function(d,c){var a=c.period,b=d.xData,e=d.yData,r=e?e.length:0,n=c.decimals,q=1,m=d.chart.get(c.volumeSeriesID),p=m&&m.yData,h=[],w=[],v=[],A=[],C=[];if(!m)k("Series "+c.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,d.chart);else if(!(b.length<=a)&&f(e[0])&&4===e[0].length&&p){for(d=l(e[q]);q<a+1;)c=d,d=l(e[q]),c=d>=c,m=d*p[q],A.push(c?m:0),C.push(c?0:m),q++;for(a=q-1;a<r;a++)a>
|
||||
q-1&&(A.shift(),C.shift(),c=d,d=l(e[a]),c=d>c,m=d*p[a],A.push(c?m:0),C.push(c?0:m)),c=g(C),m=g(A),c=m/c,c=parseFloat((100-100/(1+c)).toFixed(n)),h.push([b[a],c]),w.push(b[a]),v.push(c);return{values:h,xData:w,yData:v}}}});""});t(h,"indicators/momentum.src.js",[h["parts/Utilities.js"]],function(e){function g(k,f,d,c,a){d=d[c-1][3]-d[c-a-1][3];f=f[c-1];k.shift();return[f,d]}var l=e.isArray;e=e.seriesType;e("momentum","sma",{params:{period:14}},{nameBase:"Momentum",getValues:function(k,f){f=f.period;
|
||||
var d=k.xData,c=(k=k.yData)?k.length:0,a=d[0],b=[],e=[],r=[];if(!(d.length<=f)&&l(k[0])){var n=k[0][3];n=[[a,n]];for(a=f+1;a<c;a++){var q=g(n,d,k,a,f,void 0);b.push(q);e.push(q[0]);r.push(q[1])}q=g(n,d,k,a,f,void 0);b.push(q);e.push(q[0]);r.push(q[1]);return{values:b,xData:e,yData:r}}}});""});t(h,"indicators/natr.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){g=g.seriesType;var l=e.seriesTypes.atr;g("natr","sma",{tooltip:{valueSuffix:"%"}},{requiredIndicators:["atr"],getValues:function(k,
|
||||
f){var d=l.prototype.getValues.apply(this,arguments),c=d.values.length,a=f.period-1,b=k.yData,g=0;if(d){for(;g<c;g++)d.yData[g]=d.values[g][1]/b[a][3]*100,d.values[g][1]=d.yData[g],a++;return d}}});""});t(h,"indicators/pivot-points.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){function l(c,a){var b=c.series.pointArrayMap,f=b.length;for(d.prototype.pointClass.prototype[a].call(c);f--;)a="dataLabel"+b[f],c[a]&&c[a].element&&c[a].destroy(),c[a]=null}var k=g.defined,f=g.isArray;
|
||||
g=g.seriesType;var d=e.seriesTypes.sma;g("pivotpoints","sma",{params:{period:28,algorithm:"standard"},marker:{enabled:!1},enableMouseTracking:!1,dataLabels:{enabled:!0,format:"{point.pivotLine}"},dataGrouping:{approximation:"averages"}},{nameBase:"Pivot Points",pointArrayMap:"R4 R3 R2 R1 P S1 S2 S3 S4".split(" "),pointValKey:"P",toYData:function(c){return[c.P]},translate:function(){var c=this;d.prototype.translate.apply(c);c.points.forEach(function(a){c.pointArrayMap.forEach(function(b){k(a[b])&&
|
||||
(a["plot"+b]=c.yAxis.toPixels(a[b],!0))})});c.plotEndPoint=c.xAxis.toPixels(c.endPoint,!0)},getGraphPath:function(c){for(var a=this,b=c.length,f=[[],[],[],[],[],[],[],[],[]],g=[],n=a.plotEndPoint,l=a.pointArrayMap.length,m,p,e;b--;){p=c[b];for(e=0;e<l;e++)m=a.pointArrayMap[e],k(p[m])&&f[e].push({plotX:p.plotX,plotY:p["plot"+m],isNull:!1},{plotX:n,plotY:p["plot"+m],isNull:!1},{plotX:n,plotY:null,isNull:!0});n=p.plotX}f.forEach(function(b){g=g.concat(d.prototype.getGraphPath.call(a,b))});return g},
|
||||
drawDataLabels:function(){var c=this,a=c.pointArrayMap,b,f,k;if(c.options.dataLabels.enabled){var n=c.points.length;a.concat([!1]).forEach(function(g,l){for(k=n;k--;)f=c.points[k],g?(f.y=f[g],f.pivotLine=g,f.plotY=f["plot"+g],b=f["dataLabel"+g],l&&(f["dataLabel"+a[l-1]]=f.dataLabel),f.dataLabels||(f.dataLabels=[]),f.dataLabels[0]=f.dataLabel=b=b&&b.element?b:null):f["dataLabel"+a[l-1]]=f.dataLabel;d.prototype.drawDataLabels.apply(c,arguments)})}},getValues:function(c,a){var b=a.period,d=c.xData,k=
|
||||
(c=c.yData)?c.length:0;a=this[a.algorithm+"Placement"];var g=[],l=[],m=[],e;if(!(d.length<b)&&f(c[0])&&4===c[0].length){for(e=b+1;e<=k+b;e+=b){var h=d.slice(e-b-1,e);var w=c.slice(e-b-1,e);var v=h.length;var A=h[v-1];w=this.getPivotAndHLC(w);w=a(w);w=g.push([A].concat(w));l.push(A);m.push(g[w-1].slice(1))}this.endPoint=h[0]+(A-h[0])/v*b;return{values:g,xData:l,yData:m}}},getPivotAndHLC:function(c){var a=-Infinity,b=Infinity,d=c[c.length-1][3];c.forEach(function(c){a=Math.max(a,c[1]);b=Math.min(b,
|
||||
c[2])});return[(a+b+d)/3,a,b,d]},standardPlacement:function(c){var a=c[1]-c[2];return[null,null,c[0]+a,2*c[0]-c[2],c[0],2*c[0]-c[1],c[0]-a,null,null]},camarillaPlacement:function(c){var a=c[1]-c[2];return[c[3]+1.5*a,c[3]+1.25*a,c[3]+1.1666*a,c[3]+1.0833*a,c[0],c[3]-1.0833*a,c[3]-1.1666*a,c[3]-1.25*a,c[3]-1.5*a]},fibonacciPlacement:function(c){var a=c[1]-c[2];return[null,c[0]+a,c[0]+.618*a,c[0]+.382*a,c[0],c[0]-.382*a,c[0]-.618*a,c[0]-a,null]}},{destroyElements:function(){l(this,"destroyElements")},
|
||||
destroy:function(){l(this,"destroyElements")}});""});t(h,"indicators/ppo.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){var k=g.correctFloat,f=g.error;g=g.seriesType;var d=e.seriesTypes.ema;g("ppo","ema",{params:{periods:[12,26]}},{nameBase:"PPO",nameComponents:["periods"],init:function(){var c=arguments,a=this;l.isParentLoaded(d,"ema",a.type,function(b){b.prototype.init.apply(a,c)})},getValues:function(c,a){var b=a.periods,g=a.index;a=[];
|
||||
var l=[],n=[],e;if(2!==b.length||b[1]<=b[0])f('Error: "PPO requires two periods. Notice, first period should be lower than the second one."');else{var m=d.prototype.getValues.call(this,c,{index:g,period:b[0]});c=d.prototype.getValues.call(this,c,{index:g,period:b[1]});if(m&&c){b=b[1]-b[0];for(e=0;e<c.yData.length;e++)g=k((m.yData[e+b]-c.yData[e])/c.yData[e]*100),a.push([c.xData[e],g]),l.push(c.xData[e]),n.push(g);return{values:a,xData:l,yData:n}}}}});""});t(h,"mixins/reduce-array.js",[h["parts/Globals.js"]],
|
||||
function(e){var g=e.reduce;return{minInArray:function(e,k){return g(e,function(f,d){return Math.min(f,d[k])},Number.MAX_VALUE)},maxInArray:function(e,k){return g(e,function(f,d){return Math.max(f,d[k])},-Number.MAX_VALUE)},getArrayExtremes:function(e,k,f){return g(e,function(d,c){return[Math.min(d[0],c[k]),Math.max(d[1],c[f])]},[Number.MAX_VALUE,-Number.MAX_VALUE])}}});t(h,"indicators/price-channel.src.js",[h["parts/Utilities.js"],h["mixins/reduce-array.js"],h["mixins/multipe-lines.js"]],function(e,
|
||||
g,l){var k=e.merge;e=e.seriesType;var f=g.getArrayExtremes;e("pc","sma",{params:{period:20},lineWidth:1,topLine:{styles:{lineColor:"#90ed7d",lineWidth:1}},bottomLine:{styles:{lineColor:"#f45b5b",lineWidth:1}},dataGrouping:{approximation:"averages"}},k(l,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",nameBase:"Price Channel",nameComponents:["period"],linesApiNames:["topLine","bottomLine"],getValues:function(d,c){c=c.period;var a=d.xData,b=(d=d.yData)?d.length:0,k=[],g=[],e=[],l;if(!(b<
|
||||
c)){for(l=c;l<=b;l++){var m=a[l-1];var p=d.slice(l-c,l);var h=f(p,2,1);p=h[1];var w=h[0];h=(p+w)/2;k.push([m,p,h,w]);g.push(m);e.push([p,h,w])}return{values:k,xData:g,yData:e}}}}));""});t(h,"indicators/price-envelopes.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){var l=g.isArray,k=g.merge;g=g.seriesType;var f=e.seriesTypes.sma;g("priceenvelopes","sma",{marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Top: {point.top}<br/>Middle: {point.middle}<br/>Bottom: {point.bottom}<br/>'},
|
||||
params:{period:20,topBand:.1,bottomBand:.1},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}},{nameComponents:["period","topBand","bottomBand"],nameBase:"Price envelopes",pointArrayMap:["top","middle","bottom"],parallelArrays:["x","y","top","bottom"],pointValKey:"middle",init:function(){f.prototype.init.apply(this,arguments);this.options=k({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},
|
||||
toYData:function(d){return[d.top,d.middle,d.bottom]},translate:function(){var d=this,c=["plotTop","plotMiddle","plotBottom"];f.prototype.translate.apply(d);d.points.forEach(function(a){[a.top,a.middle,a.bottom].forEach(function(b,f){null!==b&&(a[c[f]]=d.yAxis.toPixels(b,!0))})})},drawGraph:function(){for(var d=this,c=d.points,a=c.length,b=d.options,g=d.graph,e={options:{gapSize:b.gapSize}},l=[[],[]],h;a--;)h=c[a],l[0].push({plotX:h.plotX,plotY:h.plotTop,isNull:h.isNull}),l[1].push({plotX:h.plotX,
|
||||
plotY:h.plotBottom,isNull:h.isNull});["topLine","bottomLine"].forEach(function(a,c){d.points=l[c];d.options=k(b[a].styles,e);d.graph=d["graph"+a];f.prototype.drawGraph.call(d);d["graph"+a]=d.graph});d.points=c;d.options=b;d.graph=g;f.prototype.drawGraph.call(d)},getValues:function(d,c){var a=c.period,b=c.topBand,k=c.bottomBand,g=d.xData,e=(d=d.yData)?d.length:0,h=[],m=[],p=[],B;if(!(g.length<a)&&l(d[0])&&4===d[0].length){for(B=a;B<=e;B++){var w=g.slice(B-a,B);var v=d.slice(B-a,B);v=f.prototype.getValues.call(this,
|
||||
{xData:w,yData:v},c);w=v.xData[0];v=v.yData[0];var A=v*(1+b);var C=v*(1-k);h.push([w,A,v,C]);m.push(w);p.push([A,v,C])}return{values:h,xData:m,yData:p}}}});""});t(h,"indicators/psar.src.js",[h["parts/Utilities.js"]],function(e){e=e.seriesType;e("psar","sma",{lineWidth:0,marker:{enabled:!0},states:{hover:{lineWidthPlus:0}},params:{initialAccelerationFactor:.02,maxAccelerationFactor:.2,increment:.02,index:2,decimals:4}},{nameComponents:!1,getValues:function(g,e){var k=g.xData;g=g.yData;var f=g[0][1],
|
||||
d=e.maxAccelerationFactor,c=e.increment,a=e.initialAccelerationFactor,b=g[0][2],l=e.decimals,h=e.index,n=[],q=[],m=[],p=1,B;if(!(h>=g.length)){for(B=0;B<h;B++)f=Math.max(g[B][1],f),b=Math.min(g[B][2],parseFloat(b.toFixed(l)));var w=g[B][1]>b?1:-1;e=e.initialAccelerationFactor;var v=e*(f-b);n.push([k[h],b]);q.push(k[h]);m.push(parseFloat(b.toFixed(l)));for(B=h+1;B<g.length;B++){h=g[B-1][2];var A=g[B-2][2];var C=g[B-1][1];var z=g[B-2][1];var x=g[B][1];var y=g[B][2];null!==A&&null!==z&&null!==h&&null!==
|
||||
C&&null!==x&&null!==y&&(b=w===p?1===w?b+v<Math.min(A,h)?b+v:Math.min(A,h):b+v>Math.max(z,C)?b+v:Math.max(z,C):f,h=1===w?x>f?x:f:y<f?y:f,x=1===p&&y>b||-1===p&&x>b?1:-1,p=x,v=h,y=c,A=d,C=a,e=p===w?1===p&&v>f?e===A?A:parseFloat((e+y).toFixed(2)):-1===p&&v<f?e===A?A:parseFloat((e+y).toFixed(2)):e:C,f=h-b,v=e*f,n.push([k[B],parseFloat(b.toFixed(l))]),q.push(k[B]),m.push(parseFloat(b.toFixed(l))),p=w,w=x,f=h)}return{values:n,xData:q,yData:m}}}});""});t(h,"indicators/roc.src.js",[h["parts/Utilities.js"]],
|
||||
function(e){var g=e.isArray;e=e.seriesType;e("roc","sma",{params:{index:3,period:9}},{nameBase:"Rate of Change",getValues:function(e,k){var f=k.period,d=e.xData,c=(e=e.yData)?e.length:0,a=[],b=[],l=[],h=-1;if(!(d.length<=f)){g(e[0])&&(h=k.index);for(k=f;k<c;k++){var n=0>h?(n=e[k-f])?(e[k]-n)/n*100:null:(n=e[k-f][h])?(e[k][h]-n)/n*100:null;n=[d[k],n];a.push(n);b.push(n[0]);l.push(n[1])}return{values:a,xData:b,yData:l}}}});""});t(h,"indicators/rsi.src.js",[h["parts/Utilities.js"]],function(e){var g=
|
||||
e.isArray;e=e.seriesType;e("rsi","sma",{params:{period:14,decimals:4}},{getValues:function(e,k){var f=k.period,d=e.xData,c=(e=e.yData)?e.length:0;k=k.decimals;var a=1,b=[],l=[],h=[],n=0,q=0,m;if(!(d.length<f)&&g(e[0])&&4===e[0].length){for(;a<f;){var p=parseFloat((e[a][3]-e[a-1][3]).toFixed(k));0<p?n+=p:q+=Math.abs(p);a++}var B=parseFloat((n/(f-1)).toFixed(k));for(m=parseFloat((q/(f-1)).toFixed(k));a<c;a++)p=parseFloat((e[a][3]-e[a-1][3]).toFixed(k)),0<p?(n=p,q=0):(n=0,q=Math.abs(p)),B=parseFloat(((B*
|
||||
(f-1)+n)/f).toFixed(k)),m=parseFloat(((m*(f-1)+q)/f).toFixed(k)),n=0===m?100:0===B?0:parseFloat((100-100/(1+B/m)).toFixed(k)),b.push([d[a],n]),l.push(d[a]),h.push(n);return{values:b,xData:l,yData:h}}}});""});t(h,"indicators/stochastic.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/reduce-array.js"],h["mixins/multipe-lines.js"]],function(e,g,l,k){var f=g.isArray,d=g.merge;g=g.seriesType;var c=e.seriesTypes.sma,a=l.getArrayExtremes;g("stochastic","sma",{params:{periods:[14,3]},marker:{enabled:!1},
|
||||
tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>%K: {point.y}<br/>%D: {point.smoothed}<br/>'},smoothedLine:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}},d(k,{nameComponents:["periods"],nameBase:"Stochastic",pointArrayMap:["y","smoothed"],parallelArrays:["x","y","smoothed"],pointValKey:"y",linesApiNames:["smoothedLine"],init:function(){c.prototype.init.apply(this,arguments);this.options=d({smoothedLine:{styles:{lineColor:this.color}}},
|
||||
this.options)},getValues:function(b,d){var e=d.periods[0];d=d.periods[1];var k=b.xData,g=(b=b.yData)?b.length:0,m=[],l=[],h=[],w=null,v;if(!(g<e)&&f(b[0])&&4===b[0].length){for(v=e-1;v<g;v++){var u=b.slice(v-e+1,v+1);var C=a(u,2,1);var z=C[0];u=b[v][3]-z;z=C[1]-z;u=u/z*100;l.push(k[v]);h.push([u,null]);v>=e-1+(d-1)&&(w=c.prototype.getValues.call(this,{xData:l.slice(-d),yData:h.slice(-d)},{period:d}),w=w.yData[0]);m.push([k[v],u,w]);h[h.length-1][1]=w}return{values:m,xData:l,yData:h}}}}));""});t(h,
|
||||
"indicators/slow-stochastic.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/indicator-required.js"]],function(e,g,l){g=g.seriesType;var k=e.seriesTypes;g("slowstochastic","stochastic",{params:{periods:[14,3,3]}},{nameBase:"Slow Stochastic",init:function(){var f=arguments,d=this;l.isParentLoaded(e.seriesTypes.stochastic,"stochastic",d.type,function(c){c.prototype.init.apply(d,f)})},getValues:function(f,d){var c=d.periods,a=k.stochastic.prototype.getValues.call(this,f,d);f={values:[],
|
||||
xData:[],yData:[]};d=0;if(a){f.xData=a.xData.slice(c[1]-1);a=a.yData.slice(c[1]-1);var b=k.sma.prototype.getValues.call(this,{xData:f.xData,yData:a},{index:1,period:c[2]});if(b){for(var e=f.xData.length;d<e;d++)f.yData[d]=[a[d][1],b.yData[d-c[2]+1]||null],f.values[d]=[f.xData[d],a[d][1],b.yData[d-c[2]+1]||null];return f}}}});""});t(h,"indicators/supertrend.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"]],function(e,g){function l(a,c,b){return{index:c,close:a.yData[c][b],x:a.xData[c]}}var k=
|
||||
g.correctFloat,f=g.merge,d=g.seriesType,c=g.isArray,a=g.objectEach,b=e.seriesTypes.atr,h=e.seriesTypes.sma;d("supertrend","sma",{params:{multiplier:3,period:10},risingTrendColor:"#06B535",fallingTrendColor:"#F21313",changeTrendLine:{styles:{lineWidth:1,lineColor:"#333333",dashStyle:"LongDash"}}},{nameBase:"Supertrend",nameComponents:["multiplier","period"],requiredIndicators:["atr"],init:function(){h.prototype.init.apply(this,arguments);var a=this.options;a.cropThreshold=this.linkedParent.options.cropThreshold-
|
||||
(a.params.period-1)},drawGraph:function(){var c=this,b=c.options,d=c.linkedParent,e=d?d.points:[],k=c.points,g=c.graph,u=k.length,v=e.length-u;v=0<v?v:0;for(var A={options:{gapSize:b.gapSize}},C={top:[],bottom:[],intersect:[]},z={top:{styles:{lineWidth:b.lineWidth,lineColor:b.fallingTrendColor||b.color,dashStyle:b.dashStyle}},bottom:{styles:{lineWidth:b.lineWidth,lineColor:b.risingTrendColor||b.color,dashStyle:b.dashStyle}},intersect:b.changeTrendLine},x,y,E,t,G,H,D,I;u--;)x=k[u],y=k[u-1],E=e[u-1+
|
||||
v],t=e[u-2+v],G=e[u+v],H=e[u+v+1],D=x.options.color,I={x:x.x,plotX:x.plotX,plotY:x.plotY,isNull:!1},!t&&E&&d.yData[E.index-1]&&(t=l(d,E.index-1,3)),!H&&G&&d.yData[G.index+1]&&(H=l(d,G.index+1,3)),!E&&t&&d.yData[t.index+1]?E=l(d,t.index+1,3):!E&&G&&d.yData[G.index-1]&&(E=l(d,G.index-1,3)),x&&E&&G&&t&&x.x!==E.x&&(x.x===G.x?(t=E,E=G):x.x===t.x?(E=t,t={close:d.yData[E.index-1][3],x:d.xData[E.index-1]}):H&&x.x===H.x&&(E=H,t=G)),y&&t&&E?(G={x:y.x,plotX:y.plotX,plotY:y.plotY,isNull:!1},x.y>=E.close&&y.y>=
|
||||
t.close?(x.color=D||b.fallingTrendColor||b.color,C.top.push(I)):x.y<E.close&&y.y<t.close?(x.color=D||b.risingTrendColor||b.color,C.bottom.push(I)):(C.intersect.push(I),C.intersect.push(G),C.intersect.push(f(G,{isNull:!0})),x.y>=E.close&&y.y<t.close?(x.color=D||b.fallingTrendColor||b.color,y.color=D||b.risingTrendColor||b.color,C.top.push(I),C.top.push(f(G,{isNull:!0}))):x.y<E.close&&y.y>=t.close&&(x.color=D||b.risingTrendColor||b.color,y.color=D||b.fallingTrendColor||b.color,C.bottom.push(I),C.bottom.push(f(G,
|
||||
{isNull:!0}))))):E&&(x.y>=E.close?(x.color=D||b.fallingTrendColor||b.color,C.top.push(I)):(x.color=D||b.risingTrendColor||b.color,C.bottom.push(I)));a(C,function(a,b){c.points=a;c.options=f(z[b].styles,A);c.graph=c["graph"+b+"Line"];h.prototype.drawGraph.call(c);c["graph"+b+"Line"]=c.graph});c.points=k;c.options=b;c.graph=g},getValues:function(a,d){var f=d.period;d=d.multiplier;var e=a.xData,g=a.yData,l=[],h=[],n=[],u=0===f?0:f-1,r=[],z=[],x;if(!(e.length<=f||!c(g[0])||4!==g[0].length||0>f)){a=b.prototype.getValues.call(this,
|
||||
a,{period:f}).yData;for(x=0;x<a.length;x++){var y=g[u+x];var t=g[u+x-1]||[];var L=r[x-1];var G=z[x-1];var H=n[x-1];0===x&&(L=G=H=0);f=k((y[1]+y[2])/2+d*a[x]);var D=k((y[1]+y[2])/2-d*a[x]);r[x]=f<L||t[3]>L?f:L;z[x]=D>G||t[3]<G?D:G;if(H===L&&y[3]<r[x]||H===G&&y[3]<z[x])var I=r[x];else if(H===L&&y[3]>r[x]||H===G&&y[3]>z[x])I=z[x];l.push([e[u+x],I]);h.push(e[u+x]);n.push(I)}return{values:l,xData:h,yData:n}}}});""});t(h,"indicators/volume-by-price.src.js",[h["parts/Globals.js"],h["parts/Point.js"],h["parts/Utilities.js"]],
|
||||
function(e,g,l){var k=l.addEvent,f=l.animObject,d=l.arrayMax,c=l.arrayMin,a=l.correctFloat,b=l.error,h=l.extend,r=l.isArray;l=l.seriesType;var n=Math.abs,q=e.noop,m=e.seriesTypes.column.prototype;l("vbp","sma",{params:{ranges:12,volumeSeriesID:"volume"},zoneLines:{enabled:!0,styles:{color:"#0A9AC9",dashStyle:"LongDash",lineWidth:1}},volumeDivision:{enabled:!0,styles:{positiveColor:"rgba(144, 237, 125, 0.8)",negativeColor:"rgba(244, 91, 91, 0.8)"}},animationLimit:1E3,enableMouseTracking:!1,pointPadding:0,
|
||||
zIndex:-1,crisp:!0,dataGrouping:{enabled:!1},dataLabels:{allowOverlap:!0,enabled:!0,format:"P: {point.volumePos:.2f} | N: {point.volumeNeg:.2f}",padding:0,style:{fontSize:"7px"},verticalAlign:"top"}},{nameBase:"Volume by Price",bindTo:{series:!1,eventName:"afterSetExtremes"},calculateOn:"render",markerAttribs:q,drawGraph:q,getColumnMetrics:m.getColumnMetrics,crispCol:m.crispCol,init:function(a){e.seriesTypes.sma.prototype.init.apply(this,arguments);var b=this.options.params;var c=this.linkedParent;
|
||||
b=a.get(b.volumeSeriesID);this.addCustomEvents(c,b);return this},addCustomEvents:function(a,b){function c(){d.chart.redraw();d.setData([]);d.zoneStarts=[];d.zoneLinesSVG&&(d.zoneLinesSVG.destroy(),delete d.zoneLinesSVG)}var d=this;d.dataEventsToUnbind.push(k(a,"remove",function(){c()}));b&&d.dataEventsToUnbind.push(k(b,"remove",function(){c()}));return d},animate:function(a){var b=this,c={};a||(c.translateX=b.yAxis.pos,b.group.animate(c,h(f(b.options.animation),{step:function(a,c){b.group.attr({scaleX:Math.max(.001,
|
||||
c.pos)})}})))},drawPoints:function(){this.options.volumeDivision.enabled&&(this.posNegVolume(!0,!0),m.drawPoints.apply(this,arguments),this.posNegVolume(!1,!1));m.drawPoints.apply(this,arguments)},posNegVolume:function(a,b){var c=b?["positive","negative"]:["negative","positive"],d=this.options.volumeDivision,f=this.points.length,e=[],k=[],g=0,l;a?(this.posWidths=e,this.negWidths=k):(e=this.posWidths,k=this.negWidths);for(;g<f;g++){var h=this.points[g];h[c[0]+"Graphic"]=h.graphic;h.graphic=h[c[1]+
|
||||
"Graphic"];if(a){var m=h.shapeArgs.width;var p=this.priceZones[g];(l=p.wholeVolumeData)?(e.push(m/l*p.positiveVolumeData),k.push(m/l*p.negativeVolumeData)):(e.push(0),k.push(0))}h.color=b?d.styles.positiveColor:d.styles.negativeColor;h.shapeArgs.width=b?this.posWidths[g]:this.negWidths[g];h.shapeArgs.x=b?h.shapeArgs.x:this.posWidths[g]}},translate:function(){var b=this,c=b.options,f=b.chart,e=b.yAxis,k=e.min,g=b.options.zoneLines,l=b.priceZones,h=0,r,u,q;m.translate.apply(b);var t=b.points;if(t.length){var H=
|
||||
.5>c.pointPadding?c.pointPadding:.1;c=b.volumeDataArray;var D=d(c);var I=f.plotWidth/2;var N=f.plotTop;var J=n(e.toPixels(k)-e.toPixels(k+b.rangeStep));var M=n(e.toPixels(k)-e.toPixels(k+b.rangeStep));H&&(k=n(J*(1-2*H)),h=n((J-k)/2),J=n(k));t.forEach(function(c,d){u=c.barX=c.plotX=0;q=c.plotY=e.toPixels(l[d].start)-N-(e.reversed?J-M:J)-h;r=a(I*l[d].wholeVolumeData/D);c.pointWidth=r;c.shapeArgs=b.crispCol.apply(b,[u,q,r,J]);c.volumeNeg=l[d].negativeVolumeData;c.volumePos=l[d].positiveVolumeData;c.volumeAll=
|
||||
l[d].wholeVolumeData});g.enabled&&b.drawZones(f,e,b.zoneStarts,g.styles)}},getValues:function(a,c){var d=a.processedXData,f=a.processedYData,e=this.chart,k=c.ranges,g=[],l=[],h=[],m;if(a.chart)if(m=e.get(c.volumeSeriesID))if((c=r(f[0]))&&4!==f[0].length)b("Type of "+a.name+" series is different than line, OHLC or candlestick.",!0,e);else return(this.priceZones=this.specifyZones(c,d,f,k,m)).forEach(function(a,b){g.push([a.x,a.end]);l.push(g[b][0]);h.push(g[b][1])}),{values:g,xData:l,yData:h};else b("Series "+
|
||||
c.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,e);else b("Base series not found! In case it has been removed, add a new one.",!0,e)},specifyZones:function(b,f,e,k,g){if(b){var l=e.length;for(var h=e[0][3],m=h,n=1,p;n<l;n++)p=e[n][3],p<h&&(h=p),p>m&&(m=p);l={min:h,max:m}}else l=!1;l=(h=l)?h.min:c(e);p=h?h.max:d(e);h=this.zoneStarts=[];m=[];var r=0;n=1;if(!l||!p)return this.points.length&&(this.setData([]),this.zoneStarts=[],this.zoneLinesSVG.destroy()),[];var u=this.rangeStep=a(p-l)/k;for(h.push(l);r<
|
||||
k-1;r++)h.push(a(h[r]+u));h.push(p);for(k=h.length;n<k;n++)m.push({index:n-1,x:f[0],start:h[n-1],end:h[n]});return this.volumePerZone(b,m,g,f,e)},volumePerZone:function(a,b,c,d,f){var e=this,k=c.processedXData,g=c.processedYData,h=b.length-1,l=f.length;c=g.length;var m,p,r,u,q;n(l-c)&&(d[0]!==k[0]&&g.unshift(0),d[l-1]!==k[c-1]&&g.push(0));e.volumeDataArray=[];b.forEach(function(b){b.wholeVolumeData=0;b.positiveVolumeData=0;for(q=b.negativeVolumeData=0;q<l;q++)r=p=!1,u=a?f[q][3]:f[q],m=q?a?f[q-1][3]:
|
||||
f[q-1]:u,u<=b.start&&0===b.index&&(p=!0),u>=b.end&&b.index===h&&(r=!0),(u>b.start||p)&&(u<b.end||r)&&(b.wholeVolumeData+=g[q],m>u?b.negativeVolumeData+=g[q]:b.positiveVolumeData+=g[q]);e.volumeDataArray.push(b.wholeVolumeData)});return b},drawZones:function(a,b,c,d){var f=a.renderer,e=this.zoneLinesSVG,k=[],g=a.plotWidth,h=a.plotTop,l;c.forEach(function(c){l=b.toPixels(c)-h;k=k.concat(a.renderer.crispLine(["M",0,l,"L",g,l],d.lineWidth))});e?e.animate({d:k}):e=this.zoneLinesSVG=f.path(k).attr({"stroke-width":d.lineWidth,
|
||||
stroke:d.color,dashstyle:d.dashStyle,zIndex:this.group.zIndex+.1}).add(this.group)}},{destroy:function(){this.negativeGraphic&&(this.negativeGraphic=this.negativeGraphic.destroy());return g.prototype.destroy.apply(this,arguments)}});""});t(h,"indicators/vwap.src.js",[h["parts/Utilities.js"]],function(e){var g=e.error,l=e.isArray;e=e.seriesType;e("vwap","sma",{params:{period:30,volumeSeriesID:"volume"}},{getValues:function(e,f){var d=e.chart,c=e.xData;e=e.yData;var a=f.period,b=!0,k;if(k=d.get(f.volumeSeriesID))return l(e[0])||
|
||||
(b=!1),this.calculateVWAPValues(b,c,e,k,a);g("Series "+f.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,d)},calculateVWAPValues:function(e,f,d,c,a){var b=c.yData,k=c.xData.length,g=f.length;c=[];var l=[],h=[],m=[],p=[],t;k=g<=k?g:k;for(t=g=0;g<k;g++){var w=e?(d[g][1]+d[g][2]+d[g][3])/3:d[g];w*=b[g];w=t?c[g-1]+w:w;var v=t?l[g-1]+b[g]:b[g];c.push(w);l.push(v);p.push([f[g],w/v]);h.push(p[g][0]);m.push(p[g][1]);t++;t===a&&(t=0)}return{values:p,xData:h,yData:m}}});""});t(h,"indicators/williams-r.src.js",
|
||||
[h["parts/Utilities.js"],h["mixins/reduce-array.js"]],function(e,g){var l=e.isArray;e=e.seriesType;var k=g.getArrayExtremes;e("williamsr","sma",{params:{period:14}},{nameBase:"Williams %R",getValues:function(f,d){d=d.period;var c=f.xData,a=(f=f.yData)?f.length:0,b=[],e=[],g=[],h;if(!(c.length<d)&&l(f[0])&&4===f[0].length){for(h=d-1;h<a;h++){var q=f.slice(h-d+1,h+1);var m=k(q,2,1);q=m[0];m=m[1];var p=f[h][3];q=(m-p)/(m-q)*-100;c[h]&&(b.push([c[h],q]),e.push(c[h]),g.push(q))}return{values:b,xData:e,
|
||||
yData:g}}}});""});t(h,"indicators/wma.src.js",[h["parts/Utilities.js"]],function(e){function g(f,d){d*=(d+1)/2;return f.reduce(function(c,a,b){return[null,c[1]+a[1]*(b+1)]})[1]/d}function h(f,d,c,a){c=g(f,f.length);d=d[a-1];f.shift();return[d,c]}var k=e.isArray;e=e.seriesType;e("wma","sma",{params:{index:3,period:9}},{getValues:function(f,d){var c=d.period,a=f.xData,b=(f=f.yData)?f.length:0,e=1,g=a[0],l=f[0],q=[],m=[],p=[],t=-1;if(!(a.length<c)){k(f[0])&&(t=d.index,l=f[0][t]);for(d=[[g,l]];e!==c;)d.push([a[e],
|
||||
0>t?f[e]:f[e][t]]),e++;for(c=e;c<b;c++)e=h(d,a,f,c),q.push(e),m.push(e[0]),p.push(e[1]),d.push([a[c],0>t?f[c]:f[c][t]]);e=h(d,a,f,c);q.push(e);m.push(e[0]);p.push(e[1]);return{values:q,xData:m,yData:p}}}});""});t(h,"indicators/zigzag.src.js",[h["parts/Utilities.js"]],function(e){e=e.seriesType;e("zigzag","sma",{params:{lowIndex:2,highIndex:1,deviation:1}},{nameComponents:["deviation"],nameSuffixes:["%"],nameBase:"Zig Zag",getValues:function(e,h){var g=h.lowIndex,f=h.highIndex,d=h.deviation/100;h=
|
||||
1+d;var c=1-d;d=e.xData;var a=e.yData;e=a?a.length:0;var b=[],l=[],r=[],n,q,m=!1,p=!1;if(!(!d||1>=d.length||e&&(void 0===a[0][g]||void 0===a[0][f]))){var t=a[0][g];var w=a[0][f];for(n=1;n<e;n++){if(a[n][g]<=w*c){b.push([d[0],w]);var v=[d[n],a[n][g]];m=q=!0}else a[n][f]>=t*h&&(b.push([d[0],t]),v=[d[n],a[n][f]],q=!1,m=!0);if(m){l.push(b[0][0]);r.push(b[0][1]);var A=n++;n=e}}for(n=A;n<e;n++)q?(a[n][g]<=v[1]&&(v=[d[n],a[n][g]]),a[n][f]>=v[1]*h&&(p=f)):(a[n][f]>=v[1]&&(v=[d[n],a[n][f]]),a[n][g]<=v[1]*
|
||||
c&&(p=g)),!1!==p&&(b.push(v),l.push(v[0]),r.push(v[1]),v=[d[n],a[n][p]],q=!q,p=!1);g=b.length;0!==g&&b[g-1][0]<d[e-1]&&(b.push(v),l.push(v[0]),r.push(v[1]));return{values:b,xData:l,yData:r}}}});""});t(h,"indicators/regressions.src.js",[h["parts/Utilities.js"]],function(e){var g=e.isArray;e=e.seriesType;e("linearRegression","sma",{params:{xAxisUnit:void 0},tooltip:{valueDecimals:4}},{nameBase:"Linear Regression Indicator",getRegressionLineParameters:function(e,k){var f=this.options.params.index,d=
|
||||
function(a,b){return g(a)?a[b]:a},c=e.reduce(function(a,b){return b+a},0),a=k.reduce(function(a,b){return d(b,f)+a},0);c/=e.length;a/=k.length;var b=0,h=0,l;for(l=0;l<e.length;l++){var n=e[l]-c;var q=d(k[l],f)-a;b+=n*q;h+=Math.pow(n,2)}e=h?b/h:0;return{slope:e,intercept:a-e*c}},getEndPointY:function(e,g){return e.slope*g+e.intercept},transformXData:function(e,g){var f=e[0];return e.map(function(d){return(d-f)/g})},findClosestDistance:function(e){var g,f;for(f=1;f<e.length-1;f++){var d=e[f]-e[f-1];
|
||||
0<d&&("undefined"===typeof g||d<g)&&(g=d)}return g},getValues:function(e,g){var f=e.xData;e=e.yData;g=g.period;var d,c={xData:[],yData:[],values:[]},a=this.options.params.xAxisUnit||this.findClosestDistance(f);for(d=g-1;d<=f.length-1;d++){var b=d-g+1;var h=d+1;var k=f[d];var l=f.slice(b,h);b=e.slice(b,h);h=this.transformXData(l,a);l=this.getRegressionLineParameters(h,b);b=this.getEndPointY(l,h[h.length-1]);c.values.push({regressionLineParameters:l,x:k,y:b});c.xData.push(k);c.yData.push(b)}return c}});
|
||||
e("linearRegressionSlope","linearRegression",{},{nameBase:"Linear Regression Slope Indicator",getEndPointY:function(e){return e.slope}});e("linearRegressionIntercept","linearRegression",{},{nameBase:"Linear Regression Intercept Indicator",getEndPointY:function(e){return e.intercept}});e("linearRegressionAngle","linearRegression",{tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span>{series.name}: <b>{point.y}\u00b0</b><br/>'}},{nameBase:"Linear Regression Angle Indicator",slopeToAngle:function(e){return 180/
|
||||
Math.PI*Math.atan(e)},getEndPointY:function(e){return this.slopeToAngle(e.slope)}});""});t(h,"indicators/acceleration-bands.src.js",[h["parts/Globals.js"],h["parts/Utilities.js"],h["mixins/multipe-lines.js"]],function(e,g,h){var k=g.correctFloat,f=g.merge;g=g.seriesType;var d=e.seriesTypes.sma;g("abands","sma",{params:{period:20,factor:.001,index:3},lineWidth:1,topLine:{styles:{lineWidth:1}},bottomLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}},f(h,{pointArrayMap:["top","middle",
|
||||
"bottom"],pointValKey:"middle",nameBase:"Acceleration Bands",nameComponents:["period","factor"],linesApiNames:["topLine","bottomLine"],getValues:function(c,a){var b=a.period,f=a.factor;a=a.index;var e=c.xData,g=(c=c.yData)?c.length:0,h=[],l=[],p=[],t=[],w=[],v;if(!(g<b)){for(v=0;v<=g;v++){if(v<g){var A=c[v][2];var C=c[v][1];var z=f;A=k(C-A)/(k(C+A)/2)*1E3*z;h.push(c[v][1]*k(1+2*A));l.push(c[v][2]*k(1-2*A))}if(v>=b){A=e.slice(v-b,v);var x=c.slice(v-b,v);z=d.prototype.getValues.call(this,{xData:A,yData:h.slice(v-
|
||||
b,v)},{period:b});C=d.prototype.getValues.call(this,{xData:A,yData:l.slice(v-b,v)},{period:b});x=d.prototype.getValues.call(this,{xData:A,yData:x},{period:b,index:a});A=x.xData[0];z=z.yData[0];C=C.yData[0];x=x.yData[0];p.push([A,z,x,C]);t.push(A);w.push([z,x,C])}}return{values:p,xData:t,yData:w}}}}));""});t(h,"indicators/trendline.src.js",[h["parts/Utilities.js"]],function(e){var g=e.isArray;e=e.seriesType;e("trendline","sma",{params:{index:3}},{nameBase:"Trendline",nameComponents:!1,getValues:function(e,
|
||||
h){var f=e.xData,d=e.yData;e=[];var c=[],a=[],b=0,k=0,l=0,n=0,q=f.length,m=h.index;for(h=0;h<q;h++){var p=f[h];var t=g(d[h])?d[h][m]:d[h];b+=p;k+=t;l+=p*t;n+=p*p}d=(q*l-b*k)/(q*n-b*b);isNaN(d)&&(d=0);b=(k-d*b)/q;for(h=0;h<q;h++)p=f[h],t=d*p+b,e[h]=[p,t],c[h]=p,a[h]=t;return{xData:c,yData:a,values:e}}});""});t(h,"masters/indicators/indicators-all.src.js",[],function(){})});
|
||||
//# sourceMappingURL=indicators-all.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/indicators-all.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/indicators-all.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
27
AdminPoll/bower_components/highcharts/indicators/indicators-all.src.d.ts
vendored
Normal file
27
AdminPoll/bower_components/highcharts/indicators/indicators-all.src.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {
|
||||
/**
|
||||
* Utility function to check if an item is an array.
|
||||
*
|
||||
* @param obj
|
||||
* The item to check.
|
||||
*
|
||||
* @return True if the argument is an array.
|
||||
*/
|
||||
function isArray(obj: any): boolean;
|
||||
}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
8681
AdminPoll/bower_components/highcharts/indicators/indicators-all.src.js
vendored
Normal file
8681
AdminPoll/bower_components/highcharts/indicators/indicators-all.src.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
17
AdminPoll/bower_components/highcharts/indicators/indicators.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/indicators.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
18
AdminPoll/bower_components/highcharts/indicators/indicators.js
vendored
Normal file
18
AdminPoll/bower_components/highcharts/indicators/indicators.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Pawel Fus, Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/indicators",["highcharts","highcharts/modules/stock"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,c,p,e){a.hasOwnProperty(c)||(a[c]=e.apply(null,p))}a=a?a._modules:{};f(a,"mixins/indicator-required.js",[a["parts/Utilities.js"]],function(a){var c=a.error;return{isParentLoaded:function(a,
|
||||
e,f,k,q){if(a)return k?k(a):!0;c(q||this.generateMessage(f,e));return!1},generateMessage:function(a,c){return'Error: "'+a+'" indicator type requires "'+c+'" indicator loaded before. Please read docs: https://api.highcharts.com/highstock/plotOptions.'+a}}});f(a,"indicators/indicators.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/indicator-required.js"]],function(a,c,f){var e=c.addEvent,k=c.error,p=c.extend,q=c.isArray,t=c.pick,u=c.seriesType,v=c.splat,l=a.Series,r=a.seriesTypes,
|
||||
m=a.seriesTypes.ohlc.prototype,w=f.generateMessage;e(a.Series,"init",function(d){d=d.options;d.useOhlcData&&"highcharts-navigator-series"!==d.id&&p(this,{pointValKey:m.pointValKey,keys:m.keys,pointArrayMap:m.pointArrayMap,toYData:m.toYData})});e(l,"afterSetOptions",function(d){d=d.options;var a=d.dataGrouping;a&&d.useOhlcData&&"highcharts-navigator-series"!==d.id&&(a.approximation="ohlc")});u("sma","line",{name:void 0,tooltip:{valueDecimals:4},linkedTo:void 0,compareToMain:!1,params:{index:0,period:14}},
|
||||
{processData:function(){var d=this.options.compareToMain,a=this.linkedParent;l.prototype.processData.apply(this,arguments);a&&a.compareValue&&d&&(this.compareValue=a.compareValue)},bindTo:{series:!0,eventName:"updatedData"},hasDerivedData:!0,useCommonDataGrouping:!0,nameComponents:["period"],nameSuffixes:[],calculateOn:"init",requiredIndicators:[],requireIndicators:function(){var a={allLoaded:!0};this.requiredIndicators.forEach(function(d){r[d]?r[d].prototype.requireIndicators():(a.allLoaded=!1,a.needed=
|
||||
d)});return a},init:function(a,h){function d(){var a=b.points||[],d=(b.xData||[]).length,c=b.getValues(b.linkedParent,b.options.params)||{values:[],xData:[],yData:[]},h=[],f=!0;if(d&&!b.hasGroupedData&&b.visible&&b.points)if(b.cropped){if(b.xAxis){var g=b.xAxis.min;var e=b.xAxis.max}d=b.cropData(c.xData,c.yData,g,e);for(g=0;g<d.xData.length;g++)h.push([d.xData[g]].concat(v(d.yData[g])));d=c.xData.indexOf(b.xData[0]);g=c.xData.indexOf(b.xData[b.xData.length-1]);-1===d&&g===c.xData.length-2&&h[0][0]===
|
||||
a[0].x&&h.shift();b.updateData(h)}else c.xData.length!==d-1&&c.xData.length!==d+1&&(f=!1,b.updateData(c.values));f&&(b.xData=c.xData,b.yData=c.yData,b.options.data=c.values);!1===b.bindTo.series&&(delete b.processedXData,b.isDirty=!0,b.redraw());b.isDirtyData=!1}var b=this,c=b.requireIndicators();if(!c.allLoaded)return k(w(b.type,c.needed));l.prototype.init.call(b,a,h);a.linkSeries();b.dataEventsToUnbind=[];if(!b.linkedParent)return k("Series "+b.options.linkedTo+" not found! Check `linkedTo`.",!1,
|
||||
a);b.dataEventsToUnbind.push(e(b.bindTo.series?b.linkedParent:b.linkedParent.xAxis,b.bindTo.eventName,d));if("init"===b.calculateOn)d();else var f=e(b.chart,b.calculateOn,function(){d();f()});return b},getName:function(){var a=this.name,c=[];a||((this.nameComponents||[]).forEach(function(a,b){c.push(this.options.params[a]+t(this.nameSuffixes[b],""))},this),a=(this.nameBase||this.type.toUpperCase())+(this.nameComponents?" ("+c.join(", ")+")":""));return a},getValues:function(a,c){var d=c.period,b=
|
||||
a.xData;a=a.yData;var f=a.length,e=0,h=0,k=[],l=[],m=[],n=-1;if(!(b.length<d)){for(q(a[0])&&(n=c.index?c.index:0);e<d-1;)h+=0>n?a[e]:a[e][n],e++;for(c=e;c<f;c++){h+=0>n?a[c]:a[c][n];var g=[b[c],h/d];k.push(g);l.push(g[0]);m.push(g[1]);h-=0>n?a[c-e]:a[c-e][n]}return{values:k,xData:l,yData:m}}},destroy:function(){this.dataEventsToUnbind.forEach(function(a){a()});l.prototype.destroy.apply(this,arguments)}});""});f(a,"masters/indicators/indicators.src.js",[],function(){})});
|
||||
//# sourceMappingURL=indicators.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/indicators.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/indicators.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/indicators.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/indicators.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
452
AdminPoll/bower_components/highcharts/indicators/indicators.src.js
vendored
Normal file
452
AdminPoll/bower_components/highcharts/indicators/indicators.src.js
vendored
Normal file
@@ -0,0 +1,452 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Pawel Fus, Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/indicators', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/indicator-required.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error;
|
||||
/* eslint-disable no-invalid-this, valid-jsdoc */
|
||||
var requiredIndicatorMixin = {
|
||||
/**
|
||||
* Check whether given indicator is loaded,
|
||||
else throw error.
|
||||
* @private
|
||||
* @param {Highcharts.Indicator} indicator
|
||||
* Indicator constructor function.
|
||||
* @param {string} requiredIndicator
|
||||
* Required indicator type.
|
||||
* @param {string} type
|
||||
* Type of indicator where function was called (parent).
|
||||
* @param {Highcharts.IndicatorCallbackFunction} callback
|
||||
* Callback which is triggered if the given indicator is loaded.
|
||||
* Takes indicator as an argument.
|
||||
* @param {string} errMessage
|
||||
* Error message that will be logged in console.
|
||||
* @return {boolean}
|
||||
* Returns false when there is no required indicator loaded.
|
||||
*/
|
||||
isParentLoaded: function (indicator,
|
||||
requiredIndicator,
|
||||
type,
|
||||
callback,
|
||||
errMessage) {
|
||||
if (indicator) {
|
||||
return callback ? callback(indicator) : true;
|
||||
}
|
||||
error(errMessage || this.generateMessage(type, requiredIndicator));
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {string} indicatorType
|
||||
* Indicator type
|
||||
* @param {string} required
|
||||
* Required indicator
|
||||
* @return {string}
|
||||
* Error message
|
||||
*/
|
||||
generateMessage: function (indicatorType, required) {
|
||||
return 'Error: "' + indicatorType +
|
||||
'" indicator type requires "' + required +
|
||||
'" indicator loaded before. Please read docs: ' +
|
||||
'https://api.highcharts.com/highstock/plotOptions.' +
|
||||
indicatorType;
|
||||
}
|
||||
};
|
||||
|
||||
return requiredIndicatorMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/indicators.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/indicator-required.js']], function (H, U, requiredIndicatorMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var addEvent = U.addEvent,
|
||||
error = U.error,
|
||||
extend = U.extend,
|
||||
isArray = U.isArray,
|
||||
pick = U.pick,
|
||||
seriesType = U.seriesType,
|
||||
splat = U.splat;
|
||||
var Series = H.Series,
|
||||
seriesTypes = H.seriesTypes,
|
||||
ohlcProto = H.seriesTypes.ohlc.prototype,
|
||||
generateMessage = requiredIndicatorMixin.generateMessage;
|
||||
/**
|
||||
* The parameter allows setting line series type and use OHLC indicators. Data
|
||||
* in OHLC format is required.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/use-ohlc-data
|
||||
* Plot line on Y axis
|
||||
*
|
||||
* @type {boolean}
|
||||
* @product highstock
|
||||
* @apioption plotOptions.line.useOhlcData
|
||||
*/
|
||||
/* eslint-disable no-invalid-this */
|
||||
addEvent(H.Series, 'init', function (eventOptions) {
|
||||
var series = this,
|
||||
options = eventOptions.options;
|
||||
if (options.useOhlcData &&
|
||||
options.id !== 'highcharts-navigator-series') {
|
||||
extend(series, {
|
||||
pointValKey: ohlcProto.pointValKey,
|
||||
keys: ohlcProto.keys,
|
||||
pointArrayMap: ohlcProto.pointArrayMap,
|
||||
toYData: ohlcProto.toYData
|
||||
});
|
||||
}
|
||||
});
|
||||
addEvent(Series, 'afterSetOptions', function (e) {
|
||||
var options = e.options,
|
||||
dataGrouping = options.dataGrouping;
|
||||
if (dataGrouping &&
|
||||
options.useOhlcData &&
|
||||
options.id !== 'highcharts-navigator-series') {
|
||||
dataGrouping.approximation = 'ohlc';
|
||||
}
|
||||
});
|
||||
/* eslint-enable no-invalid-this */
|
||||
/**
|
||||
* The SMA series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.sma
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('sma', 'line',
|
||||
/**
|
||||
* Simple moving average indicator (SMA). This series requires `linkedTo`
|
||||
* option to be set.
|
||||
*
|
||||
* @sample stock/indicators/sma
|
||||
* Simple moving average indicator
|
||||
*
|
||||
* @extends plotOptions.line
|
||||
* @since 6.0.0
|
||||
* @excluding allAreas, colorAxis, dragDrop, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart, showInNavigator,
|
||||
* stacking, useOhlcData
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @optionparent plotOptions.sma
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* 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}
|
||||
*/
|
||||
name: void 0,
|
||||
tooltip: {
|
||||
/**
|
||||
* Number of decimals in indicator series.
|
||||
*/
|
||||
valueDecimals: 4
|
||||
},
|
||||
/**
|
||||
* The main series ID that indicator will be based on. Required for this
|
||||
* indicator.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
linkedTo: void 0,
|
||||
/**
|
||||
* Whether to compare indicator to the main series values
|
||||
* or indicator values.
|
||||
*
|
||||
* @sample {highstock} stock/plotoptions/series-comparetomain/
|
||||
* Difference between comparing SMA values to the main series
|
||||
* and its own values.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
compareToMain: false,
|
||||
/**
|
||||
* Paramters used in calculation of regression series' points.
|
||||
*/
|
||||
params: {
|
||||
/**
|
||||
* The point index which indicator calculations will base. For
|
||||
* example using OHLC data, index=2 means the indicator will be
|
||||
* calculated using Low values.
|
||||
*/
|
||||
index: 0,
|
||||
/**
|
||||
* The base period for indicator calculations. This is the number of
|
||||
* data points which are taken into account for the indicator
|
||||
* calculations.
|
||||
*/
|
||||
period: 14
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series.prototype
|
||||
*/
|
||||
{
|
||||
processData: function () {
|
||||
var series = this,
|
||||
compareToMain = series.options.compareToMain,
|
||||
linkedParent = series.linkedParent;
|
||||
Series.prototype.processData.apply(series, arguments);
|
||||
if (linkedParent && linkedParent.compareValue && compareToMain) {
|
||||
series.compareValue = linkedParent.compareValue;
|
||||
}
|
||||
return;
|
||||
},
|
||||
bindTo: {
|
||||
series: true,
|
||||
eventName: 'updatedData'
|
||||
},
|
||||
hasDerivedData: true,
|
||||
useCommonDataGrouping: true,
|
||||
nameComponents: ['period'],
|
||||
nameSuffixes: [],
|
||||
calculateOn: 'init',
|
||||
// Defines on which other indicators is this indicator based on.
|
||||
requiredIndicators: [],
|
||||
requireIndicators: function () {
|
||||
var obj = {
|
||||
allLoaded: true
|
||||
};
|
||||
// Check whether all required indicators are loaded, else return
|
||||
// the object with missing indicator's name.
|
||||
this.requiredIndicators.forEach(function (indicator) {
|
||||
if (seriesTypes[indicator]) {
|
||||
seriesTypes[indicator].prototype.requireIndicators();
|
||||
}
|
||||
else {
|
||||
obj.allLoaded = false;
|
||||
obj.needed = indicator;
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
},
|
||||
init: function (chart, options) {
|
||||
var indicator = this,
|
||||
requiredIndicators = indicator.requireIndicators();
|
||||
// Check whether all required indicators are loaded.
|
||||
if (!requiredIndicators.allLoaded) {
|
||||
return error(generateMessage(indicator.type, requiredIndicators.needed));
|
||||
}
|
||||
Series.prototype.init.call(indicator, chart, options);
|
||||
// Make sure we find series which is a base for an indicator
|
||||
chart.linkSeries();
|
||||
indicator.dataEventsToUnbind = [];
|
||||
/**
|
||||
* @private
|
||||
* @return {void}
|
||||
*/
|
||||
function recalculateValues() {
|
||||
var oldData = indicator.points || [],
|
||||
oldDataLength = (indicator.xData || []).length,
|
||||
processedData = indicator.getValues(indicator.linkedParent,
|
||||
indicator.options.params) || {
|
||||
values: [],
|
||||
xData: [],
|
||||
yData: []
|
||||
},
|
||||
croppedDataValues = [],
|
||||
overwriteData = true,
|
||||
oldFirstPointIndex,
|
||||
oldLastPointIndex,
|
||||
croppedData,
|
||||
min,
|
||||
max,
|
||||
i;
|
||||
// We need to update points to reflect changes in all,
|
||||
// x and y's, values. However, do it only for non-grouped
|
||||
// data - grouping does it for us (#8572)
|
||||
if (oldDataLength &&
|
||||
!indicator.hasGroupedData &&
|
||||
indicator.visible &&
|
||||
indicator.points) {
|
||||
// When data is cropped update only avaliable points (#9493)
|
||||
if (indicator.cropped) {
|
||||
if (indicator.xAxis) {
|
||||
min = indicator.xAxis.min;
|
||||
max = indicator.xAxis.max;
|
||||
}
|
||||
croppedData = indicator.cropData(processedData.xData, processedData.yData, min, max);
|
||||
for (i = 0; i < croppedData.xData.length; i++) {
|
||||
// (#10774)
|
||||
croppedDataValues.push([
|
||||
croppedData.xData[i]
|
||||
].concat(splat(croppedData.yData[i])));
|
||||
}
|
||||
oldFirstPointIndex = processedData.xData.indexOf(indicator.xData[0]);
|
||||
oldLastPointIndex = processedData.xData.indexOf(indicator.xData[indicator.xData.length - 1]);
|
||||
// Check if indicator points should be shifted (#8572)
|
||||
if (oldFirstPointIndex === -1 &&
|
||||
oldLastPointIndex === processedData.xData.length - 2) {
|
||||
if (croppedDataValues[0][0] === oldData[0].x) {
|
||||
croppedDataValues.shift();
|
||||
}
|
||||
}
|
||||
indicator.updateData(croppedDataValues);
|
||||
// Omit addPoint() and removePoint() cases
|
||||
}
|
||||
else if (processedData.xData.length !== oldDataLength - 1 &&
|
||||
processedData.xData.length !== oldDataLength + 1) {
|
||||
overwriteData = false;
|
||||
indicator.updateData(processedData.values);
|
||||
}
|
||||
}
|
||||
if (overwriteData) {
|
||||
indicator.xData = processedData.xData;
|
||||
indicator.yData = processedData.yData;
|
||||
indicator.options.data = processedData.values;
|
||||
}
|
||||
// Removal of processedXData property is required because on
|
||||
// first translate processedXData array is empty
|
||||
if (indicator.bindTo.series === false) {
|
||||
delete indicator.processedXData;
|
||||
indicator.isDirty = true;
|
||||
indicator.redraw();
|
||||
}
|
||||
indicator.isDirtyData = false;
|
||||
}
|
||||
if (!indicator.linkedParent) {
|
||||
return error('Series ' +
|
||||
indicator.options.linkedTo +
|
||||
' not found! Check `linkedTo`.', false, chart);
|
||||
}
|
||||
indicator.dataEventsToUnbind.push(addEvent(indicator.bindTo.series ?
|
||||
indicator.linkedParent : indicator.linkedParent.xAxis, indicator.bindTo.eventName, recalculateValues));
|
||||
if (indicator.calculateOn === 'init') {
|
||||
recalculateValues();
|
||||
}
|
||||
else {
|
||||
var unbinder = addEvent(indicator.chart,
|
||||
indicator.calculateOn,
|
||||
function () {
|
||||
recalculateValues();
|
||||
// Call this just once, on init
|
||||
unbinder();
|
||||
});
|
||||
}
|
||||
return indicator;
|
||||
},
|
||||
getName: function () {
|
||||
var name = this.name,
|
||||
params = [];
|
||||
if (!name) {
|
||||
(this.nameComponents || []).forEach(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,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal.length,
|
||||
range = 0,
|
||||
sum = 0,
|
||||
SMA = [],
|
||||
xData = [],
|
||||
yData = [],
|
||||
index = -1,
|
||||
i,
|
||||
SMAPoint;
|
||||
if (xVal.length < period) {
|
||||
return;
|
||||
}
|
||||
// Switch index for OHLC / Candlestick / Arearange
|
||||
if (isArray(yVal[0])) {
|
||||
index = params.index ? params.index : 0;
|
||||
}
|
||||
// Accumulate first N-points
|
||||
while (range < period - 1) {
|
||||
sum += index < 0 ? yVal[range] : yVal[range][index];
|
||||
range++;
|
||||
}
|
||||
// Calculate value one-by-one for each period in visible data
|
||||
for (i = range; i < yValLen; i++) {
|
||||
sum += index < 0 ? yVal[i] : yVal[i][index];
|
||||
SMAPoint = [xVal[i], sum / period];
|
||||
SMA.push(SMAPoint);
|
||||
xData.push(SMAPoint[0]);
|
||||
yData.push(SMAPoint[1]);
|
||||
sum -= (index < 0 ?
|
||||
yVal[i - range] :
|
||||
yVal[i - range][index]);
|
||||
}
|
||||
return {
|
||||
values: SMA,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
},
|
||||
destroy: function () {
|
||||
this.dataEventsToUnbind.forEach(function (unbinder) {
|
||||
unbinder();
|
||||
});
|
||||
Series.prototype.destroy.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `SMA` series. If the [type](#series.sma.type) option is not specified, it
|
||||
* is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL, useOhlcData
|
||||
* @requires stock/indicators/indicators
|
||||
* @apioption series.sma
|
||||
*/
|
||||
''; // adds doclet above to the transpiled file
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/indicators.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.js
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Daniel Studencki
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/keltner-channels",["highcharts","highcharts/modules/stock"],function(d){a(d);a.Highcharts=d;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function d(a,b,d,h){a.hasOwnProperty(b)||(a[b]=h.apply(null,d))}a=a?a._modules:{};d(a,"mixins/multipe-lines.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,b){var d=
|
||||
b.defined,h=b.error,p=b.merge,e=a.each,q=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(f){var a=[];e(this.pointArrayMap,function(c){c!==f&&a.push("plot"+c.charAt(0).toUpperCase()+c.slice(1))});return a},toYData:function(f){var a=[];e(this.pointArrayMap,function(c){a.push(f[c])});return a},translate:function(){var a=this,b=a.pointArrayMap,c=[],k;c=a.getTranslatedLinesNames();q.prototype.translate.apply(a,arguments);
|
||||
e(a.points,function(f){e(b,function(b,d){k=f[b];null!==k&&(f[c[d]]=a.yAxis.toPixels(k,!0))})})},drawGraph:function(){var a=this,b=a.linesApiNames,c=a.points,k=c.length,u=a.options,y=a.graph,l={options:{gapSize:u.gapSize}},m=[],x=a.getTranslatedLinesNames(a.pointValKey),g;e(x,function(a,b){for(m[b]=[];k--;)g=c[k],m[b].push({x:g.x,plotX:g.plotX,plotY:g[a],isNull:!d(g[a])});k=c.length});e(b,function(b,c){m[c]?(a.points=m[c],u[b]?a.options=p(u[b].styles,l):h('Error: "There is no '+b+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),
|
||||
a.graph=a["graph"+b],q.prototype.drawGraph.call(a),a["graph"+b]=a.graph):h('Error: "'+b+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=c;a.options=u;a.graph=y;q.prototype.drawGraph.call(a)}}});d(a,"indicators/keltner-channels.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/multipe-lines.js"]],function(a,b,d){var h=b.correctFloat,p=b.merge;b=b.seriesType;var e=a.seriesTypes.sma,q=a.seriesTypes.ema,f=a.seriesTypes.atr;
|
||||
b("keltnerchannels","sma",{params:{period:20,periodATR:10,multiplierATR:2},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Upper Channel: {point.top}<br/>EMA({series.options.params.period}): {point.middle}<br/>Lower Channel: {point.bottom}<br/>'},marker:{enabled:!1},dataGrouping:{approximation:"averages"},lineWidth:1},p(d,{pointArrayMap:["top","middle",
|
||||
"bottom"],pointValKey:"middle",nameBase:"Keltner Channels",nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],requiredIndicators:["ema","atr"],init:function(){e.prototype.init.apply(this,arguments);this.options=p({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},getValues:function(a,b){var c=b.period,d=b.periodATR,e=b.multiplierATR,l=a.yData;l=l?l.length:0;var m=[];b=q.prototype.getValues(a,{period:c,index:b.index});
|
||||
var p=f.prototype.getValues(a,{period:d}),g=[],v=[],r;if(!(l<c)){for(r=c;r<=l;r++){var n=b.values[r-c];var t=p.values[r-d];var w=n[0];a=h(n[1]+e*t[1]);t=h(n[1]-e*t[1]);n=n[1];m.push([w,a,n,t]);g.push(w);v.push([a,n,t])}return{values:m,xData:g,yData:v}}}}));""});d(a,"masters/indicators/keltner-channels.src.js",[],function(){})});
|
||||
//# sourceMappingURL=keltner-channels.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/keltner-channels.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/keltner-channels.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/keltner-channels.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
415
AdminPoll/bower_components/highcharts/indicators/keltner-channels.src.js
vendored
Normal file
415
AdminPoll/bower_components/highcharts/indicators/keltner-channels.src.js
vendored
Normal file
@@ -0,0 +1,415 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Daniel Studencki
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/keltner-channels', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'mixins/multipe-lines.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/**
|
||||
*
|
||||
* (c) 2010-2020 Wojciech Chmiel
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var defined = U.defined,
|
||||
error = U.error,
|
||||
merge = U.merge;
|
||||
var each = H.each,
|
||||
SMA = H.seriesTypes.sma;
|
||||
/**
|
||||
* Mixin useful for all indicators that have more than one line.
|
||||
* Merge it with your implementation where you will provide
|
||||
* getValues method appropriate to your indicator and pointArrayMap,
|
||||
* pointValKey, linesApiNames properites. Notice that pointArrayMap
|
||||
* should be consistent with amount of lines calculated in getValues method.
|
||||
*
|
||||
* @private
|
||||
* @mixin multipleLinesMixin
|
||||
*/
|
||||
var multipleLinesMixin = {
|
||||
/* eslint-disable valid-jsdoc */
|
||||
/**
|
||||
* Lines ids. Required to plot appropriate amount of lines.
|
||||
* Notice that pointArrayMap should have more elements than
|
||||
* linesApiNames, because it contains main line and additional lines ids.
|
||||
* Also it should be consistent with amount of lines calculated in
|
||||
* getValues method from your implementation.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointArrayMap
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
pointArrayMap: ['top', 'bottom'],
|
||||
/**
|
||||
* Main line id.
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.pointValKey
|
||||
* @type {string}
|
||||
*/
|
||||
pointValKey: 'top',
|
||||
/**
|
||||
* Additional lines DOCS names. Elements of linesApiNames array should
|
||||
* be consistent with DOCS line names defined in your implementation.
|
||||
* Notice that linesApiNames should have decreased amount of elements
|
||||
* relative to pointArrayMap (without pointValKey).
|
||||
*
|
||||
* @private
|
||||
* @name multipleLinesMixin.linesApiNames
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
linesApiNames: ['bottomLine'],
|
||||
/**
|
||||
* Create translatedLines Collection based on pointArrayMap.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.getTranslatedLinesNames
|
||||
* @param {string} [excludedValue]
|
||||
* Main line id
|
||||
* @return {Array<string>}
|
||||
* Returns translated lines names without excluded value.
|
||||
*/
|
||||
getTranslatedLinesNames: function (excludedValue) {
|
||||
var translatedLines = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
if (propertyName !== excludedValue) {
|
||||
translatedLines.push('plot' +
|
||||
propertyName.charAt(0).toUpperCase() +
|
||||
propertyName.slice(1));
|
||||
}
|
||||
});
|
||||
return translatedLines;
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @function multipleLinesMixin.toYData
|
||||
* @param {Highcharts.Point} point
|
||||
* Indicator point
|
||||
* @return {Array<number>}
|
||||
* Returns point Y value for all lines
|
||||
*/
|
||||
toYData: function (point) {
|
||||
var pointColl = [];
|
||||
each(this.pointArrayMap, function (propertyName) {
|
||||
pointColl.push(point[propertyName]);
|
||||
});
|
||||
return pointColl;
|
||||
},
|
||||
/**
|
||||
* Add lines plot pixel values.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.translate
|
||||
* @return {void}
|
||||
*/
|
||||
translate: function () {
|
||||
var indicator = this,
|
||||
pointArrayMap = indicator.pointArrayMap,
|
||||
LinesNames = [],
|
||||
value;
|
||||
LinesNames = indicator.getTranslatedLinesNames();
|
||||
SMA.prototype.translate.apply(indicator, arguments);
|
||||
each(indicator.points, function (point) {
|
||||
each(pointArrayMap, function (propertyName, i) {
|
||||
value = point[propertyName];
|
||||
if (value !== null) {
|
||||
point[LinesNames[i]] = indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Draw main and additional lines.
|
||||
*
|
||||
* @private
|
||||
* @function multipleLinesMixin.drawGraph
|
||||
* @return {void}
|
||||
*/
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
pointValKey = indicator.pointValKey,
|
||||
linesApiNames = indicator.linesApiNames,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
mainLinePath = indicator.graph,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
// additional lines point place holders:
|
||||
secondaryLines = [],
|
||||
secondaryLinesNames = indicator.getTranslatedLinesNames(pointValKey),
|
||||
point;
|
||||
// Generate points for additional lines:
|
||||
each(secondaryLinesNames, function (plotLine, index) {
|
||||
// create additional lines point place holders
|
||||
secondaryLines[index] = [];
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
secondaryLines[index].push({
|
||||
x: point.x,
|
||||
plotX: point.plotX,
|
||||
plotY: point[plotLine],
|
||||
isNull: !defined(point[plotLine])
|
||||
});
|
||||
}
|
||||
pointsLength = mainLinePoints.length;
|
||||
});
|
||||
// Modify options and generate additional lines:
|
||||
each(linesApiNames, function (lineName, i) {
|
||||
if (secondaryLines[i]) {
|
||||
indicator.points = secondaryLines[i];
|
||||
if (mainLineOptions[lineName]) {
|
||||
indicator.options = merge(mainLineOptions[lineName].styles, gappedExtend);
|
||||
}
|
||||
else {
|
||||
error('Error: "There is no ' + lineName +
|
||||
' in DOCS options declared. Check if linesApiNames' +
|
||||
' are consistent with your DOCS line names."' +
|
||||
' at mixin/multiple-line.js:34');
|
||||
}
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
// Now save lines:
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
}
|
||||
else {
|
||||
error('Error: "' + lineName + ' doesn\'t have equivalent ' +
|
||||
'in pointArrayMap. To many elements in linesApiNames ' +
|
||||
'relative to pointArrayMap."');
|
||||
}
|
||||
});
|
||||
// Restore options and draw a main line:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.graph = mainLinePath;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
}
|
||||
};
|
||||
|
||||
return multipleLinesMixin;
|
||||
});
|
||||
_registerModule(_modules, 'indicators/keltner-channels.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js'], _modules['mixins/multipe-lines.js']], function (H, U, multipleLinesMixin) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
merge = U.merge,
|
||||
seriesType = U.seriesType;
|
||||
var SMA = H.seriesTypes.sma,
|
||||
EMA = H.seriesTypes.ema,
|
||||
ATR = H.seriesTypes.atr;
|
||||
/**
|
||||
* The Keltner Channels series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.keltnerchannels
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('keltnerchannels', 'sma',
|
||||
/**
|
||||
* Keltner Channels. This series requires the `linkedTo` option to be set
|
||||
* and should be loaded after the `stock/indicators/indicators.js`,
|
||||
* `stock/indicators/atr.js`, and `stock/ema/.js`.
|
||||
*
|
||||
* @sample {highstock} stock/indicators/keltner-channels
|
||||
* Keltner Channels
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
|
||||
* navigatorOptions, pointInterval, pointIntervalUnit,
|
||||
* pointPlacement, pointRange, pointStart,showInNavigator,
|
||||
* stacking
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/keltner-channels
|
||||
* @optionparent plotOptions.keltnerchannels
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
period: 20,
|
||||
/**
|
||||
* The ATR period.
|
||||
*/
|
||||
periodATR: 10,
|
||||
/**
|
||||
* The ATR multiplier.
|
||||
*/
|
||||
multiplierATR: 2
|
||||
},
|
||||
/**
|
||||
* Bottom line options.
|
||||
*
|
||||
*/
|
||||
bottomLine: {
|
||||
/**
|
||||
* Styles for a bottom line.
|
||||
*
|
||||
*/
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line. If not set, it's inherited from
|
||||
* `plotOptions.keltnerchannels.color`
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Top line options.
|
||||
*
|
||||
* @extends plotOptions.keltnerchannels.bottomLine
|
||||
*/
|
||||
topLine: {
|
||||
styles: {
|
||||
lineWidth: 1,
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span><b> {series.name}</b><br/>Upper Channel: {point.top}<br/>EMA({series.options.params.period}): {point.middle}<br/>Lower Channel: {point.bottom}<br/>'
|
||||
},
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'averages'
|
||||
},
|
||||
lineWidth: 1
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
merge(multipleLinesMixin, {
|
||||
pointArrayMap: ['top', 'middle', 'bottom'],
|
||||
pointValKey: 'middle',
|
||||
nameBase: 'Keltner Channels',
|
||||
nameComponents: ['period', 'periodATR', 'multiplierATR'],
|
||||
linesApiNames: ['topLine', 'bottomLine'],
|
||||
requiredIndicators: ['ema', 'atr'],
|
||||
init: function () {
|
||||
SMA.prototype.init.apply(this, arguments);
|
||||
// Set default color for lines:
|
||||
this.options = merge({
|
||||
topLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
bottomLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
}
|
||||
}, this.options);
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
periodATR = params.periodATR,
|
||||
multiplierATR = params.multiplierATR,
|
||||
index = params.index,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
// Keltner Channels array structure:
|
||||
// 0-date, 1-top line, 2-middle line, 3-bottom line
|
||||
KC = [],
|
||||
// middle line, top line and bottom lineI
|
||||
ML,
|
||||
TL,
|
||||
BL,
|
||||
date,
|
||||
seriesEMA = EMA.prototype.getValues(series, {
|
||||
period: period,
|
||||
index: index
|
||||
}),
|
||||
seriesATR = ATR.prototype.getValues(series, {
|
||||
period: periodATR
|
||||
}),
|
||||
pointEMA,
|
||||
pointATR,
|
||||
xData = [],
|
||||
yData = [],
|
||||
i;
|
||||
if (yValLen < period) {
|
||||
return;
|
||||
}
|
||||
for (i = period; i <= yValLen; i++) {
|
||||
pointEMA = seriesEMA.values[i - period];
|
||||
pointATR = seriesATR.values[i - periodATR];
|
||||
date = pointEMA[0];
|
||||
TL = correctFloat(pointEMA[1] + (multiplierATR * pointATR[1]));
|
||||
BL = correctFloat(pointEMA[1] - (multiplierATR * pointATR[1]));
|
||||
ML = pointEMA[1];
|
||||
KC.push([date, TL, ML, BL]);
|
||||
xData.push(date);
|
||||
yData.push([TL, ML, BL]);
|
||||
}
|
||||
return {
|
||||
values: KC,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* A Keltner Channels indicator. If the [type](#series.keltnerchannels.type)
|
||||
* option is not specified, it is inherited from[chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.keltnerchannels
|
||||
* @since 7.0.0
|
||||
* @product highstock
|
||||
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
|
||||
* joinBy, keys, navigatorOptions, pointInterval,
|
||||
* pointIntervalUnit, pointPlacement, pointRange, pointStart,
|
||||
* stacking, showInNavigator
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/keltner-channels
|
||||
* @apioption series.keltnerchannels
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/keltner-channels.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/macd.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/macd.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
19
AdminPoll/bower_components/highcharts/indicators/macd.js
vendored
Normal file
19
AdminPoll/bower_components/highcharts/indicators/macd.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Indicator series type for Highstock
|
||||
|
||||
(c) 2010-2019 Sebastian Bochan
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/indicators/macd",["highcharts","highcharts/modules/stock"],function(g){b(g);b.Highcharts=g;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function g(b,e,g,k){b.hasOwnProperty(e)||(b[e]=k.apply(null,g))}b=b?b._modules:{};g(b,"indicators/macd.src.js",[b["parts/Globals.js"],b["parts/Utilities.js"]],function(b,e){var g=e.correctFloat,
|
||||
k=e.defined,q=e.merge;e=e.seriesType;var m=b.seriesTypes.sma,n=b.seriesTypes.ema;e("macd","sma",{params:{shortPeriod:12,longPeriod:26,signalPeriod:9,period:26},signalLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},macdLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},threshold:0,groupPadding:.1,pointPadding:.1,states:{hover:{halo:{size:0}}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Value: {point.MACD}<br/>Signal: {point.signal}<br/>Histogram: {point.y}<br/>'},
|
||||
dataGrouping:{approximation:"averages"},minPointLength:0},{nameComponents:["longPeriod","shortPeriod","signalPeriod"],requiredIndicators:["ema"],pointArrayMap:["y","signal","MACD"],parallelArrays:["x","y","signal","MACD"],pointValKey:"y",markerAttribs:b.noop,getColumnMetrics:b.seriesTypes.column.prototype.getColumnMetrics,crispCol:b.seriesTypes.column.prototype.crispCol,init:function(){m.prototype.init.apply(this,arguments);this.options&&(this.options=q({signalLine:{styles:{lineColor:this.color}},
|
||||
macdLine:{styles:{color:this.color}}},this.options),this.macdZones={zones:this.options.macdLine.zones,startIndex:0},this.signalZones={zones:this.macdZones.zones.concat(this.options.signalLine.zones),startIndex:this.macdZones.zones.length},this.resetZones=!0)},toYData:function(a){return[a.y,a.signal,a.MACD]},translate:function(){var a=this,p=["plotSignal","plotMACD"];b.seriesTypes.column.prototype.translate.apply(a);a.points.forEach(function(b){[b.signal,b.MACD].forEach(function(c,d){null!==c&&(b[p[d]]=
|
||||
a.yAxis.toPixels(c,!0))})})},destroy:function(){this.graph=null;this.graphmacd=this.graphmacd&&this.graphmacd.destroy();this.graphsignal=this.graphsignal&&this.graphsignal.destroy();m.prototype.destroy.apply(this,arguments)},drawPoints:b.seriesTypes.column.prototype.drawPoints,drawGraph:function(){for(var a=this,b=a.points,d=b.length,c=a.options,g=a.zones,e={options:{gapSize:c.gapSize}},h=[[],[]],f;d--;)f=b[d],k(f.plotMACD)&&h[0].push({plotX:f.plotX,plotY:f.plotMACD,isNull:!k(f.plotMACD)}),k(f.plotSignal)&&
|
||||
h[1].push({plotX:f.plotX,plotY:f.plotSignal,isNull:!k(f.plotMACD)});["macd","signal"].forEach(function(b,p){a.points=h[p];a.options=q(c[b+"Line"].styles,e);a.graph=a["graph"+b];a.currentLineZone=b+"Zones";a.zones=a[a.currentLineZone].zones;m.prototype.drawGraph.call(a);a["graph"+b]=a.graph});a.points=b;a.options=c;a.zones=g;a.currentLineZone=null},getZonesGraphs:function(a){var b=m.prototype.getZonesGraphs.call(this,a),d=b;this.currentLineZone&&(d=b.splice(this[this.currentLineZone].startIndex+1),
|
||||
d.length?d.splice(0,0,a[0]):d=[a[0]]);return d},applyZones:function(){var a=this.zones;this.zones=this.signalZones.zones;m.prototype.applyZones.call(this);this.graphmacd&&this.options.macdLine.zones.length&&this.graphmacd.hide();this.zones=a},getValues:function(a,b){var d=0,c=[],e=[],l=[];if(!(a.xData.length<b.longPeriod+b.signalPeriod)){var h=n.prototype.getValues(a,{period:b.shortPeriod});var f=n.prototype.getValues(a,{period:b.longPeriod});h=h.values;f=f.values;for(a=1;a<=h.length;a++)k(f[a-1])&&
|
||||
k(f[a-1][1])&&k(h[a+b.shortPeriod+1])&&k(h[a+b.shortPeriod+1][0])&&c.push([h[a+b.shortPeriod+1][0],0,null,h[a+b.shortPeriod+1][1]-f[a-1][1]]);for(a=0;a<c.length;a++)e.push(c[a][0]),l.push([0,null,c[a][3]]);b=n.prototype.getValues({xData:e,yData:l},{period:b.signalPeriod,index:2});b=b.values;for(a=0;a<c.length;a++)c[a][0]>=b[0][0]&&(c[a][2]=b[d][1],l[a]=[0,b[d][1],c[a][3]],null===c[a][3]?(c[a][1]=0,l[a][0]=0):(c[a][1]=g(c[a][3]-b[d][1]),l[a][0]=g(c[a][3]-b[d][1])),d++);return{values:c,xData:e,yData:l}}}});
|
||||
""});g(b,"masters/indicators/macd.src.js",[],function(){})});
|
||||
//# sourceMappingURL=macd.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/macd.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/macd.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
17
AdminPoll/bower_components/highcharts/indicators/macd.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/macd.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
405
AdminPoll/bower_components/highcharts/indicators/macd.src.js
vendored
Normal file
405
AdminPoll/bower_components/highcharts/indicators/macd.src.js
vendored
Normal file
@@ -0,0 +1,405 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Indicator series type for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Sebastian Bochan
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/macd', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/macd.src.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
|
||||
/* *
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var correctFloat = U.correctFloat,
|
||||
defined = U.defined,
|
||||
merge = U.merge,
|
||||
seriesType = U.seriesType;
|
||||
var noop = H.noop,
|
||||
SMA = H.seriesTypes.sma,
|
||||
EMA = H.seriesTypes.ema;
|
||||
/**
|
||||
* The MACD series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.macd
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('macd', 'sma',
|
||||
/**
|
||||
* Moving Average Convergence Divergence (MACD). This series requires
|
||||
* `linkedTo` option to be set and should be loaded after the
|
||||
* `stock/indicators/indicators.js` and `stock/indicators/ema.js`.
|
||||
*
|
||||
* @sample stock/indicators/macd
|
||||
* MACD indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/macd
|
||||
* @optionparent plotOptions.macd
|
||||
*/
|
||||
{
|
||||
params: {
|
||||
/**
|
||||
* The short period for indicator calculations.
|
||||
*/
|
||||
shortPeriod: 12,
|
||||
/**
|
||||
* The long period for indicator calculations.
|
||||
*/
|
||||
longPeriod: 26,
|
||||
/**
|
||||
* The base period for signal calculations.
|
||||
*/
|
||||
signalPeriod: 9,
|
||||
period: 26
|
||||
},
|
||||
/**
|
||||
* The styles for signal line
|
||||
*/
|
||||
signalLine: {
|
||||
/**
|
||||
* @sample stock/indicators/macd-zones
|
||||
* Zones in MACD
|
||||
*
|
||||
* @extends plotOptions.macd.zones
|
||||
*/
|
||||
zones: [],
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The styles for macd line
|
||||
*/
|
||||
macdLine: {
|
||||
/**
|
||||
* @sample stock/indicators/macd-zones
|
||||
* Zones in MACD
|
||||
*
|
||||
* @extends plotOptions.macd.zones
|
||||
*/
|
||||
zones: [],
|
||||
styles: {
|
||||
/**
|
||||
* Pixel width of the line.
|
||||
*/
|
||||
lineWidth: 1,
|
||||
/**
|
||||
* Color of the line.
|
||||
*
|
||||
* @type {Highcharts.ColorString}
|
||||
*/
|
||||
lineColor: void 0
|
||||
}
|
||||
},
|
||||
threshold: 0,
|
||||
groupPadding: 0.1,
|
||||
pointPadding: 0.1,
|
||||
states: {
|
||||
hover: {
|
||||
halo: {
|
||||
size: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
pointFormat: '<span style="color:{point.color}">\u25CF</span> <b> {series.name}</b><br/>' +
|
||||
'Value: {point.MACD}<br/>' +
|
||||
'Signal: {point.signal}<br/>' +
|
||||
'Histogram: {point.y}<br/>'
|
||||
},
|
||||
dataGrouping: {
|
||||
approximation: 'averages'
|
||||
},
|
||||
minPointLength: 0
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameComponents: ['longPeriod', 'shortPeriod', 'signalPeriod'],
|
||||
requiredIndicators: ['ema'],
|
||||
// "y" value is treated as Histogram data
|
||||
pointArrayMap: ['y', 'signal', 'MACD'],
|
||||
parallelArrays: ['x', 'y', 'signal', 'MACD'],
|
||||
pointValKey: 'y',
|
||||
// Columns support:
|
||||
markerAttribs: noop,
|
||||
getColumnMetrics: H.seriesTypes.column.prototype.getColumnMetrics,
|
||||
crispCol: H.seriesTypes.column.prototype.crispCol,
|
||||
// Colors and lines:
|
||||
init: function () {
|
||||
SMA.prototype.init.apply(this, arguments);
|
||||
// Check whether series is initialized. It may be not initialized,
|
||||
// when any of required indicators is missing.
|
||||
if (this.options) {
|
||||
// Set default color for a signal line and the histogram:
|
||||
this.options = merge({
|
||||
signalLine: {
|
||||
styles: {
|
||||
lineColor: this.color
|
||||
}
|
||||
},
|
||||
macdLine: {
|
||||
styles: {
|
||||
color: this.color
|
||||
}
|
||||
}
|
||||
}, this.options);
|
||||
// Zones have indexes automatically calculated, we need to
|
||||
// translate them to support multiple lines within one indicator
|
||||
this.macdZones = {
|
||||
zones: this.options.macdLine.zones,
|
||||
startIndex: 0
|
||||
};
|
||||
this.signalZones = {
|
||||
zones: this.macdZones.zones.concat(this.options.signalLine.zones),
|
||||
startIndex: this.macdZones.zones.length
|
||||
};
|
||||
this.resetZones = true;
|
||||
}
|
||||
},
|
||||
toYData: function (point) {
|
||||
return [point.y, point.signal, point.MACD];
|
||||
},
|
||||
translate: function () {
|
||||
var indicator = this, plotNames = ['plotSignal', 'plotMACD'];
|
||||
H.seriesTypes.column.prototype.translate.apply(indicator);
|
||||
indicator.points.forEach(function (point) {
|
||||
[point.signal, point.MACD].forEach(function (value, i) {
|
||||
if (value !== null) {
|
||||
point[plotNames[i]] =
|
||||
indicator.yAxis.toPixels(value, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
destroy: function () {
|
||||
// this.graph is null due to removing two times the same SVG element
|
||||
this.graph = null;
|
||||
this.graphmacd = this.graphmacd && this.graphmacd.destroy();
|
||||
this.graphsignal = this.graphsignal && this.graphsignal.destroy();
|
||||
SMA.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
drawPoints: H.seriesTypes.column.prototype.drawPoints,
|
||||
drawGraph: function () {
|
||||
var indicator = this,
|
||||
mainLinePoints = indicator.points,
|
||||
pointsLength = mainLinePoints.length,
|
||||
mainLineOptions = indicator.options,
|
||||
histogramZones = indicator.zones,
|
||||
gappedExtend = {
|
||||
options: {
|
||||
gapSize: mainLineOptions.gapSize
|
||||
}
|
||||
},
|
||||
otherSignals = [[],
|
||||
[]],
|
||||
point;
|
||||
// Generate points for top and bottom lines:
|
||||
while (pointsLength--) {
|
||||
point = mainLinePoints[pointsLength];
|
||||
if (defined(point.plotMACD)) {
|
||||
otherSignals[0].push({
|
||||
plotX: point.plotX,
|
||||
plotY: point.plotMACD,
|
||||
isNull: !defined(point.plotMACD)
|
||||
});
|
||||
}
|
||||
if (defined(point.plotSignal)) {
|
||||
otherSignals[1].push({
|
||||
plotX: point.plotX,
|
||||
plotY: point.plotSignal,
|
||||
isNull: !defined(point.plotMACD)
|
||||
});
|
||||
}
|
||||
}
|
||||
// Modify options and generate smoothing line:
|
||||
['macd', 'signal'].forEach(function (lineName, i) {
|
||||
indicator.points = otherSignals[i];
|
||||
indicator.options = merge(mainLineOptions[lineName + 'Line'].styles, gappedExtend);
|
||||
indicator.graph = indicator['graph' + lineName];
|
||||
// Zones extension:
|
||||
indicator.currentLineZone = lineName + 'Zones';
|
||||
indicator.zones =
|
||||
indicator[indicator.currentLineZone].zones;
|
||||
SMA.prototype.drawGraph.call(indicator);
|
||||
indicator['graph' + lineName] = indicator.graph;
|
||||
});
|
||||
// Restore options:
|
||||
indicator.points = mainLinePoints;
|
||||
indicator.options = mainLineOptions;
|
||||
indicator.zones = histogramZones;
|
||||
indicator.currentLineZone = null;
|
||||
// indicator.graph = null;
|
||||
},
|
||||
getZonesGraphs: function (props) {
|
||||
var allZones = SMA.prototype.getZonesGraphs.call(this,
|
||||
props),
|
||||
currentZones = allZones;
|
||||
if (this.currentLineZone) {
|
||||
currentZones = allZones.splice(this[this.currentLineZone].startIndex + 1);
|
||||
if (!currentZones.length) {
|
||||
// Line has no zones, return basic graph "zone"
|
||||
currentZones = [props[0]];
|
||||
}
|
||||
else {
|
||||
// Add back basic prop:
|
||||
currentZones.splice(0, 0, props[0]);
|
||||
}
|
||||
}
|
||||
return currentZones;
|
||||
},
|
||||
applyZones: function () {
|
||||
// Histogram zones are handled by drawPoints method
|
||||
// Here we need to apply zones for all lines
|
||||
var histogramZones = this.zones;
|
||||
// signalZones.zones contains all zones:
|
||||
this.zones = this.signalZones.zones;
|
||||
SMA.prototype.applyZones.call(this);
|
||||
// applyZones hides only main series.graph, hide macd line manually
|
||||
if (this.graphmacd && this.options.macdLine.zones.length) {
|
||||
this.graphmacd.hide();
|
||||
}
|
||||
this.zones = histogramZones;
|
||||
},
|
||||
getValues: function (series, params) {
|
||||
var j = 0,
|
||||
MACD = [],
|
||||
xMACD = [],
|
||||
yMACD = [],
|
||||
signalLine = [],
|
||||
shortEMA,
|
||||
longEMA,
|
||||
i;
|
||||
if (series.xData.length <
|
||||
params.longPeriod + params.signalPeriod) {
|
||||
return;
|
||||
}
|
||||
// Calculating the short and long EMA used when calculating the MACD
|
||||
shortEMA = EMA.prototype.getValues(series, {
|
||||
period: params.shortPeriod
|
||||
});
|
||||
longEMA = EMA.prototype.getValues(series, {
|
||||
period: params.longPeriod
|
||||
});
|
||||
shortEMA = shortEMA.values;
|
||||
longEMA = longEMA.values;
|
||||
// Subtract each Y value from the EMA's and create the new dataset
|
||||
// (MACD)
|
||||
for (i = 1; i <= shortEMA.length; i++) {
|
||||
if (defined(longEMA[i - 1]) &&
|
||||
defined(longEMA[i - 1][1]) &&
|
||||
defined(shortEMA[i + params.shortPeriod + 1]) &&
|
||||
defined(shortEMA[i + params.shortPeriod + 1][0])) {
|
||||
MACD.push([
|
||||
shortEMA[i + params.shortPeriod + 1][0],
|
||||
0,
|
||||
null,
|
||||
shortEMA[i + params.shortPeriod + 1][1] -
|
||||
longEMA[i - 1][1]
|
||||
]);
|
||||
}
|
||||
}
|
||||
// Set the Y and X data of the MACD. This is used in calculating the
|
||||
// signal line.
|
||||
for (i = 0; i < MACD.length; i++) {
|
||||
xMACD.push(MACD[i][0]);
|
||||
yMACD.push([0, null, MACD[i][3]]);
|
||||
}
|
||||
// Setting the signalline (Signal Line: X-day EMA of MACD line).
|
||||
signalLine = EMA.prototype.getValues({
|
||||
xData: xMACD,
|
||||
yData: yMACD
|
||||
}, {
|
||||
period: params.signalPeriod,
|
||||
index: 2
|
||||
});
|
||||
signalLine = signalLine.values;
|
||||
// Setting the MACD Histogram. In comparison to the loop with pure
|
||||
// MACD this loop uses MACD x value not xData.
|
||||
for (i = 0; i < MACD.length; i++) {
|
||||
// detect the first point
|
||||
if (MACD[i][0] >= signalLine[0][0]) {
|
||||
MACD[i][2] = signalLine[j][1];
|
||||
yMACD[i] = [0, signalLine[j][1], MACD[i][3]];
|
||||
if (MACD[i][3] === null) {
|
||||
MACD[i][1] = 0;
|
||||
yMACD[i][0] = 0;
|
||||
}
|
||||
else {
|
||||
MACD[i][1] = correctFloat(MACD[i][3] -
|
||||
signalLine[j][1]);
|
||||
yMACD[i][0] = correctFloat(MACD[i][3] -
|
||||
signalLine[j][1]);
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return {
|
||||
values: MACD,
|
||||
xData: xMACD,
|
||||
yData: yMACD
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `MACD` series. If the [type](#series.macd.type) option is not
|
||||
* specified, it is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.macd
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @excluding dataParser, dataURL
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/macd
|
||||
* @apioption series.macd
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/macd.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
17
AdminPoll/bower_components/highcharts/indicators/mfi.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/mfi.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals";
|
||||
import * as _Highcharts from "../highcharts";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
13
AdminPoll/bower_components/highcharts/indicators/mfi.js
vendored
Normal file
13
AdminPoll/bower_components/highcharts/indicators/mfi.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Highstock JS v8.0.4 (2020-03-10)
|
||||
|
||||
Money Flow Index indicator for Highstock
|
||||
|
||||
(c) 2010-2019 Grzegorz Blachliski
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/mfi",["highcharts","highcharts/modules/stock"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,c,h,m){a.hasOwnProperty(c)||(a[c]=m.apply(null,h))}a=a?a._modules:{};c(a,"indicators/mfi.src.js",[a["parts/Utilities.js"]],function(a){function c(a){return a.reduce(function(a,
|
||||
n){return a+n})}function h(a){return(a[1]+a[2]+a[3])/3}var m=a.error,v=a.isArray;a=a.seriesType;a("mfi","sma",{params:{period:14,volumeSeriesID:"volume",decimals:4}},{nameBase:"Money Flow Index",getValues:function(a,b){var e=b.period,p=a.xData,f=a.yData,n=f?f.length:0,w=b.decimals,g=1,d=a.chart.get(b.volumeSeriesID),q=d&&d.yData,r=[],t=[],u=[],k=[],l=[];if(!d)m("Series "+b.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,a.chart);else if(!(p.length<=e)&&v(f[0])&&4===f[0].length&&q){for(a=h(f[g]);g<
|
||||
e+1;)b=a,a=h(f[g]),b=a>=b,d=a*q[g],k.push(b?d:0),l.push(b?0:d),g++;for(e=g-1;e<n;e++)e>g-1&&(k.shift(),l.shift(),b=a,a=h(f[e]),b=a>b,d=a*q[e],k.push(b?d:0),l.push(b?0:d)),b=c(l),d=c(k),b=d/b,b=parseFloat((100-100/(1+b)).toFixed(w)),r.push([p[e],b]),t.push(p[e]),u.push(b);return{values:r,xData:t,yData:u}}}});""});c(a,"masters/indicators/mfi.src.js",[],function(){})});
|
||||
//# sourceMappingURL=mfi.js.map
|
||||
1
AdminPoll/bower_components/highcharts/indicators/mfi.js.map
vendored
Normal file
1
AdminPoll/bower_components/highcharts/indicators/mfi.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mfi.js.map","lineCount":12,"mappings":"A;;;;;;;;;AAUC,SAAS,CAACA,CAAD,CAAU,CACM,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,EACIF,CAAA,CAAQ,SAAR,CACA,CADqBA,CACrB,CAAAC,MAAAC,QAAA,CAAiBF,CAFrB,EAG6B,UAAtB,GAAI,MAAOG,OAAX,EAAoCA,MAAAC,IAApC,CACHD,MAAA,CAAO,2BAAP,CAAoC,CAAC,YAAD,CAAe,0BAAf,CAApC,CAAgF,QAAS,CAACE,CAAD,CAAa,CAClGL,CAAA,CAAQK,CAAR,CACAL,EAAAK,WAAA,CAAqBA,CACrB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EAAjC,CACQA,CAqBJ,CArBQd,CAqBR,CArBgB,CAqBhB,GAnBIM,CAAAS,MAAA,EAUA,CATAR,CAAAQ,MAAA,EASA,CAPAN,CAOA,CAPkBD,CAOlB,CANAA,CAMA,CANkB1B,CAAA,CAAsBc,CAAA,CAAKkB,CAAL,CAAtB,CAMlB,CALAJ,CAKA,CALOF,CAKP,CALyBC,CAKzB,CAHAE,CAGA,CAHqCH,CAGrC,CAHsDJ,CAAAQ,CAAWE,CAAXF,CAGtD,CADAN,CAAAO,KAAA,CAAuBH,CAAA,CAAOC,CAAP,CAAsB,CAA7C,CACA,CAAAJ,CAAAM,KAAA,CAAuBH,CAAA,CAAO,CAAP,CAAWC,CAAlC,CASJ,EANAK,CAMA,CANuBvC,CAAA,CAAS8B,CAAT,CAMvB,CALAU,CAKA,CALuBxC,CAAA,CAAS6B,CAAT,CAKvB,CAJAY,CAIA,CAJiBD,CAIjB,CAJwCD,CAIxC,CAHAG,CAGA,CA9GDC,UAAA,CAAWC,CA2GS,GA3GTA,CA2GgB,GA3GhBA,EA2GuB,CA3GvBA,CA2G2BH,CA3G3BG,UAAA,CA2G6C/B,CA3G7C,CAAX,CA8GC,CAFAe,CAAAQ,KAAA,CAAS,CAACnB,CAAA,CAAKoB,CAAL,CAAD,CAAUK,CAAV,CAAT,CAEA,CADAxB,CAAAkB,KAAA,CAAWnB,CAAA,CAAKoB,CAAL,CAAX,CACA,CAAAjB,CAAAgB,KAAA,CAAWM,CAAX,CAEJ,OAAO,CACHG,OAAQjB,CADL,CAEHV,MAAOA,CAFJ,CAGHE,MAAOA,CAHJ,CA5CP,CAZiC,CAFzC,CApCA,CAiHA,GAxJ8F,CAAlG,CA2JA7B,EAAA,CAAgBO,CAAhB,CAA0B,+BAA1B,CAA2D,EAA3D,CAA+D,QAAS,EAAG,EAA3E,CAlKoB,CAbvB;","sources":["mfi.src.js"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_registerModule","obj","path","args","fn","hasOwnProperty","apply","_modules","U","sumArray","array","reduce","prev","cur","calculateTypicalPrice","point","error","isArray","seriesType","params","period","volumeSeriesID","decimals","nameBase","getValues","series","xVal","xData","yVal","yData","yValLen","length","range","volumeSeries","chart","get","yValVolume","MFI","positiveMoneyFlow","negativeMoneyFlow","newTypicalPrice","oldTypicalPrice","isUp","rawMoneyFlow","volume","push","i","shift","negativeMoneyFlowSum","positiveMoneyFlowSum","moneyFlowRatio","MFIPoint","parseFloat","toFixed","values"]}
|
||||
17
AdminPoll/bower_components/highcharts/indicators/mfi.src.d.ts
vendored
Normal file
17
AdminPoll/bower_components/highcharts/indicators/mfi.src.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!*
|
||||
*
|
||||
* Copyright (c) Highsoft AS. All rights reserved.
|
||||
*
|
||||
*!*/
|
||||
import * as globals from "../globals.src";
|
||||
import * as _Highcharts from "../highcharts.src";
|
||||
/**
|
||||
* Adds the module to the imported Highcharts namespace.
|
||||
*
|
||||
* @param highcharts
|
||||
* The imported Highcharts namespace to extend.
|
||||
*/
|
||||
export function factory(highcharts: typeof Highcharts): void;
|
||||
declare module "../highcharts.src" {}
|
||||
export default factory;
|
||||
export let Highcharts: typeof _Highcharts;
|
||||
212
AdminPoll/bower_components/highcharts/indicators/mfi.src.js
vendored
Normal file
212
AdminPoll/bower_components/highcharts/indicators/mfi.src.js
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
/**
|
||||
* @license Highstock JS v8.0.4 (2020-03-10)
|
||||
*
|
||||
* Money Flow Index indicator for Highstock
|
||||
*
|
||||
* (c) 2010-2019 Grzegorz Blachliński
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
'use strict';
|
||||
(function (factory) {
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
factory['default'] = factory;
|
||||
module.exports = factory;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define('highcharts/indicators/mfi', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
|
||||
factory(Highcharts);
|
||||
factory.Highcharts = Highcharts;
|
||||
return factory;
|
||||
});
|
||||
} else {
|
||||
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
|
||||
}
|
||||
}(function (Highcharts) {
|
||||
var _modules = Highcharts ? Highcharts._modules : {};
|
||||
function _registerModule(obj, path, args, fn) {
|
||||
if (!obj.hasOwnProperty(path)) {
|
||||
obj[path] = fn.apply(null, args);
|
||||
}
|
||||
}
|
||||
_registerModule(_modules, 'indicators/mfi.src.js', [_modules['parts/Utilities.js']], function (U) {
|
||||
/* *
|
||||
*
|
||||
* Money Flow Index indicator for Highstock
|
||||
*
|
||||
* (c) 2010-2020 Grzegorz Blachliński
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*
|
||||
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
||||
*
|
||||
* */
|
||||
var error = U.error,
|
||||
isArray = U.isArray,
|
||||
seriesType = U.seriesType;
|
||||
/* eslint-disable require-jsdoc */
|
||||
// Utils:
|
||||
function sumArray(array) {
|
||||
return array.reduce(function (prev, cur) {
|
||||
return prev + cur;
|
||||
});
|
||||
}
|
||||
function toFixed(a, n) {
|
||||
return parseFloat(a.toFixed(n));
|
||||
}
|
||||
function calculateTypicalPrice(point) {
|
||||
return (point[1] + point[2] + point[3]) / 3;
|
||||
}
|
||||
function calculateRawMoneyFlow(typicalPrice, volume) {
|
||||
return typicalPrice * volume;
|
||||
}
|
||||
/* eslint-enable require-jsdoc */
|
||||
/**
|
||||
* The MFI series type.
|
||||
*
|
||||
* @private
|
||||
* @class
|
||||
* @name Highcharts.seriesTypes.mfi
|
||||
*
|
||||
* @augments Highcharts.Series
|
||||
*/
|
||||
seriesType('mfi', 'sma',
|
||||
/**
|
||||
* Money Flow Index. This series requires `linkedTo` option to be set and
|
||||
* should be loaded after the `stock/indicators/indicators.js` file.
|
||||
*
|
||||
* @sample stock/indicators/mfi
|
||||
* Money Flow Index Indicator
|
||||
*
|
||||
* @extends plotOptions.sma
|
||||
* @since 6.0.0
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/mfi
|
||||
* @optionparent plotOptions.mfi
|
||||
*/
|
||||
{
|
||||
/**
|
||||
* @excluding index
|
||||
*/
|
||||
params: {
|
||||
period: 14,
|
||||
/**
|
||||
* The id of volume series which is mandatory.
|
||||
* For example using OHLC data, volumeSeriesID='volume' means
|
||||
* the indicator will be calculated using OHLC and volume values.
|
||||
*/
|
||||
volumeSeriesID: 'volume',
|
||||
/**
|
||||
* Number of maximum decimals that are used in MFI calculations.
|
||||
*/
|
||||
decimals: 4
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @lends Highcharts.Series#
|
||||
*/
|
||||
{
|
||||
nameBase: 'Money Flow Index',
|
||||
getValues: function (series, params) {
|
||||
var period = params.period,
|
||||
xVal = series.xData,
|
||||
yVal = series.yData,
|
||||
yValLen = yVal ? yVal.length : 0,
|
||||
decimals = params.decimals,
|
||||
// MFI starts calculations from the second point
|
||||
// Cause we need to calculate change between two points
|
||||
range = 1,
|
||||
volumeSeries = series.chart.get(params.volumeSeriesID),
|
||||
yValVolume = (volumeSeries && volumeSeries.yData),
|
||||
MFI = [],
|
||||
isUp = false,
|
||||
xData = [],
|
||||
yData = [],
|
||||
positiveMoneyFlow = [],
|
||||
negativeMoneyFlow = [],
|
||||
newTypicalPrice,
|
||||
oldTypicalPrice,
|
||||
rawMoneyFlow,
|
||||
negativeMoneyFlowSum,
|
||||
positiveMoneyFlowSum,
|
||||
moneyFlowRatio,
|
||||
MFIPoint,
|
||||
i;
|
||||
if (!volumeSeries) {
|
||||
error('Series ' +
|
||||
params.volumeSeriesID +
|
||||
' not found! Check `volumeSeriesID`.', true, series.chart);
|
||||
return;
|
||||
}
|
||||
// MFI requires high low and close values
|
||||
if ((xVal.length <= period) || !isArray(yVal[0]) ||
|
||||
yVal[0].length !== 4 ||
|
||||
!yValVolume) {
|
||||
return;
|
||||
}
|
||||
// Calculate first typical price
|
||||
newTypicalPrice = calculateTypicalPrice(yVal[range]);
|
||||
// Accumulate first N-points
|
||||
while (range < period + 1) {
|
||||
// Calculate if up or down
|
||||
oldTypicalPrice = newTypicalPrice;
|
||||
newTypicalPrice = calculateTypicalPrice(yVal[range]);
|
||||
isUp = newTypicalPrice >= oldTypicalPrice;
|
||||
// Calculate raw money flow
|
||||
rawMoneyFlow = calculateRawMoneyFlow(newTypicalPrice, yValVolume[range]);
|
||||
// Add to array
|
||||
positiveMoneyFlow.push(isUp ? rawMoneyFlow : 0);
|
||||
negativeMoneyFlow.push(isUp ? 0 : rawMoneyFlow);
|
||||
range++;
|
||||
}
|
||||
for (i = range - 1; i < yValLen; i++) {
|
||||
if (i > range - 1) {
|
||||
// Remove first point from array
|
||||
positiveMoneyFlow.shift();
|
||||
negativeMoneyFlow.shift();
|
||||
// Calculate if up or down
|
||||
oldTypicalPrice = newTypicalPrice;
|
||||
newTypicalPrice = calculateTypicalPrice(yVal[i]);
|
||||
isUp = newTypicalPrice > oldTypicalPrice;
|
||||
// Calculate raw money flow
|
||||
rawMoneyFlow = calculateRawMoneyFlow(newTypicalPrice, yValVolume[i]);
|
||||
// Add to array
|
||||
positiveMoneyFlow.push(isUp ? rawMoneyFlow : 0);
|
||||
negativeMoneyFlow.push(isUp ? 0 : rawMoneyFlow);
|
||||
}
|
||||
// Calculate sum of negative and positive money flow:
|
||||
negativeMoneyFlowSum = sumArray(negativeMoneyFlow);
|
||||
positiveMoneyFlowSum = sumArray(positiveMoneyFlow);
|
||||
moneyFlowRatio = positiveMoneyFlowSum / negativeMoneyFlowSum;
|
||||
MFIPoint = toFixed(100 - (100 / (1 + moneyFlowRatio)), decimals);
|
||||
MFI.push([xVal[i], MFIPoint]);
|
||||
xData.push(xVal[i]);
|
||||
yData.push(MFIPoint);
|
||||
}
|
||||
return {
|
||||
values: MFI,
|
||||
xData: xData,
|
||||
yData: yData
|
||||
};
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A `MFI` series. If the [type](#series.mfi.type) option is not specified, it
|
||||
* is inherited from [chart.type](#chart.type).
|
||||
*
|
||||
* @extends series,plotOptions.mfi
|
||||
* @since 6.0.0
|
||||
* @excluding dataParser, dataURL
|
||||
* @product highstock
|
||||
* @requires stock/indicators/indicators
|
||||
* @requires stock/indicators/mfi
|
||||
* @apioption series.mfi
|
||||
*/
|
||||
''; // to include the above in the js output
|
||||
|
||||
});
|
||||
_registerModule(_modules, 'masters/indicators/mfi.src.js', [], function () {
|
||||
|
||||
|
||||
});
|
||||
}));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user