ZigZag on Parabolic SAR

teeitup

Active Trader
Jul 24, 2010
2
0
32
value of peak and troughs from zigzag parabolic

I am wondering what code i would need to write in order to be able to call up the value of the last peak and 2nd last peak in the zigzag parabolic SAR indicator, and the same for the troughs. i want to be able to compare the two price values to determine trend. any help appreciated.
 

teeitup

Active Trader
Jul 24, 2010
2
0
32
thanks for that i am just starting out in progamming and so need some more advice, i am basically wanting to determine trend from the zigzag parabolic SAR indicator i.e. have another line or separate indicator whichever is easier, that is 1 if last peak is higher than the 2nd last peak or -1 if last trough is lower than 2nd lowest trough.
 

MRVGMX

Active Trader
May 3, 2017
1
1
44
47
Hi everyone, I found www.earnforex.com for this indicator and I see that they do not have it among their indicators, it is not in MT4, but it is an excellent indicator, clean, stable and useful, I think they should leave it on your page. regards
 

Attachments

  • zigzagonparabolic_fibo_channel.mq5
    20.9 KB · Views: 29
  • 👍
Reactions: Enivid

Zuki

Trader
Jul 28, 2021
61
0
22
39
value of peak and troughs from zigzag parabolic

I am wondering what code i would need to write in order to be able to call up the value of the last peak and 2nd last peak in the zigzag parabolic SAR indicator, and the same for the troughs. i want to be able to compare the two price values to determine trend. any help appreciated.
There is no thing as troughs in Market structure. That is why coded divergence indicators are noisy and useless they code with some trough psychology.

U use fractal swing pattern that form Highs and Lows in the Market.

Higher High. Higher low . Lower low , lower high

Equal Highs, equal lows .

Would be to use the fractal indicator forumula within the zigzag indicator. (As zig zag swings normally have a fractal pattern ) so
The last peak would be a zigzag fractal swing high and the last 2nd fractal zigzag swing.

Add fractal indicator on your chart with zigzag indicator

When that zigzag swing form a fractal will be there . With many other possible fractal swings so only the fractal at the zig zag swing point would be reference.


If u use trought. Will be noisy like those useless divergence indicators.
Post automatically merged:

The following buffers store the peak & trough values:
MQL5:
Peak[]
Trough[]
You can call Peak[0] for the current peak, Trough[1] for the previous trough and so on.

Why not use zigzag fractal swing rather than trough to reduce noise?
 

Zuki

Trader
Jul 28, 2021
61
0
22
39
ZigZagOnParabolic updated to version 1.02 for some performance improvements and to add alerts.
I just took a look at it .

Could u make the zigzag period or the period settings u use for the zigzag line to be visible as the parabolic settings so can adjust the indicato a wider range market structure?

Here I add 2 charts 1 with fractal indicator and 1 without

Could u add a fractal feature where the fractal swing appears only at the zig zag. Have alert features to alert when the fractal confirm or alert when the fractal appears . (Fractal alert base on 4th bar/candle of the fractal pattern or option to select when the 5th bar close to confirm the pattern this zig zag fractal would be my resistance/support.




Also could you have a Label of market structure represents by the zigzag swings ?

Zigzag form a fractal swing Lower Low label as LL LH .
If LH is broken with a zigzag fractal swing it's a higher High label as HH . If the LL is not an zigzag fractal swing form it is higher Low label as HL if price retest LH and not broken but equal . It's equal High. Label as EQH .

Also could add price level at the zigzag fractal swings
This could have visual of market structure have option to show or high the label

Have option to show or hide the zigzag line .
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Could u make the zigzag period or the period settings u use for the zigzag line to be visible as the parabolic settings so can adjust the indicato a wider range market structure?
Period? Parabolic SAR doesn't have period, it has only Step and Maximum settings, so does this ZigZag, which is nothing more than a marking upon the Parabolic SAR reversals.
 

Zuki

Trader
Jul 28, 2021
61
0
22
39
I don't understand what you mean. If we build ZigZag on fractals (that's how the standard MT4 ZigZag indicator is constructed, by the way), we would still have peaks and troughs.


What I'm saying use fractal swings at zigzag swing points.

Troughs can be a high /low price of bar or fractal swing high/low pattern.

To reduce the noise use fractal swings .
 

Zuki

Trader
Jul 28, 2021
61
0
22
39
Period? Parabolic SAR doesn't have period, it has only Step and Maximum settings, so does this ZigZag, which is nothing more than a marking upon the Parabolic SAR reversals.
The maximum and step parameters is available in the indicator properties settings . For the zigzag settings could it also be available?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Troughs can be a high /low price of bar or fractal swing high/low pattern.
A trough is a trough. How can it be at the high price? That would be a peak, not a trough.
The maximum and step parameters is available in the indicator properties settings . For the zigzag settings could it also be available?
But it is available:
zigzagonparabolic-inputs.png