The manual is your friend

"All trade variables listed above can only be accessed inside a TMF, inside a trade enumeration loop, or when ThisTrade was explicitely set to a valid TRADE* pointer. In all other cases they have invalid content."

I suppose a 0-value is invalid content, which means you did not access the variable correctly. A TMF makes no sense here, I would set ThisTrade directly from enterLong. And check if it is nonzero and your trade was really entered, otherwise you wont get an entry price, right? laugh