I really don't know what you did. enterTrade is a beast to tame since you have to manipulate TRADE structs.

Check out the Simulate script, which gives a great example on how to use enterTrade for this kind of purpose.