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

Sample Code

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

    Sample Code

    Is there any sample code that demonstrates the use of a 3rd party or independently developed indicator?

    TIA

    #2
    Hello dmking,

    The user app share would be a good location for this type of request. There are many custom indicators listed there, and the straetgy section specifically would be a good location to find sample code of calling custom indicators.

    One example can be found in the strategy section, this strategy has a few custom indicators that come with it and are used from its code. Here is a public link: https://ninjatraderecosystem.com/use...kout-strategy/

    Nearly all indicators use the same syntax to call them, there are generally two overloads:

    Code:
    IndicatorName(Any,Parameters,It,Needs)
    IndicatorName(Series, Any,Parameters,It,Needs)
    Then plots or other methods can be called from the instance:

    Code:
    IndicatorName(Any,Parameters,It,Needs)[0] // default plot
    IndicatorName(Any,Parameters,It,Needs).SomePlot[0] //specific plot
    IndicatorName(Any,Parameters,It,Needs).CustomMethod() //custom method, see zigzag for an example

    The Series overload depends if the script was programmed to accept a series.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    255 views
    0 likes
    Last Post KeyonMatthews  
    Started by ScottW, Today, 06:09 PM
    0 responses
    2 views
    0 likes
    Last Post ScottW
    by ScottW
     
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    4 responses
    56 views
    0 likes
    Last Post sonia0101  
    Started by cmtjoancolmenero, Today, 03:58 PM
    0 responses
    9 views
    0 likes
    Last Post cmtjoancolmenero  
    Working...
    X