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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X