Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading on level 2 values

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

    #31
    You're welcome - if I understand you correctly, you wish to know if the orders in front at your price point are increasing or decreasing? You generally have access to the 5 best buy / sell levels, so you can keep track of qty's at the time you're order comes back accepted / working and then you can compare to updates received.

    Comment


      #32
      kind of,

      but in those 5 ,or 10 available levels, when I place a profit tarket for one contract, I want to know where I am in the actual queue of a specific price level. , such that if for example:
      profit tarket is placed at 1200, and It is simply waiting and when it was placed there was 300 contract at that price before me, ..

      now these 300 contracts before be , some may be canceled or filled, meaning that I am moving up in the queue to sell.

      how do I track the actual position that I am at. or is it even possible with the information.

      from that I can see, I cant but maybe I am overlooking something.

      thanks
      Attached Files
      Last edited by chancehero; 07-17-2012, 06:15 AM. Reason: added picture

      Comment


        #33
        chancehero, unfortunately I'm not aware of a way to get the absolute q position and doubt it's easily reconstructable...I think what you can monitor is the order resting at your price and their changes to estimate if you're getting closer to a fill or not.

        Comment


          #34
          that's what I though,

          thanks

          Comment


            #35
            know of any treads discussing this?

            Comment


              #36
              Originally posted by chancehero View Post
              know of any treads discussing this?
              Nothing really yet on our forums here I think, how about checking into http://www.google.com/patents/US7809628 to get more familiar with the topic and thoughts floating?

              Comment


                #37
                process

                this question I cant see someone has asked but I might as well.

                Markov process- any threads discussing this or coding it? or transferring or allowing my ninja script to read some of my Fortran code that computes what I need (more proficient in fortran than c).

                thanks

                Comment


                  #38
                  Sorry, nothing I'm aware of for a Markov model here, would encourage to google a bit for starting materials like - http://www.koders.com/csharp/fidCA67...2D6931054.aspx

                  For your Fortran, you can try generating a DLL to call in this unmanaged code - http://software.intel.com/en-us/arti...l-from-c-code/

                  Comment


                    #39
                    disable problem

                    Hi,

                    I have a small , but annoying problem.

                    I built my strategy. and have the disable function called when I have realized my trading goal for the day. I have placed this in the OnMarketDepth area.

                    the problem is that my buy strategy is also in this same OnMarketDepth area and it sometimes goes off while the strategy is being disabled. so my strategy ends, and I am left with an order waiting to be filled that is running.

                    NOTE
                    (1) I placed the disable at the start of the OnMarketDepth
                    (2) from what I can see, my signal is being generated in the updateOrderBook and then used in the OnMarketDepth to generate my entries and exits. so I placed a print() to tell me that I was closing the strat before disable, and between the print() I get 10-30 signals that have time to be generated before it actually closes my strat.

                    any easy fix for this? that is simpler than adding a bool variable to make sure that I dont get filled while closing?

                    Thanks

                    Comment


                      #40
                      Hi chancehero, yes I would look into adding this bool that the call to disable will set to prevent further entries, as you would include a check to it in your entry condition as well to avoid placing any orders as the Disable() process is being handled.

                      Comment


                        #41
                        back testing

                        hi,

                        for a while I have been testing my strategy with the sim account using my brokers live data stream ... is there any way that I can use the strategy analyser? im pretty sure I cant but maybe you guys know a ways that it would work.

                        Note : my strategy runs only in OnMarketDepth
                        and is there any plans for allowing my to use strategy analyser in the future?

                        thanks

                        Comment


                          #42
                          Hello chancehero,
                          Unfortunately OnMarketData cannot be backtested.

                          Code:
                          This method is not called on historical data (backtest)


                          Since it is the raw stream, it is theoretically not unavailable in history.

                          What I can suggest you modify your strategy and create an multi-series strategy with a higher granularity bar series. Please refer to this sample code which further demonstrates it.
                          You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
                          JoydeepNinjaTrader Customer Service

                          Comment


                            #43
                            before I look too far into this,
                            would it be possible to create bars for 1 onmatketdata() event, regarless of time?

                            thanks

                            Comment


                              #44
                              Hello chancehero,
                              Unfortunately OnMarketData is only available in realtime. Not backtest.
                              JoydeepNinjaTrader Customer Service

                              Comment


                                #45
                                data recording

                                hi,

                                so Im loggin some data and I had a question
                                this is what I have presently:
                                PHP Code:
                                protected override void OnMarketDepth(MarketDepthEventArgs e) {
                                
                                string data_3 =  count_save +" , "+  pricenow +" , "+quantitysold  +" , "+ GetCurrentAsk()  +" , "+ GetCurrentBid()   +     Environment.NewLine ;
                                            File.AppendAllText(log_file_part3,data_3 );
                                } 
                                

                                and I am noticing that its impossible for me to know from this what was correctly sold using quantitysold defined as :

                                PHP Code:
                                protected override void OnMarketData(MarketDataEventArgs e) {
                                            // to get my price and volume traded
                                            if (e.MarketDataType == MarketDataType.Last) {
                                                pricenow=e.Price;
                                                quantitysold=e.Volume;
                                            }
                                        } 
                                
                                when the quantity sold are the same.....


                                I included a sample of the file im saving so you can see the problem - or the confusion im having.

                                any tips on how to get some value or indicator when I get actually something sold....... if they are the same values....

                                thanks
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                608 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                355 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X