@Zereleth
Try to use the block Comment(ugly) to see the output value of any variable. You will get all your answers.
NormalizeDouble() is another function that could help you get round values
MathSqrt() is a square root function rather than a square function
The variable you defined is in global scope. Therefore, you can use the current output at the next block.
As you are a programmer, you may wonder how the MT4 program flows. It a real time computation problem. That means a new calculation may start before you has finished the last once. That's why slow PC and a complex EA is problematic