Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RealtimeErrorHandling

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

    RealtimeErrorHandling

    Hello


    I'm running into some issues with my strat.

    i've put
    RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
    in the Initialize() method..

    but i'm getting some OVERFILL and they are disconnecting my strat.

    What to do ?

    #2
    Hello zark.be,

    Thank you for your post.

    The RealTimeErrorHandling.TakeNoAction only applies to rejection messages not overfills. You may be looking for IgnoreOverFill: http://www.ninjatrader.com/support/h...reoverfill.htm

    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.

    You will need to correct your order handling logic to resolve this.

    A good starting example can be found here: http://www.ninjatrader.com/support/f...ead.php?t=7499

    Your NinjaScript / C# Code will always be logically processed and evaluate according to your set logic – this can of course lead to unexpected results at times, thus we would suggest to simplify and debug your code to better understand the event sequence it would go through - unfortunately we cannot offer such debug or code modification services here, but please see the provided resources below to help you proceed productively :

    First of all you would want to use Print() statements to verify values are what you expect - Debugging your NinjaScript code.

    For strategies add TraceOrders = true to your Initialize() method and you can then view valuable output related to strategy submitted orders through Tools > Output window - TraceOrders

    It may also help to add drawing objects to your chart for signal and condition confirmation - Drawing Objects.

    If you would prefer the debug assist of a professional NinjaScript consultant, please check into the following listings - Click here for a list of certified NinjaScript Consultants

    Let me know if I can be of further assistance.

    Comment


      #3
      Helllo Patrick ...

      I hate to rain on your parade ..

      but IgnoreOverFill is for unmanaged orders only ..

      from help file :
      "Defines the behaviour of a strategy when an overfill is detected. This property is only relevant when using Unmanaged order methods."

      And your example link has nothing to do with unmanaged orders.

      No other way to handle overfills than going into the unmanaged world ?

      Comment


        #4
        Hello zark.be,

        Thank you for your response.

        The following example does not have to do with Unmanaged orders, correct. This is a good example to use as a reference for logical code for order submission: http://www.ninjatrader.com/support/f...ead.php?t=7499

        Please let me know if I can be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by lightsun47, Today, 03:51 PM
        0 responses
        4 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        8 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        44 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        13 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        8 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X