I am trying to reproduce ZigZag % indicator in Excel. I can't seem to get my head around how I can program/calculate this in Excel.
Here is where I am stuck: (refer to attached file)
- Heading "Point" is the reference for all outputs and calculations.
- Now I take the starting point, which is row 3, and calculate % difference all the way down ("Point" is the numerator and "New Base" is the denominator).
- "New Base" is only to be formed when the old base value is either greater than or less than +/- 5%.
- Now when the "New Base" point has a new value I want the denominator to take the new base value and disregard the old value for % diff calculation. That is where my problem is. How can I make Excel understand to take the latest base value from the data? Right now I have done it manually in the file attached.
Any help is much appreciated. Thank you
ZigZag.xlsx
Bookmarks