Here is an approach using tidyverse:
library(tidyverse)
df %>%
mutate(lagE = lag(Event),
splt = ifelse(Event == "B" & lagE == "A", T, F),
cum = cumsum(splt)) %>%
{split(., .$cum)} %>%
map(function(x){
if(x[1,1] == "B"){
z <- rbind(x[1,], x)
z[,1] <- as.character(z[,1])
z[1,1] <- "Z"
} else {z <- x}
z
}) %>%
bind_rows() %>%
select(1:5)
Event Price Type Date Time
1 A 100 Sell 27-01-2018 12:00
2 C 200 Buy 27-01-2018 12:15
3 C 300 Buy 27-01-2018 12:30
4 D 350 Sell 27-01-2018 12:31
5 A 320 Buy 27-01-2018 12:32
6 Z 321 Sell 27-01-2018 12:32
7 B 321 Sell 27-01-2018 12:32
8 B 220 Buy 27-01-2018 12:34
9 L 550 Buy 27-01-2018 12:35
10 A 320 Buy 27-01-2018 12:32
11 Z 320 Sell 27-01-2018 12:32
12 B 320 Sell 27-01-2018 12:32
The problem seems simple, and I'm sure someone will provide a more concise solution.