Problem when I enter a trade value in a box.

Hello
I am getting a problem when I enter a trade value in a box. It just allows two numbers after the end of decimal point.
I tested with regex but it did not fix the problem. I hope someone can give me an appropriate solution in this.
Thanks for the help.

Error:
NullReferenceException was unhandled by user code
Object reference not set to an instance of an object.
