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 AaronKoRn, Today, 09:49 PM
        0 responses
        6 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        8 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        9 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,975 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X