Zig is probably more widely used for charting than for strategy logic. Because it is forward looking (i.e. looks into the future), it cannot be used in any trading strategy in its natural form. You must add delays to the pivot recognition such that your code is restricted to act on the pivot only once it has become recognizable in the present.
By the time recognition lag has happened, the reversal is already well on it's way and there is often little opportunity left to take a position. See the following for an example of waiting for actionable Zig pivots: http://www.amibroker.com/library/detail.php?id=353&hilite=ZIG Mike --- In [email protected], "murthysuresh" <mo...@...> wrote: > > why should it be a constant instead of array. the pivot can change based on > the volatility of the instrument. there is little value in putting a number > that would work only for a certain time period. > > --- In [email protected], "Mike" <sfclimbers@> wrote: > > > > The % change parameter is used to indicate what the *minimum* movement must > > be before qualifying as a pivot. Each pivot point will be guaranteed to be > > at least that percentage above/below the last pivot point. All other lesser > > swings between the recognized pivots are just noise. > > > > Using a smaller % will result in many more recognized pivots with very > > little noise in between. Using a larger % will result in fewer recognized > > pivots with more noise in between. > > > > Mike > > > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > > > i am trying to plot the peaks and troughs. > > > i could use some help with the zigzag as i am confused with the paramter > > > % change which is defined as a number. any ideas is appreciated. > > > > > >
