AFL Required for plotting points on chart

Hello

I am not good in writing AFL, I tried to code earlier but people ask me to read books that I am not able to understand. Its like reading Gibberish. I have finally come to a conclusion I cannot write AFL, not unless without proper training.

I am wondering if anyone here will take the pain to code this for me and I will be highly grateful.

I need AFL which will mark the following on chart based on following criteria mentioned below and also marked in chart

my end result is DYNAMICALLY compare candles till I have the following result and keep repeating it till end of day with marking pivots of all charts. I will be more then happy to post more pics if required.

For plotting MPL - Minor Pivot low on chart on 5 min chart

IF First candle high is broken by 2nd candle OR n number of candles.
And 2nd high is broken by 3rd candle or subsequent number of n candles
OR
Last mph is directly taken out even by 1 or 2 candles then also low should be mpl or Pivot Low

For Plotting MPH - Minor Pivot High
IF First candle LOW is broken by 2nd candle OR n number of candles.
And 2nd Candle Low is broken by 3rd candle or subsequent number of n candles
OR
Last mpl is directly taken out even by 1 or 2 or n number of candles then also low should be mph or Pivot High

In both cases the highest point or the lowest point be mph and mpl ( please don't take this as day high or day low)
Highest point for that particular rally or decline should be a pivot

ami

Example of Logic of Pivot system
ami1
If you have any questions, please feel free to ask. Thanx again in advance