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

Add Indicator to NinjasTrader Platform Using Reflection

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

    Add Indicator to NinjasTrader Platform Using Reflection

    Hi
    we current Work on Project on Ninja
    i want to know is it possible too we Load Indicator into Indicator list Pragmatically using "Reflection"
    Let me explain to better understand what we are doing.
    The user logs in on a page NTPage (Add Ons).
    After logging in, if he has passed our desired course, he can access a set of indicators/strategies/...
    Now we want After the user login, load an indicator for him in the list of available Indicators but its important for us its done pragmatically
    because we use are own protection protocol software and
    after login and validate user its must Decode And load Indicator in Indicator list for user

    Thanks For your time
    Kavand Farahmand​​
    Last edited by Kavand; 10-13-2023, 02:34 AM.

    #2
    Hello Kavand,

    Welcome to the NinjaTrader forums!

    Using reflection and dynamically adding an indicator without calling the indicator method would not be supported by NinjaTrader.

    This thread will remain open for any community members that would like to provide unsupported tips or code.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      thank for your Response

      ​can you ​please explain me how the system works.
      i mean what`s sequence of Loading Indicator in Ninja which "Function" or "lib" responsible for load it.
      we are do it before for Addons
      are system load Addons Dynamically in ninja Enviromint
      but for Indicator
      If I have some clue is very help full​

      Best Regard
      Kavand Farahmand

      Comment


        #4
        Hello Kavand,

        NinjaScript is written in C#.

        Indicators can be called from other indicators and from NinjaScript Strategies, but cannot be called from the Addon class (if you meant this specifically).

        To call an indicator use the method signature. This will return a Series<double> object which is indexed by barsAgo values.

        For example to print the SMA value of 0 bars ago (the current bar):

        Print( SMA(14)[0] );

        SMA(int period)[int barsAgo]



        Indicators are applied to charts.

        Charts can be saved in workspaces which will load when NinjaTrader starts or the workspace is opened, which will also load any indicators that were applied to the chart.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        160 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        9 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X