Bandwidth

This commit is contained in:
Luis Fernando Molina committed 2019-03-06 00:48:52 +01:00
1 parent 8202cd73c1
commit 3d75eb249a
1 file changed
+6 -4
+6 -4
View File
@@ -267,15 +267,16 @@
movingAverage = movingAverage + value;
movingAverage = movingAverage / (numberOfPreviousPeriods + 1);
let bandwidth = (upperBB- lowerBB) / band.movingAverage;
let percentageBandwidth = {
begin: candles[i].begin,
end: candles[i].end,
value: value,
movingAverage: movingAverage
movingAverage: movingAverage,
bandwidth: bandwidth
};
/* Will only add to the array the pBs of the current day */
pBArray.push(percentageBandwidth);
}
@@ -377,7 +378,8 @@
pB.begin + "," +
pB.end + "," +
pB.value + "," +
pB.movingAverage + "]";
pB.movingAverage + "," +
pB.bandwidth + "]";
if (separator === "") { separator = ","; }