Bandwidth Implemented
This commit is contained in:
1 parent
3d75eb249a
commit
5d75b31c97
1 file changed
+6
-2
@@ -545,11 +545,14 @@
|
||||
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 */
|
||||
@@ -656,7 +659,8 @@
|
||||
pB.begin + "," +
|
||||
pB.end + "," +
|
||||
pB.value + "," +
|
||||
pB.movingAverage + "]";
|
||||
pB.movingAverage + "," +
|
||||
pB.bandwidth + "]";
|
||||
|
||||
if (separator === "") { separator = ","; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user