Indicators: Custom Bollinger Bands

 

Custom Bollinger Bands:

Standard Bollinger Bands indicator with averaging features added

Custom Bollinger Bands

Author: Lucas Moura Vidal Da Silva

 
Nice idea! But work is incomplete for Exponential and Smoothed, it return 0. See the code 
double CalculateMovingAverage(int position, int period, const double &price[]) {
    switch(InpMaMethod) {
        case Simple:
            return SimpleMA(position, period, price);
        case Exponential:
            // Corrigindo a chamada da função iMA com os parâmetros corretos
            return iMA(NULL, 0, period, 0, MODE_EMA, PRICE_CLOSE);
        case Smoothed:
            // Implemente sua função SMMA aqui
            break;
        case LinearWeighted:
            return LinearWeightedMA(position, period, price);
    }
    return 0; // Retorno padrão em caso de método indefinido
}
Reason: