Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about the return value of GetAtmStrategyEntryOrderStatus

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

    Question about the return value of GetAtmStrategyEntryOrderStatus

    Hello,

    In this examples,https://ninjatrader.com/support/help...gy_methods.htm
    AtmStrategyCancelEntryOrder();

    entryOrder[2] == "Working",
    OrderState Values have the following:
    OrderState.Initialized, OrderState.Submitted, OrderState.Accepted, OrderState.TriggerPending, OrderState.Working, OrderState.ChangePending, OrderState.ChangeSubmitted, OrderState.CancelPending, OrderState.CancelSubmitted, OrderState.Cancelled, OrderState.Rejected,
    OrderState.PartFilled, OrderState.Filled, OrderState.Unknown



    Replace it with a string, right?
    .....
    entryOrder[2] == "Accepted",
    entryOrder[2] == "Working",
    ....
    ....
    entryOrder[2] == "Rejected",
    entryOrder[2] == "PartFilled",
    entryOrder[2] == "Filled"?
    ...
    Is the capitalization correct or will the letters change?
    This example is not convenient for me to test.



    https://ninjatrader.com/support/help...rderupdate.htm

    OrderState Values



    Thank you
    Last edited by jetheil2; 02-28-2022, 11:15 PM.

    #2
    Hello jetheil2,

    The GetAtmStrategyEntryOrderStatus help page shows how to make the result array into strings so you can work with the result values. If you wanted to know the capitalization or to know if you formed the condition correctly you could simply print the result to double check or copy/paste in your condition.

    Code:
     Print(entryOrder[2].ToString());
    Capitalization does matter for matching with strings so you would need to match the given result string exactly in your condition, for example "Filled". The OrderState enum should all start with a capital letter like the help guide shows.



    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X