Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading on level 2 values

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

    Chancehero,

    I ran your script all day without incident.

    Did you run into any issues on your end?
    Cal H.NinjaTrader Customer Service

    Comment


      Originally posted by NinjaTrader_Cal View Post
      Chancehero,

      As far as the Stop and Profit targets OCO I'll need a copy the script that you are working with and Trace and Logs from when you can reproduce the scenario

      Additionally, the not enough bars reference is that the script is trying to calculate when there is not enough data on the chart. Do you have a CurrentBar check in place? -

      if(CurrentBar < 1)
      return;
      do you have an email I can send this to you .... rather not have my live logs floating around this forum for the whole world to see. we could maybe just private message for this OCO thing.

      Comment


        support[at]ninjatrader[dot]com

        Put Attn Cal in the subject and reference this thread in the body
        Cal H.NinjaTrader Customer Service

        Comment


          general question about execution and market depth order:

          will I get a '
          protected override void OnMarketData(MarketDataEventArgs e){

          before the

          protected override void OnMarketDepth(MarketDepthEventArgs e) {

          when an order or quantity gets sold/ purchased? or is it the other way aorund.

          Comment


            Chancehero,

            There is no way to tell which gets called first. These are two separate methods that get called based on when that data is received from the feed.
            Cal H.NinjaTrader Customer Service

            Comment


              ???
              seriously? I find that a little hard to believe,
              if I get a execution update, that some contract was sold, I will also get a market depth even that tell me that the quantity dropped, by that amount sold. really feel like cme - or kineticks, (prob not patsystem ) , has this down pat, and that its always the same order, either:

              1) execution, followed by marker depth, telling you that I know something has dropped at X price, from the start of the queu and that I get a confirmation from my market depth...
              or
              2) market depth then execution, telling you that the market depth change came from the start of the queu. (because that market depth change is attributed to a execution)

              do you know what I mean? the end results is the same, but the story is different, (that I need to code that appropriatly)
              ChanceHero
              Last edited by chancehero; 03-06-2014, 10:40 AM.

              Comment


                Chancehero,

                These are two different servers that are sending information to your NinjaTrader and are not always in sync because of this. These are two separate data streams and should be treated to show different results
                Cal H.NinjaTrader Customer Service

                Comment


                  thanks for the info, even if that was not what I wanted to hear ,

                  Comment


                    if I fire a
                    cancelorder(xxxx);
                    when xxxx is already null what will take place?
                    nothing? or will it stop my strategy?

                    Comment


                      If xxx is null and you attempt to CancelOrder, you will get an error message stating that "Object reference not set to an instance of an object"

                      The Strategy will shutdown at this point however any open positions will remain.
                      Cal H.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      582 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      338 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      103 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      554 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      552 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X