Maybe you wanted to use AlgoVar, not TradeVar. TradeVar is a variable of a trade, but there is no trade accessed in your code, unless the "..." was a trade enumeration loop.

For passing variables to a specific trade, call enterLong(TMF,Var1,Var2,.. etc.). The TMF is then also called with those parameters, and you can then store them in TradeVars. TradeVar without a trade won't crash, but has no meaning either. It is not passed to the next opened trade.