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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    63 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X