• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ZigZag barsAgo

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

    #16
    Hello M,

    Script attached.
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Hi Chelsea,

      Thanks for sharing the script, I modified it by adding "+CurrentBar" into the draw.dot objects so that we can see the printed dots historically, otherwise dots are moving. Here below is the modification; I'm also attaching the script in case you want to run it in your NT.

      Draw.Dot(this, "high1"+CurrentBar, true, highBarsAgo1, High[highBarsAgo1] + 3 * TickSize, Brushes.Green);
      Draw.Dot(this, "high2"+CurrentBar, true, highBarsAgo2, High[highBarsAgo2] + 7 * TickSize, Brushes.Blue);

      I'm also attaching a screenshot, you'll see how blue and green dots are stored as Highs which were never confirmed in the end. I understand the green dot which is HighBarsAgo1, it might move but even 2 High bars ago are being confirmed as the highs (blue dot) which were actually not Highs. I'm getting false Highs even for 2 high bars ago. If you add this attached strategy on a 10 second NQ chart with 0.05 ZigZag, let it run for 5 mins and you'll see the issue very clearly.

      I feel like I'm repeating myself here I used to use this BarsAgo function up until your v17 release without any issues, I saw the release notes and ZigZag was modified during that update and since then it's not behaving the way it's supposed to be. I would really appreciate if the developer who modified it can also look into this?

      Thanks

      M

      Click image for larger version  Name:	zigzag_dots_3.JPG Views:	1 Size:	147.3 KB ID:	1060432
      Attached Files

      Comment


        #18
        Hello M,

        You would need custom logic to change the tag name only when the new leg is set for the new bar.

        When testing the example I provided, did you find the highBarsAgo2 was incorrect?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Hi Chelsea, yes when testing your script; highBarsAgo2 (blue dot) was appearing on a Zigzag high which later on turns out to be false high.

          Thanks
          M

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cirzonorkecv, Yesterday, 11:52 PM
          0 responses
          6 views
          0 likes
          Last Post cirzonorkecv  
          Started by rickyblah12, Yesterday, 01:01 PM
          1 response
          14 views
          0 likes
          Last Post Erwin Beckers  
          Started by dadarara, Yesterday, 12:18 PM
          0 responses
          8 views
          0 likes
          Last Post dadarara  
          Started by joemiller, Yesterday, 07:33 AM
          2 responses
          13 views
          0 likes
          Last Post joemiller  
          Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
          7 responses
          38 views
          0 likes
          Last Post DaveS
          by DaveS
           
          Working...
          X