diff --git a/Multi-Period-Daily/User.Bot.js b/Multi-Period-Daily/User.Bot.js index f092a78bc..3d6381ccf 100644 --- a/Multi-Period-Daily/User.Bot.js +++ b/Multi-Period-Daily/User.Bot.js @@ -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 = ","; }