Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetAtmStrategyStopTargetOrderStatus

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

    GetAtmStrategyStopTargetOrderStatus

    Hi,
    I am trying to use "GetAtmStrategyStopTargetOrderStatus" to return the price I have my fixed (initial)stop order at in the ATM strategy and haven't had any success. What I am trying to do is, compare the price the fixed stop is at to the value of the ParabolicSAR value and when the ParabolicSAR value falls below the stop price in a short position, have the stop follow the ParabolicSAR value down. I am able to have the stop follow the ParabolicSAR value down, I just can't get the initial comparison to work. I hope this is making sense!

    Thanks

    #2
    Hello mlarocco,

    When and how are you calling the "GetAtmStrategyStopTargetOrderStatus"?

    Also, are you checking to make sure that your entry order is filled?
    JCNinjaTrader Customer Service

    Comment


      #3
      I wasn't checking if the order was filled. I had tried several different attempts including the code from the doc's (see below). I ran into trouble when trying to use a "<" or ">"against the ParabolicSAR value, which is what I ultimately want to do.


      protected override void OnBarUpdate()
      {
      string[,] orders = GetAtmStrategyStopTargetOrderStatus("TARGET1", "idValue");

      // Check length to ensure that returned array holds order information
      if (orders.Length > 0)
      {
      for (int i = 0; i < orders.GetLength(0); i++)
      {
      Print("Average fill price is " + orders[i, 0].ToString());
      Print("Filled amount is " + orders[i, 1].ToString());
      Print("Current state is " + orders[i, 2].ToString());
      }
      }
      }

      Comment


        #4
        I found a different way to get the results I wanted. Thanks for your help

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        22 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        19 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X