Peaks and Valleys

 

I am relatively new to programming in MQL; but not to programming. My math on the other hand is not the greatest... Anyway, on to my question. I am working on a Holy Grail(wouldn't that be nice). Part of my strategy is defined as this:

Unless an inside bar is formed at the prior peak.

Now, at this point, a peak could be considered the top of the mountain, but that is not what I am looking for, I am looking for the peak of the smaller waves that make up the larger waves in elliot wave theory. But if anyone could provide any sort of solution to such a problem, I am sure that I could adapt it my situation.

So by the way, my actual question is: How do I define a peak in a way that is recogniseable to a program(spell check...)?

As a side note. I vaguely remember seeing an indicator that draws what looks like an elliot wave automatically. I am not sure that it was actually an elliot wave though, it just looked like it. Does anyone have an idea of what indicator this was?

Thanks for any and all help/comments.


Happy Trading

Reason: