Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ZigZag Indicator Method Calculation Error

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

    ZigZag Indicator Method Calculation Error

    Hi,

    I'm trying to use the ZigZag in a custom script. When I overlay the indicator on the chart it seems to work fine and is catching the swing highs and lows that I'd like it to catch but when I use the indicator method in a custom script I'm getting very weird results (pls see attached)

    Also, I've never paid attention to these things but when I analyzed the price data in more detail in trying to debug the ZigZag calculation I was very surprised to see a lot of bar timestamps that show up in the output window but I cant see those bars on the chart.

    could you please help me regarding this. thanks in advance...
    Attached Files

    #2
    buylosellhi, the ZigZag indicator redraws itself when the bars tell it to, so it will often "hide" itself after drawing a high or low and then show up later. To use this indicator in a custom script can be quite difficult; basically, you'll have to create an array or list of the highs and lows and keep track of the highs and lows in your own calculations so you know where the redraws are.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Long time ago with the first NT7 betas I complained of the ZigZag behaviour which in my view was wrong and it was never fixed.
      @ all : Best is to write your own fix.

      regards
      Andreas

      www.zweisteintrading.eu

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X