Green’s Dictionary of Slang

fly the flag v.1

1. of a prostitute, to walk the streets looking for trade.

[UK]Partridge DSUE (8th edn) 413/2: from ca. 1840.

2. to be menstruating [var. on fly the red flag under fly v.].

[US]J. Randall ‘A Visit from Aunt Rose’ in Verbatim XXV:1 Winter 25: Codes that refer to blood include the red flag is up (sometimes shortened to just the flag is up or the flag is flying; also sometimes flying Baker, since Baker is the Navy code for B, and the B flag is red).