/// <summary>
        /// Returns the range between an index interval in a market series
        /// </summary>
        /// <param name="bars"></param>
        /// <param name="startIndex">Start index</param>
        /// <param name="endIndex">End index</param>
        /// <param name="symbol">The market series symbol</param>
        /// <param name="returnType">The return type</param>
        /// <param name="useBarBody">Use bar body (open and close) instead of shadows (high and low)</param>
        /// <returns>double</returns>
        public static double GetRange(this Bars bars, int startIndex, int endIndex, Symbol symbol, PriceValueType returnType, bool useBarBody = false)
        {
            var range = bars.GetRange(startIndex, endIndex, useBarBody);

            return(symbol.ChangePriceValueType(range, returnType));
        }