To make the pastry, place the flour, salt and baking powder in a bowl and make a well in the centre. Add the oil and beaten egg and gradually incorporate the flour into the liquid. Start adding the water a little at a time until the mixture forms a slightly sticky (but not wet) and elastic dough, you may not need all the water depending on the size of the egg you are using. Bring the dough together with your hands. Put it on a plate, sprinkle with a little flour, cover with cling film and chill in the fridge for 30–60 minutes.
To make the filling, heat the oil in a frying pan and fry the onion until soft but not coloured, stirring regularly. Add the peppers and cook for 3 minutes, stirring, then add the scallops and fry for 30 seconds, stirring constantly. Take the pan off the heat, quickly add the ham, parsley, lemon juice, salt and pepper and mix everything together. Leave to cool for 20–30 minutes.
Preheat the oven to 200C/400F/Gas 6 and lightly oil a baking sheet.
Weigh the pastry and divide the weight by 5. Roll two-fifths of the pastry into a ball and put it to one side. Form the rest into a slightly larger ball. Roll out the larger ball of pastry until it forms a circle about the size of a dinner plate and place it on the lightly oiled baking sheet. Spoon the cooled filling into the centre of the pastry and spread it out towards the edge, leaving a 2cm/1in border all the way around. Brush the border lightly with beaten egg.
Roll out the remaining pastry slightly smaller than the base of the pie and gently place it over the filling. Bring the base up to meet the smaller pastry disc and fold it over, pressing and crimping into a rope shape to make a sealed pastry edge.
Brush the pastry with beaten egg and make a couple of small slits in the top to allow the steam to escape.
Bake in the centre of the oven for 20–25 minutes until the pastry is golden brown and the filling is hot.
Serve warm or cold.