Divergence indicator coding for meta trader 5

Zuki

Trader
Jul 28, 2021
59
0
22
37
Can someone code a divergence indicator for meta trader 5 mql5 file ?

The coding must be base on close price of Oscillator or option to select the method if they want typical price


Bearish regular Divergence base on fractal swing.

If the fractal swing high is broken form a new higher High and the Oscillator fail to make a new swing higher High (higher value ) then its a Bearish Divergence.

If price make a higher High fractal swing high and fail to make a new higher High but fractal form a swing while the Oscillator makes a higher High (higher value ) its a Bearish Hidden Divergence.



When price makes a fractal swing low (lower low) gets broken by another lower low fractal while Oscillator fail to break lower value It's a bullish Divergence.



If price make a fractal higher low and makes another fractal higher low failing to break previous fractal higher low but Oscillator makes lower value breaking structure on the Oscillator then its a hidden Bullish Divergence.


The Oscillator is the averages of the close price of the chart base on the main Chart price.



The best way is to use fractal swing highs and Lows to code Divergence for more accuracy.




I use fractal indicator with Oscillator to trade Divergence with supply and demand zone;(resistance and support).


Divergence occurs when buying and selling pressure reduce .

Base on buy to sell to book profit or move volume .