Indicators: Fast ZigZag

 

Fast ZigZag:

The easiest and fastest zigzag.

Author: Yury Kulikov

 
FastZZZ is the simplest and fastest zigzag. Fully realises the "picture" IdealZZ while being several times faster and more economical than the last one.
Faster -- I believe it. The "fully realises" part is just bullshit. This zigzag with a small minimum knee will periodically deliver hangs. No way.
 
TheXpert:
I believe it's faster. The "fully realises" thing is bullshit. This zigzag with a small minimum knee will periodically deliver hangs. No way.


At how small a minimum knee? When the point of the zigzag is lost. Can you give me an example of hangs. The code can be tweaked :)

The picture may differ from IdealZZ due to different interpretation of bars where two kinks occur and where close==open. But this is such a rare case...

Here is an example of divergence at 10 pips, there is hardly any sense in such a knee.

And here is an example with a minimum knee of 50 pips.


 

When building a ZigZag, the absence of Ask-history is particularly sharply felt, because the informativeness of a ZigZag based only on Bid-price information is very low.

This can be well felt on ECN/STP during, for example, a rollover, when the time-weighted average spread for a long time grows many times.

 
Yurich:

The picture may differ from IdealZZ due to different interpretation of bars where two inflections occur and where close==open. But this is such a rare case...

Yeah, that's a different tune. It's not so rare -- I've solved this problem. And what if you think about inserting history (loading the terminal, for example) and taking vertices?

I don't mind your code at all. I'm against just one phrase.

 
hrenfx:

When building a ZigZag, the absence of Ask-history is particularly sharply felt, because the informativeness of a ZigZag based only on Bid-price information is very low.

You can feel it well on ECN/STP during, for example, a rollover, when the time-weighted average spread for a long time grows many times.

This is a good idea, but you can rarely get aska history except on the above-mentioned ECN/STPs.
 

Rarely - practically nowhere:

  • MT4 - just one broker.
  • MT5 - none.
 
TheXpert:

Yeah, it's a different tune now.

But still you can give examples of actual discrepancy and examples of hangs. It will help to improve the code.

As for the rare case, we just interpret this case differently, and to solve this problem correctly, it is necessary to bring up the history from smaller timeframes in disputable moments, but neither I nor you do it.

What is the problem with taking tops?

 

The more correct are the values of the ZZ, the greater is the sum of its bends at the same input parameters. Accordingly, the ZZ that shows the possible maximum is the correct one.

By the way, the H-characteristic of a symbol is elementary calculated through the ZZ: H = average knee / minimum possible knee. But it makes sense only when taking into account Ask-price, especially for small knees.

 
Yurich:

But still you can have examples of actual divergence and examples of hangs. It will help to improve the code.

Nah, your code is the maximum that can be done on two buffers. Further improvement requires additional buffers.

As for the rare case, we just interpret this case differently, and to solve this problem correctly, it is necessary to bring up the history from smaller timeframes in disputable moments, but neither I nor you do it.

Well. I'm pretty critical of these situations in general. After all, in the long run it can lead to losing money. So yeah, I guess it varies.

And what is the problem with taking the tops?

Well. zigzags with two buffers are very awkward in that respect. So if you equip your zigzag with code that will fetch the last N vertices (in the correct order), you will at least get a thank you from the users of your code.
 
TheXpert:

Well. I'm pretty critical of these situations in general. I mean, it could end up costing you money. So yeah, I guess in different ways.

Do you really believe that skipping one knee in ZigZage when the price changes by 1 pip is a dramatic error for the trading system?