El Paso Texas/USA
Posts: 2 since Apr 2014
Thanks Given: 0
Thanks Received: 0
|
Hello all,
I’ve been working on trying to create an indicator that would show a dot above a local maximum pivot point. I’m defining these pivot highs as a bar that has a higher high than the bar that came before it and the bar that comes after it.
If we define:
N – as the current (right from middle) bar,
N-1 – as the previously closed (middle) bar, and finally,
N-2 – as the bar to the left of the middle bar
Logically speaking, I’m thinking the code should be something similar to this:
N-1 > N and N-2
As the indicator is going through and looking over each set of 3 bars, it’s determining if the N-1 bar is greater than the N and N-2 bars. I’ve tried a number of ways to program this concept but no luck so far
There is probably many easy ways to accomplish this but I'm having trouble doing so.
|