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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        37 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        61 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