Need to write AFL for +/-, Hidden Divergence

#1
I am trying to write an AFL for positive, negative and hidden divergences, But due to lack of knowledge of coding, m unable to write it clearly. Request seniors to help me writing the AFL.
For finding divergence, I watch Price, Indicators (Fast MACD 5,10,9, Slow MACD 12,26,9, Stochastic 14,3,3 and RSI 14,9) and Trendlines on Price. Breaking TL on Price it will confirm the divergence.
Below is the strategy:
NEGATIVEDIVERGENCE
1-Price is making higher highs while the indicator is making lower highs: Bearish
POSITIVEDIVERGENCE
2-Price is making lower lows while the indicator is making higher lows: Bullish
HIDDEN NEGATIVEDIVERGENCE
3- Price is making lower highs while the indicator is making higher highs: Bearish
HIDDEN POSITIVEDIVERGENCE
4- Price is making higher lows while the indicator is making lower lows: Bullish

Ive indentified Hidden negative Divergence on 04th May 2012. Its Nifty Futures weekly chart and since that day its DOWN.
I hope it's clear to understand. Please do let me know if you need any more information.

Thanks,
TT
 

Similar threads