How can I adjust the TopMarket strategy, so that it gains positions only in one direction I need?

: Strategy settings

Note that in the TopMarket strategy, both with TMSameDirection = YES and TMSameDirection = NO, the TopMarket strategy can gain both longs and shorts. If you want to accumulate positions only in one direction that you need, then do it with triggers: define TopMarket strategy as a MASTER strategy without buying, which triggers SLAVE strategy (like EMA), which buys in the desired direction (only in shorts or only in longs), regardless of the trend direction.