Indicators: Trend Zigzag (on ma cross)

 

Trend Zigzag (on ma cross):

A static zigzag which connects the intersections of a moving average crossover

Trend Zigzag (on ma cross)

Author: Conor Mcnamara

 
the collection grows
 
Lorentzos Roussos #:
the collection grows
Hi how was your weekend
 
You can't based on MA crossing to do the zig zag because its not going to be accurate and there is not viable on this zig zag line. What i suggest is to detect the highest candlestick point before the crossing. and if both the zig zag point is too near (maybe by number of candlestick, thenjust ignore it as a zig zag point). continue with the hard work...
 
bsstradeer #:
You can't based on MA crossing to do the zig zag because its not going to be accurate and there is not viable on this zig zag line. What i suggest is to detect the highest candlestick point before the crossing. and if both the zig zag point is too near (maybe by number of candlestick, thenjust ignore it as a zig zag point). continue with the hard work...
Don't you see from the screenshot posted that it's already detecting the highest high and lowest low from the MA line crossing? That is what the backstep was for...in order to make the legs valid. Please look more carefully at it.
In the first code uploaded, there was a logic error with the backstep, but it has since been fixed, so if you were one of the first to download this, just download it again as it's fixed now.