Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM versus Built in order management

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

    ATM versus Built in order management

    This is a philosophical question regarding how to manage orders in a strategy.

    I like the functionality of an ATM. The ability to have it do all the trailing features, display on the charts, manual overriding, etc. The ATM does all the work for me. The major downside is that it requires a 2nd chart to watch and can't be backtested. Another drawback is that I often want more steps to moving stops than the ATM allows (4 max - BE + 3 steps).

    The builtin orders can be backtested and used for analysis of profitability over historical data. And it can draw the order lines on the chart. But if I want the ATM-like features, I have to code these all myself, adding a huge overhead to my strategy development.

    Is this a true and valid viewpoint of these two features? Am I missing anything here?

    Do many people implement both in their strategies?

    I've got the ATM functionality working in my strategy. It works well and is very stable. I really like it. But I want to backtest so I can use the genetic optimizer for dialing in some settings.

    Am I relegated to implementing both feature sets in my strategy?

    Thanks.

    #2
    There is another feature of ATM's that seems a little odd. To manage ATM's in a strategy there was some sample code for looking at id's and stuff.

    I'm doing this check to see if an ATM has been cancelled:

    if (atmStrategyId.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId) == MarketPosition.Flat)

    this works if the ATM is now gone, but it never gets run if the position was reversed. In this routine I increment a session trade counter. Since this routine can't be guaranteed to run every time, my session trade counter is unreliable. I'm trying to build a filter to stop trading after x number of trades per day.

    Comment


      #3
      Hello,

      Thanks for the note.

      Your understanding is correct on ATM strategy.

      Also as far as a reversing ATM strategy code this code should work for you.

      However you will want to submit this ATM reversal yourself from the strategy instead of using the ATM strategy rev function. Reason is that you want to be able to monitor it from the strategy.

      Also the Position only matters relative to the ATM Strategy itself. Therefor you can still check for flat.

      Let me know if I can be of further assistance.
      BrettNinjaTrader Product Management

      Comment


        #4
        I think you left the link off. Which code were you referring to?

        I'm not sure how I'm doing the reversal. I think it is just creating a new ATM in the other direction, which cancels out the existing one. I didn't know there were multiple ways to reverse an ATM.

        So do you have any recommendation for implementing the ATM functionality using the builtin routines? It would be nice to have a boilerplate template that would do 80% of what an ATM does. That way we are all not reinventing the wheel every time.

        Comment


          #5
          Hello,

          There is no sample that does exactly this that I can link to you.

          What you will need to do to do a reversal the recommended way.

          1) Close the current ATM Strategy and return this specific ATM Strategy to Flat.
          2)Once ATM Strategy is closed and you confirm this by the ATM strategy ID being reset.
          3)Open a new ATM Strategy this time as a short position.


          This would be the recommended way to reverse an ATM Strategy. There is a sample built into NinjaTrader that shows how to open and close an ATM Strategy.

          Control Center->Tools->Edit NinjaScript->Strategies.

          Also: http://www.ninjatrader.com/support/h...gy_methods.htm

          Let me know if I can be of further assistance.
          BrettNinjaTrader Product Management

          Comment


            #6
            I like the functionality of an ATM. The ability to have it do all the trailing features, display on the charts, manual overriding, etc.

            maryland volkswagen

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X