I've been working on making a couple of updates to the ZigZag indicator and I've gotten everything I need to work except for one thing - I have no idea how to modify the plotting/drawing mechanism of the indicator and was hoping someone with better programming skills than myself could help me out.
The changes I made basically include sometimes waiting to print a zigzag until other conditions are met and in some cases, the process takes a few more bars and requires that the zigzag be drawn 'x' number of bars ago. The problem is that the zigzag is always printed 2 bars ago and I can't figure out where I can modify this in the cases that I need to wait a few bars.
I've attached a chart image here with an example. The first zigzag required no modification and thus printed in the appropriate spot. The second, however, required a few bars of wait time but is now printing 5 bars later than I want it to (white arrow shows where I'd like it to print). I have a variable that tracks how many bars ago it should be, I just don't know where to put it!
To say it another way, I basically need to find a way to sometimes say "print this zigzag 'x' bars ago" instead of the default 2 bars ago.
Any help on this would be much appreciated!
Thanks,
Fiddich
Comment