Triangle detector - Pbl with ZigZag

 

Hi,

In spite of my research, I did not find a detector of triangle for MT4.

So I try to code this...

But I've a problem, I use ZigZag indicator to detect last peak or trough but I do not know how to use it. It is very easy to know the value (ZigZag) of the last bar (with iCustom) but I want the last different value, so the value of the last peak or trough...

Can you help me to code this ?

Regards

 
Try this thread : ZigZag Channels
 
Maxpips:
Hi,

In spite of my research, I did not find a detector of triangle for MT4.

So I try to code this...

But I've a problem, I use ZigZag indicator to detect last peak or trough but I do not know how to use it. It is very easy to know the value (ZigZag) of the last bar (with iCustom) but I want the last different value, so the value of the last peak or trough...

Can you help me to code this ?

Regards

Please post if you complete the code