Forex_Strategy_Builder.Indicator.Sigma C# (CSharp) Method

Sigma() protected method

Maximum error for comparing indicator values
protected Sigma ( ) : double
return double
        protected double Sigma()
        {
            int sigmaMode = isSeparatedChart ?
                Configs.SIGMA_MODE_SEPARATED_CHART : // Indicators plotted on its own chart (MACD, RSI, ADX, Momentum, ...)
                Configs.SIGMA_MODE_MAIN_CHART;       // Indicators plotted on the main chart (MA, Bollinger Bands, Alligator, ...)

            double sigma;

            switch (sigmaMode)
            {
                case 0:
                    sigma = 0;
                    break;
                case 1:
                    sigma = Data.InstrProperties.Point * 0.5;
                    break;
                case 2:
                    sigma = Data.InstrProperties.Point * 0.05;
                    break;
                case 3:
                    sigma = Data.InstrProperties.Point * 0.005;
                    break;
                case 4:
                    sigma = 0.00005;
                    break;
                case 5:
                    sigma = 0.000005;
                    break;
                case 6:
                    sigma = 0.0000005;
                    break;
                case 7:
                    sigma = 0.00000005;
                    break;
                case 8:
                    sigma = 0.000000005;
                    break;
                default:
                    sigma = 0;
                    break;
            }

            return sigma;
        }