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 wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    26 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, Yesterday, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    192 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,234 views
    0 likes
    Last Post xiinteractive  
    Working...
    X