Portfolio rebalancing you are adding to losers a lot of the time. For a scalp/swing trade only if you haven't reached max risk allocated for the trade idea.
If it improves expectancy more than closing or leaving alone. (requires better understanding of expectancy than most of us are willing/able to ascertain).
It's never okay to add to a loser, since a loser is a position held beyond the point of where the trade idea should have been proven wrong. Averaging down is a different thing, since you don't believe you get the entry right at once, you split your entry into different parts, allocating a portion of the total risk for the trade each entry.
Make system where you breakeven plus one tick 50-60% of the time and losses have to be under 7% and tested years of tick data for MAE. For scalping, but regardless any timeframes have to be backtested much, but most go belly up cause under funded and pig greedy.
You should never add to a losing position, unless you want to lose more. Or at the very least, wait for things to settle down, and an evident direction has exposed itself and has been established. You need to just realize and admit you were wrong...don't become a dreamy, hopeful gambler who thinks they have a crystal ball. Or assume the market will soon correct to your personal idealism, right values/direction. That's like dating or sticking to a horrible relationship, and buying him/her roses and chocolate and panties...hoping they will fix themselves, and everything will be perfect after that. Wall Street is no place for wishful-thinking...that's for Disneyland's Small World and Space Mountain rides. Make Trading Great Again 2018...High-Five`, ET extraterrestrial trader I love giving wonderful trading advice -- I could easily write a book.