Also, the code you are showing was designed for an NFA plugin. The MT4 bridge is not an NFA plugin. This needs a rewrite.