I am wanting to use the stock zigzag indicator as it filters out swings below a certain size set by the user.
I want to achieve several things.
- Have it start over each session
- Have it End at the end of the session
- Output the swing sizes with time stamps
1.) I have gotten working by initializing and adding at the beginning of the OnBarUpdate() with:
if (Bars.FirstBarOfSession) //Starting over at the beginning setting it to Open { zigZagHighSeries.Set(Open[0]); zigZagHighZigZags.Set(Open[0]); zigZagLowSeries.Set(Open[0]); zigZagLowZigZags.Set(Open[0]); return; }
Here is a picture explaining it.
Comment