• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddOn run for itself with OnMarketDepth

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

    AddOn run for itself with OnMarketDepth

    Hey, good day, I hope you are ok.


    I'm pretty sure that you are thinking about this: https://ninjatrader.com/support/help...arketdepth.htm

    Well, that's a good.. event, but it depends of snapshots. So if you compare the OnMarketDepth of an Indicator, you will see the difference of updating frequency.


    So....... there is any way to get the normal frequency that Depth needs to work fine and don't depend on indicators and strategies for the call of the overridden method?

    In other words.. I don't want that the AddOn depends on anything... not indicators that call the AddOn.. not strategies.. etc..


    Regards!
    Last edited by Fernand0; 09-28-2018, 09:53 PM.

    #2
    Hello Fernand0,

    Thank you for your note.

    So I may best answer your question, would you please provide more information on what you are attempting to do vs what you are experiencing? How is the sample you provided a link to related to an indicator?

    You could see the sample AddonFramework which can be downloaded at the following link for an example of an addon which pulls the order book independent of any indicator or strategy,
    https://ninjatrader.com/support/help...t_overview.htm

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      So I may best answer your question, would you please provide more information on what you are attempting to do vs what you are experiencing? How is the sample you provided a link to related to an indicator?
      Do you remember this Indicator?
      https://ninjatrader.com/support/foru...ead.php?t=3478

      Well, I want to have that information as soon as the NT opens, as soon as the AddOn starts, no indicator or strategy in the middle.
      I'm having problems with the MarketDepthEventArgs.Instrument.MarketDepth.Asks/Bids...
      https://ninjatrader.com/support/foru...755#post554755

      Patrick is currently helping me with this, but if the default list of MarketDepth differs from the MarketDepthEventArgs data... I want to create my own "DOM list"... besides it ends up working what Patrick shows me or not... I want to know how to do it...

      I'm already downloading the sample you mentioned to check it

      I'll be back with the feedback

      Thanks Alan

      Comment


        #4
        No, sorry Alan.. but..

        https://ninjatrader.com/support/help...arketdepth.htm

        this works as snapshots... it has a very low frequency...
        it doesn't work like it should.. or.. "like i want"

        Comment


          #5
          I don't find anywhere how to list the Instruments that you are using in the platform (not in a custom window..).. either...
          I don't know.. if i can't use the frequency of the overridden methods of OnMarket..()
          where is the point?

          Maybe you can... but it's extremely complex and that's why i don't see it...
          I didn't see a different approach in the sample exposed there... they use the same code as the sample of my first post in this thread....

          MarketData works fine... but MarketDepth works with data snapshots...

          Comment


            #6
            Hello Fernand0,

            If you open the Sample AddOnFramework and click the ask Ladder button for a product currently open, can you please explain why this approach does not work for what you're looking to do?

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_AlanP View Post
              Hello Fernand0,

              If you open the Sample AddOnFramework and click the ask Ladder button for a product currently open, can you please explain why this approach does not work for what you're looking to do?

              I look forward to your reply.
              I made a mistake, I was checking an addon with similar name. I will check this code and give the right feedback.

              But yes, the ladder is updating with the right frequency in that AddOn. I don't know how because that code is not provided as a sample in the NinjaTrader Guide. I will look deeper.

              My apologies.

              Comment


                #8
                Alan, do you know how to change this sample to respond to the right frequency?

                https://ninjatrader.com/support/help...arketdepth.htm

                Comment


                  #9
                  Hello Fernand0,

                  Can you please provide more information by what you mean when you say frequency?

                  I look forward to your reply.
                  Alan P.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_AlanP View Post
                    Hello Fernand0,

                    Can you please provide more information by what you mean when you say frequency?

                    I look forward to your reply.
                    With this code
                    https://ninjatrader.com/support/help...arketdepth.htm

                    it doesn't update the values as soon as they change... it takes a while.. sometimes seconds... thats why in the sample says "snapshot".

                    In the other hand, the AddOn that you linked me, updates the data as soon as it changes. But there is a lot of "noise"(code related with the UI). I'm not doing an UI, so it's really hard to compare the code and see what is missing to make it update the values asap.

                    Comment


                      #11
                      Hello Fernand0,

                      The code from the link you provided looks to be the same as the SampleAddonFramework, minus the Dispatcher, for getting the order book so if they are not updating its likely something in your script.

                      Debugging customer scripts would be out of the scope of our support desk however if you provided what you had written already I could take a look and see if anything pops out.

                      I look forward to your reply.
                      Alan P.NinjaTrader Customer Service

                      Comment


                        #12
                        if i use a constructor, seems to work fine..

                        but the idea is not to use one.. otherwise it would lose its dependency...


                        called a constructor from another file, works fine... MarketData works fine in both ways
                        Attached Files

                        Comment


                          #13
                          Hello Fernand0,

                          Can you please provide a use case for what you're looking to do?

                          What are you looking to use this Addon for and how would you like to implement it?

                          I look forward to your reply.
                          Alan P.NinjaTrader Customer Service

                          Comment


                            #14
                            I want to do like a DataSeries but with the Ladder...

                            Let's say Ladder(0), gives me the current ladder, Ladder(1), gives me the Ladder with the previous change...

                            The idea is, instead of just using "price" and "volume" as inputs in indicators... use the entire Ladder... so i need a "history" of the Ladder.

                            I tried with MySQL but for some reason the buffer increase, it's really slow in my computer... So the other option that i wanted to try was just to save the info in NT... after a while a free the registry... because is meant to Scalping...

                            I don't know if you need more information, I'm working on it, is the first time that i do this.

                            Comment


                              #15
                              Hello Fernand0,

                              This would be unsupported.

                              If I were to do what you’re looking to do, I would create an object type with attitudes such as Bid0Price, Bid0Volume, Bid1Price, Bid1Volume, Offer0Price, Offer0Volume, etc.

                              For an example of a custom object, you could see the following sample, searching for Url_Sym_Obj. Within that same sample you could see the custom list type, List<Url_Sym_Obj> UrlSymString_List= new List<Url_Sym_Obj>();
                              https://ninjatrader.com/support/foru...=7&linkid=1167

                              Then upon each update to the order book you could create a new object of this type, setting each attribute, then I would add this to a list of those types of objects. This would give you the information you want in the form of a list.

                              Getting this data to start collecting would be best done through an Addon, which gets enabled with a button press. Upon the start of the program, you could open an addon with a button, which when pressed would start recording this data. For a template of an addon with a button you could see this example,
                              https://ninjatrader.com/support/foru...=9&linkid=1133

                              Getting this data to start recording upon application launch would not be supported however may be possible. I’m not aware of any samples which would demonstrate how this could be done.

                              Please let us know if you need further assistance.
                              Alan P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by swcooke, Today, 09:20 AM
                              5 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by chartish, Today, 08:21 AM
                              2 responses
                              7 views
                              0 likes
                              Last Post chartish  
                              Started by xbionicx, Today, 01:12 AM
                              2 responses
                              14 views
                              0 likes
                              Last Post xbionicx  
                              Started by NinjaCustomer, Today, 07:52 AM
                              2 responses
                              6 views
                              0 likes
                              Last Post NinjaCustomer  
                              Started by tradr, Today, 07:45 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post tradr
                              by tradr
                               
                              Working...
                              X