Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy info

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

    ATM strategy info

    Let's say I have a parameter that can accept a string for an ATM Strategy name. So I use the value in the ATMStrategyCreate() method. I want to know how many target and stop levels this ATM strategy has. Is there another way to find out whether it has a TARGET2 or TARGET3 other than using the GetAtmStrategyStopTargetOrderStatus("Target2", id) method?

    If the strategy only has 1 target level, I would like to keep from filling up the Log with this error:

    **NT** GetAtmStrategyStopTargetStatus() method error: OrderName 'Target2' is invalid

    #2
    Hello cassb,
    Unfortunatley there are no supported codes to do it.

    You can however check for the length of the array to determine if the order exists or not.

    Code:
    string[,] orders = GetAtmStrategyStopTargetOrderStatus("TARGET2", "atmId");
    if (orders.Length == 0)
    {
       //do something as there are no Target2 order.
    }
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      OK, thank you Joydeep. I am already doing what you suggested. I have set a boolean so that it only does this check once if there is no Target2, so that it does not fill the Log with needless error messages. Can you please suggest to development an enhancement to the GetAtmStrategyStopTargetOrderStatus() method though?

      Thanks!
      Bryan

      Comment


        #4
        Hello Bryan,
        Thanks for your note.
        I will forward your request to development.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        65 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X