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

Need to customize the ZigZag

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

    Need to customize the ZigZag

    Hi all!

    I am in the process of recreating my template in Ensign to NT. I have attached two screen shots of the Ensign template and the work I have done in NT. As you can see, I use swing high's to swing high's and swing low's to swing low's defined by a deviation parameter. In Ensign, the swing lines drawn are actually from the Peavento patterns, but it is similar to Zigzag. Here is what I would like to do in NT:

    1.) Zigzag does not draw the swing line once the deviation parameter has been met. It will after the swing is confirmed, but I need it to draw immediately. I realize that this will have to be coded or maybe there is another swing indicator in NT I'm not yet familiar with (I am still a rookie in NT).
    2.) On my Ensign template, the red and green dots show up once the deviation parameter is met, this is for a visual for me to know once a swing parameter is set. I would like to have that in NT.
    3.) I would like the deviation value to be derived from the value of another indicator.

    Just looking for any help and guidance as I try to transition over to NT. Thanks!
    Attached Files

    #2
    Hello Stok,

    Thank you for your post.

    You would need to use the Swing indicator to show the swing high and low. For the ZigZag line you will need to right click in your chart > select Indicators > ZigZag > set CalculateOnBarClose to false > OK.

    For your second an third items you would need to develop a custom indicator for these. We have Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript:


    If you would like to take on learning NinjaScript on your own, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
    A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

    You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
    Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37

    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
    Click here for a list of certified NinjaScript Consultants: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

    Please let me know if you have any questions.

    Comment


      #3
      Thanks PatrickH,

      Is there a way to use the swing indicator that doesn't not draw the dots as in the canned one and can draw lines like in my picture? I actually coded this in Tradestation using the SwingHighs and SwingLows indicator that did the job, but do not see anything similar to that in NT....the only thing was the zigzag, which still isn't quite what I need. I am studying Ninjascript as we speak, but may need more help or hire a consultant. Thanks!

      Comment


        #4
        Hello Stok,

        Thank you for your update on this item.

        Yes, you would likely need to develop your own indicator using the swing highs and lows and the ZigZag indicator for your desired result.

        Comment


          #5
          Since you are talking about ZigZag:
          why is my Ninja not able to draw the ZigZag line (see attachment) ?
          Attached Files

          Comment


            #6
            Hello fliesen,

            Thank you for your post.

            The Deviation is too large for the ZigZag on the currency pair and will need to be reduced.

            Comment


              #7
              Now it works, thank you.
              For this indicator I tried to create a small alert script with the condition builder. Unfortunately I don't find any parameter that can give me the current value of the ZigZag line: as far as I understand, I can only retrieve the values of the ZigZagHigh and ZigZagLow plots. Or am I wrong ?
              Moreover: what does "false" or "true" mean by the "Use high low" parameter ?
              Attached Files

              Comment


                #8
                Hello jg123,

                Correct, you would only be able to get the High and Low plot for the ZigZag
                If the ZigZag High or Low return a value of 0, then the High or Low has not yet formed.

                Additionally, if the Use high low property is set to true, it will use High and Low values in the calculations, otherwise it will use the InputSeries values.
                Cal H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by frankthearm, Today, 09:08 AM
                8 responses
                32 views
                0 likes
                Last Post frankthearm  
                Started by NRITV, Today, 01:15 PM
                2 responses
                9 views
                0 likes
                Last Post NRITV
                by NRITV
                 
                Started by maybeimnotrader, Yesterday, 05:46 PM
                5 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by quantismo, Yesterday, 05:13 PM
                2 responses
                20 views
                0 likes
                Last Post quantismo  
                Started by adeelshahzad, Today, 03:54 AM
                5 responses
                33 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X