Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error Message Question

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

    Error Message Question

    Could someone please explain what this message means? I have gotten it with a few of my strategies????? Thanks!
    Attached Files

    #2
    edgeliner,

    An overfill is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation. The cancel request could have been induced by an explicit CancelOrder() call, from more implicit cancellations like those that occur when another order sharing the same OCO ID is filled, or from things like order expirations.

    In my experience, this message can occur for example when you call an ExitLong() and EnterShort() at the same time, or some set of conditions occur at the same time (or close to the same time) so that both are called by your strategy.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Adam......

      You are on the right track....I have this particular system exiting long when a certain condition exits and entering short when another condition exists...... they could sometimes happen at the same time. If I separate the system into 2 separate systems and run it on 2 separate charts, would that solve the problem???

      Comment


        #4
        edgeliner,

        Yes that would most likely solve the overfill issue but it may also cause account syncing issues if you are running the two strategies on the same account.

        You could try using a flag here.

        Code:
        if ( ConditionSet1  && Flag )
        {
            EnterLong();
            Flag = false;
        }
        
        if( ConditionSet2 && Flag)
        {
           ExitShort();
           Flag = false;
        }
        Then reset your flag to be true whenever its a new bar or something.

        Something like that may help if COBC = true. In the false case you may want to monitor orders and if the order isn't filled then reset the flag to "true" as well.

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          What is COBC=true???

          Comment


            #6
            Edgeliner,

            I noticed you had another thread open.



            I can continue helping you there if we are talking about the same strategy here. I mentioned the COBC, or "CalculateOnBarClose" setting there.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Yes.....same one.......

              Comment


                #8
                Is there some sort of an explicit CancelOrder() command that I can add to my code if one or the other is executed?

                Comment


                  #9
                  edgeliner,

                  CancelOrder() works something like this : http://www.ninjatrader.com/support/h...ancelorder.htm

                  I am still reviewing your other thread so thank you for your patience.
                  Adam P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by elirion, Yesterday, 09:32 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Started by cre8able, Yesterday, 09:15 PM
                  1 response
                  8 views
                  0 likes
                  Last Post bltdavid  
                  Started by cummish, Yesterday, 08:43 PM
                  0 responses
                  16 views
                  0 likes
                  Last Post cummish
                  by cummish
                   
                  Started by Option Whisperer, Yesterday, 07:58 PM
                  4 responses
                  21 views
                  0 likes
                  Last Post Option Whisperer  
                  Started by ETFVoyageur, 05-07-2024, 07:05 PM
                  13 responses
                  87 views
                  0 likes
                  Last Post ETFVoyageur  
                  Working...
                  X