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

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.



    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    4 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    12 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,982 views
    3 likes
    Last Post jhudas88  
    Working...
    X