Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AtmStrategyId after Reverse

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

    AtmStrategyId after Reverse

    I'm using an ATM in my strategy that uses the "reverse at stop" option. Prior to the stop/reverse being hit, I can change the stop as necessary, but after the reverse I can no longer access the ATMStrategy as I get an error "does not exist or is already in terminated state" in the log file. The ATM still appears to be running on the DOME as the position reversed, not closed. Is there a way I can test to see if the AtmStrategyId is still valid?

    #2
    Hello,

    You can check the status of an ATM order by using GetAtmStrategyEntryOrderStatus(my_order_id). This link will help:
    DenNinjaTrader Customer Service

    Comment


      #3
      I didn't ask about checking the status of the order. What I'm wondering is if the ATM strategy is cancelled after a reversal. Again, is there a way I can test to see if the atmstrategyid is still active?

      Comment


        #4
        Hello,

        Are you a programmer? If so, post your code.


        If you are not, there is no way to "test" for a valid ATM. However when your ATM reverses it puts into place the same ATM, only in the opposite direction. You can see this by looking at the ends of the profit targets and stops there will be a "2s" usually. That means there is a position stacked and on of them is the reversal order.

        I am not 100% sure what you are doing exactly. Please provide me with step by step instructions on what you are doing and screen shots so I can see.
        DenNinjaTrader Customer Service

        Comment


          #5
          Yes, I'm a programmer. I changed the code alot after I submitted my question last night, but what I am trying to do is maintain an ATM in a "always in" strategy using the 'reverse at stop' function. In other words, the strategy is never flat. When a stop is hit, it simply reverses. Then the strategy keeps adjusting the new stop/reversal until it gets hit and on it goes. My problem was that I could alter my orginal stop in the ATM, but once a reversal has been triggered, the ATM no longer existed. I could no longer change the stop. Yes, the order(s) are sitting there stacked (2s) in the dome, but I no longer have access to them becuase there is no ATMstrategyid for me to use. I hope this makes sense. I just re-wrote the code to reverse manually instead of using the 'reverse at stop' function of the ATM.

          Comment


            #6
            Hello,

            I am not sure what you are doing without seeing the code. I am sorry, please post the code so I can assist. I do not know how you are reversing etc. You can cut and paste the code in your next post.

            However, you are correct, you will need to manually code out the reverse.
            DenNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NinjaTrader_Brett, Yesterday, 03:19 PM
            0 responses
            146 views
            0 likes
            Last Post NinjaTrader_Brett  
            Started by domjabs, Yesterday, 01:55 PM
            2 responses
            31 views
            0 likes
            Last Post domjabs
            by domjabs
             
            Started by Morning Cup Of Trades, Yesterday, 11:50 AM
            1 response
            33 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by imjustkaze, Yesterday, 12:20 PM
            2 responses
            69 views
            0 likes
            Last Post imjustkaze  
            Started by IanS00, Yesterday, 11:57 AM
            3 responses
            22 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X