Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Maximum Bars Lookback

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

    Maximum Bars Lookback

    Hello,

    currently I have a strange behaviour in the ZigZag indicator inside a strategy and I think it would be wise to enlight the Maximum Bars Lookback parameter further.

    What does it mean for my strategies: Let's say I have strategy on ES 12-09 1 Minute bars running. and MaximumBarsLookBack is set to 256.


    Inside OnBarUpdate()


    1. Will input[257] give the correct value allthough it is outside the lookback parameter?

    2. You state the 256 bars limit is applied to IDataSeries Objects excluding DataSeries objects. Does this mean DataSeries objects do NOT have the 256 bars lookback limitation? I don't understand? Are Objects based on the IDataSeries interface not DataSeries?


    3. Will
    int i= ZigZag(DeviationType.Percent,zzPercent,usehighlow) .HighBar(
    0,1,257);
    double zig= ZigZag(DeviationType.Percent, zzPercent, usehighlow)[i]

    give the correct value?


    Thank you


    Andreas

    #2
    Please try again with Beta 3 which I anticpate releasing later today. We resolved some issues with ZigZag indicator.
    RayNinjaTrader Customer Service

    Comment


      #3
      Excellent,

      today I expected signals from ZigZag, but my strategies never triggered so I was -unexpectedly flat - all day.



      Another question:

      Parameter MinBarsRequired ad MaxBarsLookBack,

      what if MinBarsRequired is 750 and MaxBarsLookBack is 256?

      Does this make sense?


      regards
      Andreas

      Comment


        #4
        Originally posted by zweistein View Post


        Another question:

        Parameter MinBarsRequired ad MaxBarsLookBack,

        what if MinBarsRequired is 750 and MaxBarsLookBack is 256?

        Does this make sense?


        regards
        Andreas
        The two do not conflict. This just means wait until I have 750 bars before calling OnBarUpdate() and and internal DataSeries type objects should only maintain the last 256 values.
        RayNinjaTrader Customer Service

        Comment


          #5
          1. MinBarsRequired. You are right.


          2. ZigZag:

          Are you sure to have resolved the issues? Currently I have exactly the same code in an indicator and there ZigZag High and Low Vertices are shown.

          The very same code inide a strategy will not trigger the Highs vertices.

          Currently I have the situation that inside a strategy only the ZigZag Low vetices are detected , but the ZigZag Highs not.

          Identical code (...ok, a lot of wrappers in a bigger piece of code in the strategy...) for the ZigZag calls in both indicator and strategy, but only the indicator will work properly!

          Any ideas? I will try to strip down the code to show better tomorrow, can I send you a private message for this?

          regards

          Andreas

          Comment


            #6
            Originally posted by zweistein View Post
            1.
            2. ZigZag:

            Are you sure to have resolved the issues?
            No I am not sure. If you have tried on Beta 3, then go ahead and provide us a sample script.
            RayNinjaTrader Customer Service

            Comment


              #7
              ZigZag strange behaviour

              OK, so I found out the following, for indicators and strategies:


              In OnBarUpdate()

              //double dummy=ZigZag(DeviationType.Percent,zzPercent,false)[0];

              int FirstHigh=ZigZag(DeviationType.Percent,zzPercent,f alse).HighBar(0,1,20);


              The above code will not give correct results forFirstHigh in such that -1 is returned all the time.

              Uncomment the lines above and FirstHigh will be correct.

              It seems that dummy=ZigZag(...) causes the ZigZag indicator to calculate some internal values which are needed for .HighBar and .LowBar.

              If I remember well this internal calculation was done in 6.5 (not 100% sure) , but in NT7 you need to uncomment the lines above.

              @Ray, will you change or are you happy as it is?

              regards
              Andreas

              Comment


                #8
                This is a bug which will be fixed with next update. Thanks for reporting.

                Comment


                  #9
                  zigzag

                  Dierk

                  The trick with attaching private zigzag indicator to multiple time frames seems does not work on 7.0. i've tried different combinations but only crashed NT. this beta version is unstable - 7.0.5.

                  Is there to be an updated zigzag indicator or should I make my own?

                  Cheers

                  Cliff

                  Comment


                    #10
                    To clarify: are you saying the NT standard ZigZap indicator would not work with NT7B5? If so, what in particular do you experience? Thanks

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    626 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    359 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    562 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    567 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X