Announcement

Collapse
No announcement yet.

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.

                      Comment


                        #12
                        Bertrand,

                        thanks anyway.

                        Kind regards,

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        602 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        347 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        103 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        560 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        559 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X