Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

automated system failure

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

    automated system failure

    I have the following code in an automated system. It has been working fine and executing upon a fill in the primary contract. today it failed twice. Is there anyway to track down how or why this could have happened. BY fail i mean this code segment did not submit the order wehn there was a fill in the order specificed by the ZBOrder order



    protected override void OnOrderUpdate(IOrder order)
    {
    if (ZBOrder != null && ZBOrder.Token == order.Token && order.OrderState == OrderState.Filled )
    {

    ZBWrk = true;
    Print("***********************FILL**************** ********");
    Print("QTY:"+order.Quantity.ToString());
    if (sBuySell=="S")
    {
    //ZNOrder = EnterShortLimit(1,true,order.Quantity,GetCurrentBi d(1), "SPRD2");
    ZNOrder = EnterShort(1,order.Quantity,"SPRD2");
    Print("SELL ZN:" + (GetCurrentBid(1)));
    }
    if (sBuySell=="B")
    {
    //ZNOrder = EnterShortLimit(1,true,order.Quantity,GetCurrentBi d(1), "SPRD2");
    ZNOrder = EnterLong(1,order.Quantity,"SPRD2");
    Print("BUY ZN:" + (GetCurrentAsk(1)));
    }


    Print("***********************FILL**************** ********");
    ZBOrder = null;
    }
    }

    #2
    You might be running into an issue we have recently come across that is forcing us to adopt a new advised approach when it comes to triggering order submissions. Instead of OnOrderUpdate() we will advise and provide a reference sample with using OnExecution(). This should be out in the next few days and I suggest re-coding this aspect of your strategy and then letting us know if you see something unexpected again.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    115 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    69 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    225 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    411 views
    0 likes
    Last Post CaptainJack  
    Working...
    X