Not many brokers would accept a trade with a 0.0001 stop loss. You need to set some reasonable value for entering a trade - check your broker's trade parameter limits. They are usually posted on his website.

And what is still the problem with the risk calculation? You can see the formula in the test script, so what have you not understood?