That's a really new zigzag. It brings "quantitativeness" to the zigzag. Nice :-)
There's one small adjustment I made to the code to fix a bug where the indicator doesn't update on new bars (can be seen in the strategy tester).
I modified this:
if(prev_calculated==0) { from=1; resetSystem(); //--- set the first bar high and low as high and low rollingAtr=(high[0]-low[0])/_Point; rollingAtrs=1; }
to this:
if(prev_calculated==0) { from=1; resetSystem(); //--- set the first bar high and low as high and low rollingAtr=(high[0]-low[0])/_Point; rollingAtrs=1; } else{ from = prev_calculated - 1; }
and all seems good
Conor Mcnamara #:
That's a really new zigzag. It brings "quantitativeness" to the zigzag. Nice :-)
There's one small adjustment I made to the code to fix a bug where the indicator doesn't update on new bars (can be seen in the strategy tester).
I modified this:
to this:
and all seems good
nice catch thanks , i will update

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Fibonacci ZigZag:
Zig Zag indicator that relies only on a minimum % of retracement to each previous wave , and optionally , being bigger than a specific size measured in atr units.
Author: Lorentzos Roussos