If two lite-C functions have the same name and parameters, the last one is used. So I can't say from your description why your objective function does not work as it should, but if you post your complete script here, I can look over it. Maybe the problem is already visible in the code. If your script is top secret, you can replace your trade algo with some dummy algorithm for testing.