Bolinger Band and RSI algorithms in C++