Discussion of article "The ZigZag Indicator: Fresh Approach and New Solutions" - page 3

 
Paragormon:
Could you please tell me how to get the MA value corresponding to the last, most recent node of the zigzag (no matter whether it is a minimum or a maximum)?

You can't tell right away. You have to change the programme. If you explain why you need it - I will modify the source code (you can send it to me in a private message).

 

I am now calculating the divergence-convergence of two instruments by comparing their percentage changes in MA, but in fact it would be more accurate to compare not fixed segments of history, but the change in MA from the nearest extremum. I.e. you need to know the MA value on those bars, when the zigzag extrema were determined.

The method you suggested, in my opinion, would be more useful for comparing zigzags of two (several) instruments to detect this very divergence or correlation.)

 

Especially for Paragormon

The horizontal line shows the current MA value corresponding to the node in the future. When a new bar appears, the old value is saved in the history.

Files:
 
Great, I will test it. Then the next question - can I get the variant that most closely matches the predicted one based on the coincidence or noncoincidence of all this variety of MAs (as I understand, they differ only in averaging periods)?
 

I get the error "Not enough data for node calculation. Either increase the history depth or decrease the amplitude value"

Default Expert Advisor values are Depth 5000, Min amplitude 100.

I changed it to Depth 50000, Min amplitude 10 and it worked.


What values do you consider optimal?

 
manya:

I get the error "Not enough data for node calculation. Either increase the history depth or decrease the amplitude value"

Default Expert Advisor values are Depth 5000, Min amplitude 100.

I changed it to Depth 50000, Min amplitude 10 and it worked.

What values do you consider optimal?

The point is that amplitude is specified in points! You have 4-digit quotes, while the article gives quotes for 5-digit ones. Therefore, you have done everything correctly - you have reduced the amplitude by 10 times.

The optimal ones depend on your strategy and timeframe.

 
DC2008:

The point is that the amplitude is given in points! You have 4-digit quotes, while the article gives quotes for 5-digit ones. Therefore, you have done everything correctly - you have reduced the amplitude by 10 times.

The optimal ones depend on your strategy and timeframe.

scalping on 1m 5m
 
manya:
scalping at 1m 5m

If you are interested in the number of profit points in scalping, take this value of amplitude. If there is not enough data for calculation, increase the depth of history.

 
Tried to visualise in tester - same error about depths and amplitude. I tried to change variables in the Expert Advisor, but the tester still takes the same default values with the same error. I could not open the code in the editor to change the variables for some reason.
 
Bravo Sergey!