CGT Order in which loss or gain is realised


Registered User
Can anyone help clarify if it matters in which order a capital gain or a capital loss is made within the same tax period.

For example. If one realises a gain in March 2021 and subsequently realises a loss in September 2021 does it matter that the gain came first ?

I presume if it's in the same tax period it's OK.

Many thanks in advance