public static double[][] Bollinger(Index[] data2,int n,int k){
        Index[] data = new Index[data2.length];
        data=ReverseIndex(data2);
        double[][] out = new double[3][data.length];
        out[1]=MA(data,n);
        double[] temp = new double[data.length];
        temp=SD(data,n);
        for(int i=0;i<data.length;i++){
            out[0][i]=out[1][i]+(temp[i]*k);
            out[2][i]=out[1][i]-(temp[i]*k);
        }
        out[1]=Reverse(out[1]);
        out[2]=Reverse(out[2]);
        out[0]=Reverse(out[0]);
        return out;
    }