This is still the same problem - you're still using trade variables like "TradeIsShort" or "TradeIsLong" outside the context of a trade.
Trade variables belong to a trade, they make no sense without. So you can not use them outside a TMF or an open_trades loop. This even crashes your script because you're reading from a nonexistent pointer.
Maybe you were confusing the "TradeIsShort" or "TradeIsLong" variables with something else? What did you want to do with them?