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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 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