http://msdn.microsoft.com/ru-ru/library/system.math_methods(v=vs.110).aspx
Например в блоке формула: 500*Math.Round(Закрытие/500)