"The hand writing on the wall" (or "the handwriting on the wall" or "the writing is on the wall" or "Mene Mene"), is an idiom for "imminent doom or misfortune" and for "the future is predetermined".
The expression originates from the book of Daniel Chapter 5 from the handwriting on the wall that was witnessed at a banquet hosted by king Belshazzar. As those at the feast profaned the sacred vessels pillaged from the Jerusalem Temple, a disembodied hand appeared and wrote on the palace wall the words, "Mene, Mene, Tekel, u-Pharsin." The prophet Daniel was summoned and interpreted this message as the imminent end for the Babylonian kingdom. That night, Belshazzar was killed and the Persians sacked the capital city