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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X