An Uptrend is a series of Higher Highs and Lows with the price extensions being longer than the pullbacks. Extensions will break above previous swing highs, pullbacks will not break below previous swing lows.
The uptrend is classed as over when price breaks the last swing low that lead to the High.

failure to break the the last swing low could simply be a complex pullback as demonstrated below.

w
An Uptrend from the perspective of supply and Demand and trade Decisions
An area of support has formed as trades have decided that the swing low was good value and established new longs. Much of the pressure in a sustained uptrend is the shorts exiting out of their losing positions. In addition to those anxious to get onboard chasing the move as its underway.
Sideways trend – consolidation
A Sideways trend officially starts when 4 turning points develop within the range of a previous swing. Less than 4 (3) may simply be a two legged or complex pullback.

A sideways trend ends when when price breaks either the high or low defining the sideways trend.

Trend Example

We are constantly assessing the Supply/Demand Dynamics of the market. Point G would have brought many shorts in on the test of D. The speed of the move would have trapped those shorts on the push to H. We would therefore expect their Buy orders to provide support so a change in this level is a change in the supply/Demand Dynamics of the market.
However we want to see price accepting the change. The first break of G was on bearish volume. We then had three weak no demand bars. If there was significant demand price would have immediately rejected the low causing a swift reversal and trapping the shorts.
Further examples

Although this may look like a change of trend E did not lead to a higher high and therefore is simply a complex pullback. Price would need to break below C to signify a change in trend.

Above we have a consolidation and then a break below the low at C. however this is just a probe and price moves back into range. We have a second probe at E which officially suggests the start of a downtrend although a very weak one. This is negated at F when we take out the swing high at D.
hh
fff