Exemplo n.º 1
0
 public static double CalculateRelativeVolume(long avgVolume, long volume)
 {
     if (avgVolume == (long)0 || volume == (long)0)
     {
         return(0);
     }
     return((DataTypeConverters.TryConvertToDouble(volume) / DataTypeConverters.TryConvertToDouble(avgVolume)).RoundTwoDecimalPlaces());
 }
Exemplo n.º 2
0
        public static double TryParseChangePercentage(string value)
        {
            double num;

            try
            {
                num = DataTypeConverters.TryConvertToDouble(DataTypeConverters.StringToObject(value));
            }
            catch
            {
                num = 0;
            }
            return(num);
        }