Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add a timer event handler to an addon

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

    How to add a timer event handler to an addon

    I am creating an AddOn under New menu item, which opens a NTWindow( no ChartWindow). I would like access to various Indicator values, and Various Instruments information from there. Is there Documentation on how this can be Done?
    Last edited by Yandychang; 01-17-2016, 09:44 PM.

    #2
    Hello Yandychang,

    Thanks for your post.

    Please review this thread for further information and examples of addon code: http://ninjatrader.com/support/forum...954#post410954

    I will submit a feature request for additional documentation in the AddOn section of the helpguide.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Yandychang View Post
      I am creating an AddOn under New menu item, which opens a NTWindow( no ChartWindow). I would like access to various Indicator values, and Various Instruments information from there. Is there Documentation on how this can be Done?
      At this time, you can only access bars information in the form of a BarsRequest(), which you can find an example of here:



      This will allow you to access Open, High, Low, Close, Time and Volume information for an instrument based both historically and real-time, based on the bars period you paramaterized.

      There is not a documented or supported method at this time to access an indicator values, but we're carefully monitoring feedback in this area to see where we need to improve.

      So I can fully understand your request, can you please identify which use case you're looking for:

      Calculate Indicator methods from addon:

      - You have a simple add on window and want to calculate your own indicator values
      - For example: Get the ADX() of the current bar, or look up it's value 20 barsAgo.

      or

      Global Indicator Object:
      - You have configured a number of indicators on your chart.
      - You want your add-on to be aware of that value.

      Thanks for any clarification you can offer here and we'll be happy to run this use case by development to see what can be done in the near future.
      MatthewNinjaTrader Product Management

      Comment


        #4
        Hello

        Thank you for your response Paul. It appears I did not phrase my question right....sorry. I know how to make an AddOn, but I would like to call The indicator class from a class I will have in the AddOn, so that I can have information about a given instrument, such as MACD, RSI or other indicators I choose, without the need to have a chartwindow open.

        Comment


          #5
          Hello mathew

          to me, its does not need to know what the indicator values are in the chartWindow(because is independent from chart window)i just need a method to calculate, or retrieve ADX(input, period)[index], or any other indicator of my choosing.
          Thank you

          Comment


            #6
            Hello Yandychang,

            Thanks for your replies.

            As Matthew advised, getting indicator values in an Addon is not something currently supported. It sounds like your use case is to be able to monitor indicator values.

            If that is the case then perhaps you might consider using the Market Analyzer which provides that capability. You can add most any indicator (that has a plot) and observe their current values in a list form by instrument. Please see: http://ninjatrader.com/support/helpG...t_analyzer.htm
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              I would like the same ability that market analyzer has... But is not exactly what I need, I need the ability to make statistical calculations with those numbers in ninjascript. Would you consider having the ability to call the indicator class from an AddOn?

              Comment


                #8
                Thanks for the clarification. I've added your request to SFT-1065.

                If you have indicator calculations to make, you should be to refactor logic used in the indicators OnBarUpdate event and add that exact logic to the indicator.

                That is to say, it is not as simple as calling ADX() in your add-on - you would have to pull all the calculation logic out of the indicator and reimplement that in your bars update events used in the add-on.
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  Thank you
                  Is there an example available?

                  Comment


                    #10
                    Hello Yandychang,

                    Thanks for your reply.

                    Here is a link to obtaining bars data in an AddOn: http://ninjatrader.com/support/helpG...us/?charts.htm

                    As Matthew advised, "you would have to pull all the calculation logic out of the indicator and reimplement that in your bars update events used in the add-on."

                    We do not have an example.
                    Paul H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by PaulMohn, Today, 03:49 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post PaulMohn  
                    Started by inanazsocial, Today, 01:15 AM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Started by rocketman7, Today, 02:12 AM
                    0 responses
                    10 views
                    0 likes
                    Last Post rocketman7  
                    Started by dustydbayer, Today, 01:59 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post dustydbayer  
                    Started by trilliantrader, 04-18-2024, 08:16 AM
                    5 responses
                    23 views
                    0 likes
                    Last Post trilliantrader  
                    Working...
                    X