Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to use imported homemade indicators in another indicator/system ?

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

    How to use imported homemade indicators in another indicator/system ?

    Hi everybody,

    I would like to know how to use an indicator I imported in another indicator. I don't find any key-word to do this but I guess there is one ?

    Thanks a lot !

    After

    #2
    Hello After,

    Thank you for your note.

    Could you please elaborate on what you mean by imported into another Indicator?

    Are there two classes in one script trying to act like two separate indicators?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your answer !

      I imported a supertrend indicator from the member tradr (http://www.ninjatrader.com/support/f...ad.php?t=46818)

      I would like to use it in my indicator without copy/past its code but just by "calling it" thanks to the name of the indicator.

      Comment


        #4
        After,

        You would call it like another indicator within NinjaScript.

        So, like calling SMA(14)[0].
        The 14 is an overload property that needs to be passed through for the Indicators' calculations.

        With the SuperTrend -
        SuperTrend(int lenght, double multiplier, bool showArrows)

        Example -
        Code:
        Print(SuperTrend(5, 2.5, true)[0]);
        Let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Thanks Cal !

          But for example if i would like to use this one :


          When I load it from the chart I have to choose :

          Supertrendmode, period, multiplier, ma, smoothingperiod

          Why if I write in my code TSSuperTrend("Adaptive", 8,2,"SMA",14).UpTrend[0] it doesn't work ? How could I know how write the "calling" ?

          thanks very much

          Comment


            #6
            After,

            NinjaScript editor does have a built in Intellisense. When you type your (, this will start the Intellisense. If you don't see it, Ctrl + Shift + Space will bring up Intellisense for the current method/class that you are in with the typing cursor
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              Not a bad idea ! Cool

              But for example here I have to load "maType" and another one strange. It doesn't accept "HMA" or a number like 2. How could I do ?

              Thanks
              Attached Files
              Last edited by After; 02-20-2015, 01:42 PM.

              Comment


                #8
                Originally posted by After View Post
                Not a bad idea ! Cool

                But for example here I have to load "maType" and another one strange. It doesn't accept "HMA" or a number like 2. How could I do ?

                Thanks
                Look in the PropertyGrid for valid values, or open the indicator code, and read what values are valid.

                Comment


                  #9
                  Thanks koganam

                  I checked the Supertrend code to find the right function but look at this, I tried different thing but still doesn't work. I guess there is something wrong
                  Attached Files

                  Comment


                    #10
                    Originally posted by After View Post
                    Thanks koganam

                    I checked the Supertrend code to find the right function but look at this, I tried different thing but still doesn't work. I guess there is something wrong
                    Looks like you need a "using" statement for the namespace that holds your primitives, or you need to use the FQPN.

                    Comment


                      #11
                      Hi After

                      Could part of the problem be that you're referring to TSSuperTrend, which may be slightly different from the usual SuperTrend indicator?

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      598 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      343 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
                      557 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      555 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X