Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Call an ATM Strategy

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

    Call an ATM Strategy

    hi, I currently have a strategy that reverses trades based on a moving average condition. If I'm long and I want to shift to a short trade, I submit an EnterShort command which accomplishes this reversal. The opposite is true when I want to go long from a short position.

    I now want to swap out my EnterLong and EnterShort commands with an
    AtmStrategyCreate and have the ATM strategy manage the trade.

    So, my question ... if I'm in a long position via the AtmStrategyCreate command, how do I reverse that position within the same bar to a short if my program detects a reversal condition before the ATM strategy arrives at an exit? Do I need to close the long ATM (AtmStrategyClose) position before creating a short ATM strategy position to complete my reversal? If so, can I do this so that the reversal (exit of old position and entry of new position) occurs in the same bar?

    Thank you for your insight!

    #2
    Hi Pman777,

    Thank you for your note.

    This is correct. You will need to use the AtmStrategyClose to close out the long or short position before submitting an order in the opposite direction.

    Please note that this will close the ATM Strategy itself and not the automated strategy.

    http://www.ninjatrader.com/support/h...ategyclose.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply ... can I cancel an ATM strategy and then immediately create an ATM strategy in the same pass through of the program to effectively execute the reversal in the same bar?

      Comment


        #4
        Pman77.

        Yes, you can create and cancel an ATM Strategy through the same pass through as long as you are calling a different ATM Strategy Template.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          thanks ... one more question, and this one is more of a C# question. I need to access and store the average filled price coming from my ATM Strategy. Using the SampleATMStrategy program as a guide, I guess I can use the GetAtmStrategyEntryOrderStatus command but it seems to return it's values as a string. How do I convert the first array entry, which is the average fill price, into a double?

          Comment


            #6
            You can use GetAtmStrategyPositionAveragePrice() to get this value and store it in a variable -
            http://www.ninjatrader.com/support/h...onaveragep.htm
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              Cal, you've been very helpful! A couple more questions:

              1) Upon exiting the ATM strategy, I need to access the fill price that I exited with ...how do I access that information?

              2) Is there a way to modify the ATM's Profit Target from within my strategy?

              thanks again
              Last edited by pman777; 12-23-2013, 04:46 PM.

              Comment


                #8
                Pman77,

                There is not a way to get the exit price of the ATM strategy.

                Yes, there is a way to modify the Profit Target. Take a look at the SampleAtmStrategy that we have available inside NinjaTrader, Tools -> Edit NinjaScript -> Strategy
                Cal H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CortexZenUSA, Today, 12:53 AM
                0 responses
                2 views
                0 likes
                Last Post CortexZenUSA  
                Started by CortexZenUSA, Today, 12:46 AM
                0 responses
                1 view
                0 likes
                Last Post CortexZenUSA  
                Started by usazencortex, Today, 12:43 AM
                0 responses
                5 views
                0 likes
                Last Post usazencortex  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                168 responses
                2,266 views
                0 likes
                Last Post sidlercom80  
                Started by Barry Milan, Yesterday, 10:35 PM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X