Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I Create an Installable Function?

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

    How do I Create an Installable Function?

    What's the best approach to create a function that can be called via an indicator?

    Not "how do I create a function" , but how do I create one that I can install into ninjatrader and make accessible to indicators?

    I see that SMA is being called as an indicator and a function...

    Do I need to add a plot for this in the "function" so that it returns a double?

    Is there a "best approach" here, or something in the docs that I missed?

    Thanks

    #2
    Not sure what you mean. Just create an indicator and then you can reference that anywhere else in NinjaTrader. Creating a plot will allow you to access those values. Take a look at any of the already provided indicators for an idea of how it works. SMA, MACD, Stochastics are all good jumping off points.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      So when I create an indicator, I'm creating both a function and an indicator? (seems wierd to create a function with a plot I'll never use, but I'll flow with it)
      So if I have several plots on the indicator, which one of the values is getting returned?
      Where is the prototype for the return value function?

      Thanks

      Comment


        #4
        >> So when I create an indicator, I'm creating both a function and an indicator? (seems wierd to create a function with a plot I'll never use, but I'll flow with it)
        all the need to have an indicator as function is generate by the NinjaScript editor

        >> So if I have several plots on the indicator, which one of the values is getting returned?
        the first one

        >> Where is the prototype for the return value function?
        There is no "protoytype" Check out the intellisense in the editor and the docs for details.

        Comment

        Latest Posts

        Collapse

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