Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How To Reference a Prior Swing Low - Zig Zag Indicator.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To Reference a Prior Swing Low - Zig Zag Indicator.

    Guys,

    Would appreaciate some help here with regards to the Zig Zag Indicator. I am looking to reference a prior Swing Low (Low 2 in the attached image - Not Low 1).

    Therefore, if I wanted to enter a trade when the price is > than Low 2 and of course Low 1. I believe I should use "instance" -

    instance - The occurrence to check for (1 is the most recent,
    2 is the 2nd most recent etc...)

    Is this correct? If so could you help me with an example of how it would be coded?

    Many thanks, Gaz

    #2
    Hello rabidsheep.

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    You are correct on the use of the instance. And example of this would be the following:
    Code:
    if(Close[0] > Low[Math.Max(0, ZigZag(DeviationType.Points, 0.5, false).LowBar(0, 1, 100))] && Close[0] > Low[Math.Max(0, ZigZag(DeviationType.Points, 0.5, false).LowBar(0, 2, 100))])
    {
    //Do  something.
    }
    For information on ZigZag() please visit the following link: http://www.ninjatrader.com/support/h...nt7/zigzag.htm

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    37 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    132 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    185 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    97 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    139 views
    0 likes
    Last Post cmoran13  
    Working...
    X