While I appreciate an interest in tinkering with models and the attempt to create something useful, I would discourage you from the current path you're on.
Why are hits, BB, HBP and ER all equal value?
Why would you ever multiple the resulting sum by BABIP? Also, as soon as you do that, the contextual /9 innings you attempted to created before gets obfuscated entirely and becomes a useless multiplicative factor.
What, in English, is the result? Why do we want to know this specific result?
You should really go read the SIERA discussions (comment sections on posts) on the Book blog. The FIP ones too.