Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error " An over fill was detected "

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

    Error " An over fill was detected "

    Hi all,

    i'm receiving a lotof this error: "An over fill was detected on order...",

    in my strategy i enter on market with EnterLong()

    set stoploss "intratrade" with SetStopLoss()

    and close my position if i reached the stoploss or if i get the exit condition (my exit code is ExitLong() in this case)....

    What is the cause of the error "An over fill was detected..."??
    Beacause i use both SetStopLoss() and ExitLong() ?

    thanks to all that answer to me!

    wyatt

    #2
    Wyatt,

    You can try the following : http://www.ninjatrader.com/support/h...reoverfill.htm

    However it may cause a condition that isn't desired.

    If you could post your code I would be happy to look over it an identify perhaps why an overfill is occurring.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      an example, this is what's happen..





      there is both "StopLoss" reached and "Buy To Cover" for ExitShort... so, an over fill exception was throwed...

      Any ideas?

      Comment


        #4
        wyatt,

        You probably have two exits being called at the same time due to two sets of conditions possibly occuring at the same time.

        You could try to use If / Else if statements to separate your code logic into mutually exclusive conditions/actions, or you can try adding extra conditions into your if statements to make it so the two exits don't occur at the same time.

        For example, suppose Condition1 and Condition2 could possibly happen at the same time.

        Code:
        if( Condition1 )
        {
             // do action 1
        }
        else if ( Condition2 )
        {
            // do action 2
        }
        This would make action1 and action2 impossible to happen at the same time, however if you have calculate on bar close = false it may still happen 1 tick later and you would need to account for that.

        Please note that if you are in a long position for example, and you call EnterShort() and ExitLong() very shortly after it could possibly result in an overfill. This is just an example, not necessarily your case here. I would need to see how you are doing you order management in code to identify the precise reason here.
        Last edited by NinjaTrader_AdamP; 04-18-2012, 07:39 AM.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          for that issue with your indication i found a way to solution,
          but another problem was presented:





          in this image i retrieve another "over fill" error because i had a stoploss order with an exitlong order at the same time...
          but i "launch" entrylong order in the first black circle... but is filled in the second black circle, just 4-5-6 candles after...

          is there a solution for this error (not "over fill" but to much shifting of an order)??

          thanks!

          Comment


            #6
            Originally posted by wyatt376 View Post

            in this image i retrieve another "over fill" error because i had a stoploss order with an exitlong order at the same time...
            but i "launch" entrylong order in the first black circle... but is filled in the second black circle, just 4-5-6 candles after...

            is there a solution for this error (not "over fill" but to much shifting of an order)??

            thanks!
            In the first instance, you would need to ensure this doesn't happen either with my previous suggestion, some order flags, or you could use OnExecution() and OnOrderUpdate() to help filter out certain trades for example, as these methods let you check order states.

            As far as the second issue, I am not sure why that would happen. Are you using strictly "EnterLong"?

            If you are reluctant to share code in the forum, you can send a support request to support at ninjatrader dot com with ATTN : Adam in the message body and a link to this thread. We don't share our customers code as this is treated strictly confidential.

            Essentially, I would be able to offer much more specific advice if I could see the code.
            Adam P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            637 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            366 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            107 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            572 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X