These details need to be settled up front before any code is written. The coder does in fact own the rights to the EA, at least in Canada. However, if the trader wishes to share the ownership, this is usually done for an extra charge. My advice is to offer the coder more money for the source code. Of course you will not have exclusive rights.