Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rtwave, 04-12-2024, 09:30 AM
        5 responses
        37 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by funk10101, Today, 12:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nandhumca, Yesterday, 03:41 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X