private int secondsInInterval(StBarInterval interval)
        {
            switch (interval)
            {
            case StBarInterval.StBarInterval_1Min:
                return(60);

            case StBarInterval.StBarInterval_5Min:
                return(60 * 5);

            case StBarInterval.StBarInterval_10Min:
                return(60 * 10);

            case StBarInterval.StBarInterval_15Min:
                return(60 * 15);

            case StBarInterval.StBarInterval_30Min:
                return(60 * 30);

            case StBarInterval.StBarInterval_60Min:
                return(60 * 60);

            case StBarInterval.StBarInterval_2Hour:
                return(60 * 60 * 2);

            case StBarInterval.StBarInterval_4Hour:
                return(60 * 60 * 4);

            case StBarInterval.StBarInterval_Day:
                return(60 * 60 * 24);

            case StBarInterval.StBarInterval_Month:
                return(60 * 60 * 24 * 30);

            default:
                throw new ArgumentException("Not supported: " + interval.ToString());
            }
        }