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

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 sidlercom80, 10-28-2023, 08:49 AM
        171 responses
        2,273 views
        0 likes
        Last Post QuantKey_Bruce  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        17 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post adeelshahzad  
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        3 views
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Working...
        X