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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    569 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X