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 Nicholewatkinsi, Yesterday, 10:53 PM
      0 responses
      6 views
      0 likes
      Last Post Nicholewatkinsi  
      Started by dward123, 01-02-2024, 09:59 PM
      4 responses
      175 views
      0 likes
      Last Post Lancer
      by Lancer
       
      Started by ETFVoyageur, Yesterday, 04:00 PM
      2 responses
      19 views
      0 likes
      Last Post ETFVoyageur  
      Started by AaronKTradingForum, Yesterday, 03:44 PM
      1 response
      14 views
      0 likes
      Last Post AaronKTradingForum  
      Started by Felix Reichert, 04-26-2024, 02:12 PM
      11 responses
      80 views
      0 likes
      Last Post Felix Reichert  
      Working...
      X