Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ZigZag alignment

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

    ZigZag alignment

    Hi,

    I'm currently about to do my first steps in Ninja Script programming. I started with a modified ZigZag with some different extrema-qualification criterias and used the original ZigZag as a basis.
    In general the indicator works fine, but if I attache it to the chart and modify the price scale or if I scroll through the time scale the extremas start to move away from the price. I thought it is a failure of my code, but after checking the original ZigZag I recognized, that this one has the same effect.
    Left attachement is the shifted ZigZag line, right one the same indicator, when I scroll a little bit to the future.

    Is this a general problem, or is something wrong on my side?
    Attached Files

    #2
    squib,

    I am happy to assist you.

    Is this indicator applied to a secondary data series? I am unable to replicate this with just a single data series.

    What is your scale justification set to? This is located in Indicator > ZigZag > Scale Justification.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi Adam,

      thanks for this very fast response. I did not apply the indicator to any secondary data series, just simply to the EURUSD, but I checked my Scale Justification setting. It was "Right". After changing this to "Left" I could not reproduce the effect any more, so this solves my problem.
      Could you please explain shortly, what Scale Justification means?

      Thanks!
      Squib

      Comment


        #4
        Squib,

        I am happy to assist you.

        There is a left scale and a right scale. This is typically used for overlaying two data series on one chart and comparing price action, even if the prices are very different. I.e. if you add a second data series to the same chart and set one to left justification and one to right justification, you can then modify each data series scales independently.

        Here is a forum link that discusses this : http://www.ninjatrader.com/support/f...ad.php?t=33501

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Perfect!
          This explains the effect and I know how to avoid in the future.

          Thanks a lot!

          Comment


            #6
            Squib,

            You're welcome.

            Please don't hesitate to contact us should you require additional assistance.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              changing default setting

              Now I have 2 more questions to this topic.

              Always if I apply the indicator to the chart, the scale justification is set to "right" by default, so every time I have to manually change this.
              Is there a way to set it to "left" by default (maybe within the indicator code)?

              And the same question to the "maximum bars look back" setting in the data section of the indicator setting. It's 256 by default. Is there a way to change this to "infinite"? I already tried "ForceMaximumBarsLookBack256=false;" in the indicator-initialization, but this seems to have no influence.

              Thanks!
              Squib

              Comment


                #8
                Squib,

                Thanks for your note.

                Yes, this is possible. Im going to go ahead and give you links to the help guide since each entry has an example of how to use it.

                Maximum Bars Look back : http://www.ninjatrader.com/support/h...rslookback.htm

                Scale Justification : http://www.ninjatrader.com/support/h...tification.htm

                Please let me know if you have any other questions.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by jordanq2, Today, 03:10 PM
                1 response
                6 views
                0 likes
                Last Post jordanq2  
                Started by arvidvanstaey, Today, 02:19 PM
                2 responses
                8 views
                0 likes
                Last Post arvidvanstaey  
                Started by traderqz, Today, 12:06 AM
                10 responses
                18 views
                0 likes
                Last Post traderqz  
                Started by algospoke, 04-17-2024, 06:40 PM
                5 responses
                46 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by mmckinnm, Today, 01:34 PM
                3 responses
                6 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X