The I Ching is the world’s oldest divinatory text. The “code” behind it is really rather simple. It ultimately works with two values, yang and yin. Yang states in time become yin, and yin states become yang.
The Book of Changes has a cosmology built into it, a sense of order. It’s very concerned with the balance between heaven and earth, and they see everything in the world as an interplay of changes not only on the earth but in the universe as well. In a hexagram, the bottom three lines are the trigram symbolizing the state of earth, and the upper three are symbolic of the state of heaven. A picture of any complete state is composed of a thumbnail of the state of both earth and heaven at that place and time. Just like human relationships, you determine at which stage you are in harmony with the desired state, and in which stage you are out of synch.
“One should act in consonance with the way of heaven and earth, which is enduring and eternal. The superior man perseveres long in his course, adapts to the times, but remains firm in his direction and correct in his goals.” I Ching
“A person in danger should not try to escape at one stroke. He should first calmly hold his own, then be satisfied with small gains, which will come by creative adaptations.” I Ching