I created a Data Series called High_Series that has closing values of the RangeBars for all values except currentBar where the value is the Max close of the Range Bar. I want to predict the BB Upper value on Range Bar close if closes at top of Range Bar.
Data Series has below data and I can see it is as expected. in the 0 index position 53.58 is the MaxRangeBar Close value all other values match actual closes.
index: value Close (actual)
0:53.58 Close: 53.5
1:53.44 Close: 53.44
2:53.57 Close: 53.57
3:53.52 Close: 53.52
4:53.45 Close: 53.45
5:53.56 Close: 53.56
6:53.65 Close: 53.65
7:53.49 Close: 53.49
8:53.37 Close: 53.37
9:53.26 Close: 53.26
10:53.26 Close: 53.26
11:53.41 Close: 53.41
12:53.28 Close: 53.28
PredictBBUp2val = Math.Round(BollingerEMA (High_Series,2,12).Upper[0],2);
PredictBBUp2val = 59.8
But the real BB value = 53.67
BBUpperV = Math.Round(BollingerEMA (2,12).Upper[0],2);
Obviously something is not right about the Series I am passing in as the same function with virtually the same data should yield a number closer to the same. How best can I go about debugging this issue? I don't understand why the predicted value is so wrong given the data I fed it.
Comment