ZigZag EA help

Hello, anybody can give me example how to make simple buy or sell when zigzag shows up or down, what iCustom code to use ?? I tried with original ZigZag and then with Ideal ZigZag - MQL4 Code Base
but I dont know what iCustom code to write to know when zigzag shows up or down :?? can anyone help me?

I think the ZigZag is a lagging indicator, so it doesn’t show up or down at this present moment, it just shows past trends.

Maybe you can send some screenshots with the strategy you have in mind so I can try and help.

ZigZag is a lagging indicator, the problem you are going to have is it will look like a max or min point, but then a few bars later go in the same direction to a higher / lower point and you will lose on your trade.

Something I’ve seen EA’s do is wait until the price crosses a previous point to help confirm direction, or apply a 123 pattern.

Let me know if you need coding help.