Writing on the wall
The phrase the writing on the wall means 'a warning of something bad [inevitably] happening'. "I have seen the writing on the wall" ~ 'My understanding is that this enterprise is finished', 'We are going to lose'.
The phrase is a reference to the story of Belshazzar's Feast in the Book of Daniel in the Old Testament, chapt. 5, where in the middle of a great feast given by King Belshazzar of Babylon, a disembodied hand appears and writes on the wall of the palace: "Mene, mene, tekel upharsin", which is interpreted by the prophet Daniel as [MENE:] "God hath numbered thy kingdom, and finished it"; [TEKEL:] "Thou art weighed in the balances, and art found wanting"; [UPHARSIN, an inflection of PERES:] "Thy kingdom is divided, and given to the Medes and Persians." This event occurred in 539 BCE.