Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnOrderUpdate triggering

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

    OnOrderUpdate triggering

    Hello,

    I´m working with NT8 now for months and all working fine as with NT7 but I have a problem in onorderupdate. I use the logic for OnOrderUpdate from the NT-sample, adding Backcoloring to see if its working. With my entryOrderSba1a=EnterShortLimit(0,true,1,GetCurren tBid(), "Sba1a"); (you can see in the attached screenshot filled) it does not Backbrush nor changing the bool.

    protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
    {if (entryOrderSba1a != null && order.Name == "entryOrderSba1a")
    {entryOrderSba1a = order;
    if (order.OrderState == OrderState.Filled)
    {shorttrade=true; BackBrush = Brushes.Orange;
    }

    // Reset the entryOrder object to null if order was cancelled without any fill
    if (order.OrderState == OrderState.Cancelled && order.Filled == 0)
    entryOrderSba1a = null;}

    In the attached screenshot one can see that there is an entry from my entryOrderSba1a.

    I try to resolve several times now but I cant figure it out what is the reason.

    Thank you!
    Tony
    Attached Files
    Last edited by tonynt; 09-01-2019, 11:06 AM. Reason: translation error

    #2
    Hi tonynt, thanks for your post.

    Could you kindly post your test script here and so I can run this on my installation?

    I look forward to hearing from you.

    Comment


      #3
      Hello ChrisL,

      thank you for your reply. It is working today with live data! Why didnt it work with playback connection? I worked with this stuff the whole weekend.

      Thank you!
      Tony

      Comment


        #4
        Hi tonynt, thanks for your reply.

        Will this still not work with playback? I would expect the playback account to work the same as the Sim101, but there could be something going on with the fact that the playback account gets reset without user intervention.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        45 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        31 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        50 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Working...
        X