protected void OnSDPointer(boolean action) {
        sdChartShowed = action;
        //true for showing sd chart
        if (action) {
            if (lastData == null) {
                System.out.println("Original data is null, downloading it");
                OnDataRangeChanged();
                return;
            }

            Index[] dataPointer = new Index[lastData.length];
            for (int i = 0; i < lastData.length; i++) {
                dataPointer[i] = new Index(lastData[i]);
            }

            lineChartSD = LinearChartManager.linear();
            lineChartSD.setTitle("SD");
            lineChartSD.setMaxHeight(250);

            int size = lastData.length;

            double[] data1 = Indicators.SD(dataPointer, size);
            for (int i = 0; i < size; i++) {
                dataPointer[i].setClose_val(data1[i]);
            }

            LinearChartManager.addSeries(lineChartSD, dataPointer, "SD", selectedRange);
            BorderPane bPane = (BorderPane) pane.getChildren().get(1);
            bPane.setBottom(lineChartSD);
        } else { //let's hide it
            lineChartSD = null;
            BorderPane bPane = (BorderPane) pane.getChildren().get(1);
            bPane.setBottom(null);
        }
    }