Set the upper and lower barriers as multiples of recent volatility rather than fixed percentages, so the label means the same thing in calm and violent markets. The vertical barrier caps holding time and forces a decision.
Worked example: daily volatility is 1.2%, barriers at 2 volatility units, so +2.4% and -2.4%, with a five-day limit. If price reaches +2.4% on day three, the label is +1. If it hits -2.4% on day two, the label is -1. If neither happens by day five, label 0 or the sign of the realised return, depending on the design.
The benefit is that the label already encodes the exit rule, so the model is learning something directly tradeable. The cost is more parameters, barrier multiples and horizon, each of which needs the same parameter-sensitivity scrutiny as any other.
Related: label, meta-labelling, purged-cross-validation, stop-loss