A TMF is intended for handling already-open trades. That means lot size was already determined by the time Zorro calls any TMF function.

Ideally, you should size your trade in run() before you call enterShort(TrailingStop) or enterLong(TrailingStop).

Depending on what you are trying to do, maybe you can create a global variable for the next lot size. You can set it from your TMF and get it from run().

Also, this is vague:
Code:
if(TradeIsLong and TradeProfit > 0)

Be explicit and use more parentheses.