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 CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    24 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    25 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    30 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    18 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    28 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X