How does AmiBroker calculate the peak in peak function?

i want to know how amibroker calculates the peaks in a chart, i need to know the process . can any one help me

Hi @tarscase1

It is well explained here in the Peak function description. It uses the the Zig Zag function. For better understanding you can visit Amibroker Tips S&C Traders' Tips Issue 11/2003.