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 CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    120 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    174 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    91 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    134 views
    0 likes
    Last Post cmoran13  
    Working...
    X