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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X