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

limit orders

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

    limit orders

    Hi,

    I have a strategy that is designed to run on a tick-by-tick basis. I want to place limit orders within this, but found it incredulous that when you place a limit order from within onBarUpdate(), they are canceled at the end of the bar and have to be resubmitted! Surely that means they are not active all the time in the market until filled? An opportunity for a fill could "slip through the cracks"? And also, is there a positive way to find out whether it has even been filled, or do you just have to check for a change in the position size? I can't believe there isn't a callback method of some sort to indicate a fill.

    Thanks,

    Andrew

    #2
    Actually I think I figured out the answer to my first question. The documentation says: "Orders are kept alive provided that they are re-submitted on each call of the OnBarUpdate() method. If the order is not re submitted, the order is then canceled.". So, it seems the same order is kept alive, rather than new ones being created and destroyed all the time.

    My second question still stands though: how do you get positive confirmation of a fill? Is there any way to access the history of executed trades?

    Comment


      #3
      To find if a position is filled you can check for position size or even market position. You would start flat then you would be either long or short.

      In NT6.5 you can do much more position management through the new IOrder object in the context of OnOrderUpdate(). This seems to be the most fitting route from what I can discern of your needs. It will fire off events like "Partial Fill", "Filled", "Cancelled", etc. Please take a look at the NT6.5 beta help guide for more description on this.
      Josh P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by TraderBCL, Today, 04:38 AM
      1 response
      6 views
      0 likes
      Last Post bltdavid  
      Started by martin70, 03-24-2023, 04:58 AM
      14 responses
      105 views
      0 likes
      Last Post martin70  
      Started by Radano, 06-10-2021, 01:40 AM
      19 responses
      606 views
      0 likes
      Last Post Radano
      by Radano
       
      Started by KenneGaray, Today, 03:48 AM
      0 responses
      4 views
      0 likes
      Last Post KenneGaray  
      Started by thanajo, 05-04-2021, 02:11 AM
      4 responses
      471 views
      0 likes
      Last Post tradingnasdaqprueba  
      Working...
      X