On the basis that it's a price then yes, you would need to re-process your distance value for 3/5-digit brokers.
One small tip if you're ever unsure about what values are being returned inside your EA. Just have the EA return those values in the form of a debug comment so that you can see what's happening.
You simply set up an external bool called debug on Global Scope and a text string (maybe call it txt) containing the results of HMAA - HMAB and distance * Point.
You will be able to see straight away if it's working correctly or not and, if it's not working, you'll be able to see what's going wrong.