Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTOrderStatus question

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

  • NinjaTrader_JoshP
    replied
    sigworks,

    Sounds to me you are using some external application to try and read the OrderState of the same OrderID you had prior to shutting down NT. This OrderID may or may not be the same.

    Have you considered using NTOrders() to get a list of all the orderIDs? What does it show you then? What do you get when you run NTOrderStatus() off those IDs?

    Leave a comment:


  • sigworks
    replied
    Ok. I understand, but it is a little inconsistent for me, because the OrderId of the running position is existent until the position is closed (at the same day). The OrderStatus of this OrderId is "filled" until it comes overnight. Next day this is empty.
    The Status of this ID could be generally deleted after the position will be closed, I think. Little confused

    Thanks.

    sigworks

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    sigworks,

    Unfortunately I am still not following you. Your order is definitely filled if it opened a position. Only other possibility is a partial fill.

    NTOrderStatus does not run on positions, it runs on orders.

    Leave a comment:


  • sigworks
    replied
    Hi Josh,
    right, but I do some processes with the orderstatus. When I got not "filled" with an opened position, so this processes are not working. How could I determine the NTOrderStatus for this opened position next day after restart NT?

    Thanks.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    sigworks,

    I guess I am not following. If you already opened the position, the order's state is Filled because that's how you opened the position. Guess I am not sure which order you are trying to look for exactly? Thanks.

    Leave a comment:


  • sigworks
    replied
    Originally posted by NinjaTrader_Josh View Post
    sigworks,

    As you connect, NT reads position updates from your brokerage. Whatever comes across the wire when you read them is what will be displayed for those orders. For the most part, if your brokerage has a working order, it will always report that as working.
    Josh, maybe for working orders. I have an issue with opened positions, when I start NT next day, I can not determine the orderstatus of the opened position. The Function NTOrderStatus(String OrderID) returns "0". When I restart NT at the same day where the position opened, then NTOrderStatus(String OrderId) returns the correct status.

    Is this issued by my brokerage?

    Thanks.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    sigworks,

    As you connect, NT reads position updates from your brokerage. Whatever comes across the wire when you read them is what will be displayed for those orders. For the most part, if your brokerage has a working order, it will always report that as working.

    Leave a comment:


  • sigworks
    replied
    Originally posted by NinjaTrader_Josh View Post
    sigworks,

    What version of NT? Are you shutting NT down?
    Hello,

    yes I'm shutting down NT. OrderStatus will be safed locally? Is it lost, when I restart NT?
    I use NT 7.

    Thank you.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    sigworks,

    What version of NT? Are you shutting NT down?

    Leave a comment:


  • sigworks
    replied
    lost OrderStatus overnight

    Hello,

    i use orderrouting from tradestation through Ninjatrader to Patsystems. Almost all works well. However, ninjatrader lost the orderstatus for overnight-positions. At startting a position orderstate is filled. Next day the getting orderstatus is "". Why?

    Thanks.

    sigworks

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    You can check all potential states here - http://www.ninjatrader-support.com/H...V6/IOrder.html

    First thing you would see it being in PendingSubmit while going in accepted / working status.

    Leave a comment:


  • tiara50
    replied
    Hello,

    I set the Order ID within the code. My signal can change quickly, so I will not fire a new order until I get a confirmed cancel or filled in a previous trade, but to fire the initial order it is neither cancelled or filled yet. My condition is to fire an order only if the state is null, cancelled or filled; null only being the beginning of the day.

    Thanks

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    If an order has not even been placed yet how would you have the OrderID?

    Leave a comment:


  • tiara50
    replied
    Initial state of NTOrderStatus

    Hello,

    What would be the initial state of an order?
    NTOrderStatus(OrderID) = ""

    I have a script that checks the status of an order and trying to determine what value it should find when an order has not even been placed yet.

    Thanks

    Leave a comment:


  • NinjaTrader_Ray
    replied
    With IB, Accepted means that its on their servers, usually stop orders. I believe you will get a working state once the order is triggered.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
14 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
119 views
0 likes
Last Post Mindset
by Mindset
 
Started by M4ndoo, 04-20-2026, 05:21 PM
0 responses
172 views
0 likes
Last Post M4ndoo
by M4ndoo
 
Started by M4ndoo, 04-19-2026, 05:54 PM
0 responses
88 views
0 likes
Last Post M4ndoo
by M4ndoo
 
Started by cmoran13, 04-16-2026, 01:02 PM
0 responses
131 views
0 likes
Last Post cmoran13  
Working...
X