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

Creating an indicator

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

    Creating an indicator

    I'm creating an indicator that uses an indicator that's already within the NinjaTrader library. Can you please point me to a tread that covers how to do this? I've already read the section in the user guide covering how to use the DataSeries type but I'm still having a little trouble. Thanks

    #2
    Hello D.Allen,

    Thank you for your post.

    We have this guide on setting indicators on indicators.

    You've probably already read this one on using custom data series.

    Let us know what you're looking to do and we can assist further.
    Last edited by NinjaTrader_RyanM1; 01-05-2010, 02:00 PM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Is there an indicator that draws two lines on a chart that represent offsets of the current day's high and low? This would operate exactly like your indicator "CurrentDayOHL" except that rather than drawing lines at the current day's high and low, it would draw two lines as offsets of the current day's high and low; the first line at 20 ticks below the current day's high and the second line at 20 ticks above the current day's low. This creates a channel off the current day's high and low.

      Also, how do I post a new thread in the forum? The FAQ don't describe the process. I had to piggyback on this thread to post a message.

      Comment


        #4
        Hello djdinut,

        We don't have an indicator like this by default but it can be created. You can use:

        Code:
        Plot0.Set(CurrentDayOHL().CurrentHigh[0] + TickSize * OffsetValue);
        OffsetValue is a user-defined input. You can set this while creating the indicator. For below the Low you just replace CurrentHigh with CurrentLow and use a negative offset.

        To create a new thread hit the "New Thread" button. If you don't see the "New Thread" button you may have to activate your forum account by clicking on the email link sent to you when you registered. If you don't see it in your inbox, check your spam folder.

        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Excellent! Works great. Is there a command that would shade the offset gap between the high of the day and the offset line below it that I just created from your instructions?

          Comment


            #6
            djdinut1,

            Take look at this reference sample below, which provides some coding examples on shading between two values:
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              I'll work with that. In the meantime, how can I rename an Indicator? I can do this with Strategies by editing and changing the name to something else. But when I edit an Indicator I don't see how that works.

              Comment


                #8
                To rename you will want to Right click within the editor and select Save As. Type in your new name and click OK.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  Works! Thanks much for your great help.

                  Comment


                    #10
                    Creating an indicator based on one or more sub-indicators

                    Hello!

                    I am very thankful for the almost unlimited possibilities regarding "indicators-on-indicators".

                    I know that I can create a template, if I want to share the "new" indicator or to put it on another chart etc.

                    But is it also possible to easily convert the new created indicator into a separate indicator, which I can share for instance without having to program it from scratch?

                    E.g. get a KAMA of a CCI of an HMA of a Closing Price as a new separate indicator named e.g. "KAMACCIHMA" or whatever.

                    Thank you very much!

                    Comment


                      #11
                      Serninja, this nested indicator will unfortunately need to be programmed.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Bertrand,

                        thanks anyway.

                        Kind regards,

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by PaulMohn, Today, 12:36 PM
                        1 response
                        12 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by yertle, Yesterday, 08:38 AM
                        8 responses
                        36 views
                        0 likes
                        Last Post ryjoga
                        by ryjoga
                         
                        Started by rdtdale, Today, 01:02 PM
                        1 response
                        5 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by alifarahani, Today, 09:40 AM
                        3 responses
                        16 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by RookieTrader, Today, 09:37 AM
                        4 responses
                        19 views
                        0 likes
                        Last Post RookieTrader  
                        Working...
                        X