Divergence is a trading pattern wherein the price of an asset and an indicator move in opposite directions. There are two types of divergence: positive divergence and negative divergence. Positive divergence happens when the price of an asset makes a new low while the indicator is surging upward. Negative divergence takes place when the price of an asset makes a new high and the indicator is moving downward.
A positive divergence happens on the chart above. Prices of gold is making lower lows while the MACD is forming a series of higher lows.
A negative divergence occurs on this chart. The indicator fails to move upward as the prices of coffee make new highs. This type of movement signals a downtrend afterwards.