Indicators: Auto Scale ZigZag - page 2

 

Thanks Evgeniy, at least you  answered it. Though this answer does not help us))

I have not worked with indicators before. But I will do my best to see about.

By the way, I have just checked that, with ordinary ZigZag indicator the same result can be achieved (by adding up Depth paramerer let say up to 20-25) as well.

The difference is that ordinary ZigZag puts only extremum points and doesnt copy this value to non-extremums which makes it very easy to determine the current trend programmatically... 

Anyway, thanks again for such good indicator, at least we can use it visually, since programmatic approach is not possible due to that shortoming...

Regards

Bahman

 
Bahman Asgarov #:

Thanks Evgeniy, at least you  answered it. Though this answer does not help us))

I have not worked with indicators before. But I will do my best to see about.

By the way, I have just checked that, with ordinary ZigZag indicator the same result can be achieved (by adding up Depth paramerer let say up to 20-25) as well.

The difference is that ordinary ZigZag puts only extremum points and doesnt copy this value to non-extremums which makes it very easy to determine the current trend programmatically... 

Anyway, thanks again for such good indicator, at least we can use it visually, since programmatic approach is not possible due to that shortoming...

Regards

Bahman


Anything is possible! You just need to go through the required buffer and take the info. What kind of buffers were I talking about earlier. And there is no difference in getting them, even from this indicator, which is standard.


By the way, I have just checked that, with ordinary ZigZag indicator the same result can be achieved (by adding up Depth paramerer let say up to 20-25) as well.
No, it's not the same at all.  In my indicator, scale = the price itself, the price is taken as a percentage of the step.
 
SetIndexBuffer(0,ArrayHighZZ,INDICATOR_DATA);

SetIndexBuffer(1,ArrayLowZZ,INDICATOR_DATA);

To get the zigzag extremes, you need to go through these buffers and compare them with EMPTY_VALUE.  Where the value is unequal to it, there is an extremum.

double MaxZZ = iCustom(Symbol(),PERIOD_CURRENT,"Indicator_Name",[Here is the input setting parameter],0,bar_number)

double MinZZ = iCustom(Symbol(),PERIOD_CURRENT,"Indicator_Name",[Here is the input setting parameter],1,bar_number)


You pass, if the value is not equal to EMPTY_VALUE, then there is an extremum.