Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programming and ATM...why so difficult?

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

    Programming and ATM...why so difficult?

    Hi,

    I went through a video tutorial to set up the ATM just the way I want it. It works perfectly for what I want it to do.

    I also, have been doing some programming and have come up with just the proper entries, just they way I want them.

    Joining the two....why is it so freakin difficult?

    NOT ONE of the ATM management or monitoring commands is simply "use this ATM to manage and exit your trades."

    The closest is the "AtmStrategyCreate()" ....which doesn't have much of anything to do with exiting your position, but creating a reason to get into it. I don't want another reason/way/situation to enter an order. I want the darn thing to exit using my ATM.

    Someone please tell me how to do that.


    - Annoyed.

    #2
    Hello,

    Thank you for the question.

    When you are writing a custom strategy there are some items to keep in mind when using ATM strategies.

    ATM strategies work exactly the same in a NinjaScript strategy as they would in the superDOM or ChartTrader. This means that to have the ATM strategy manage exits, it needs to be the one that enters as well just as you would in a superDOM.

    ATM strategies and the Entry methods of a NinjaScript file can not be mixed so you would need to do exactly as in the SampleATMStrategy that comes with NinjaTrader and use AtmStrategyCreate to enter and start the ATM strategy, it will then manage the protective orders as you have specified.

    There is more information on ATM strategies in a NinjaScript strategy here: http://www.ninjatrader.com/support/h...gy_methods.htm
    This lists all of the available methods you can use with an ATM strategy from NinjaScript.

    I look forward to being of further assistance.

    Comment


      #3
      The ATM strategy that I wanted to use for this scalping strategy was a 5 tick profit, a 7 tick trailing stop, and after 5 ticks, set to "break even plus 2"....because sometimes the 5 tick limit order may not fill, and I don't want to lose everything when that happens. When I enter my positions by hand, my ATM strategy works perfectly.

      I can build nearly everything I want using the strategy wizard: profit target, trailing stop. I need to know how to create the "break even plus two ticks - after 5 ticks profit".

      Although for some reason, the trailing stop doesn't seem 'accurate' using the strategy wizard...I had created a 7 tick trailing stop using the wizard, but the stop would be sometimes as far as 9 ticks behind the current price. Any reason for that you may know of?

      Thanks for your help ahead of time,


      - DT

      Comment


        #4
        Hello,

        Thank you for the question.

        The break even will be semi difficult to create in the wizard because you will need to use variables.

        I will provide an example using the wizard attached to this post that shows how to create a break even using the wizard.

        For your other question about the trail, what is your CalculateOnBarClose setting set to for the strategy?
        That may be the cause if it is set to true depending on the chart type. If you are comparing an ATM strategy trail to a Strategy Wizard trailing stop there will be some differences as the ATM strategy will be running in real time on each tick, with the strategy this will depend on the CalculateOnbarClose setting or the type of chart it is running on.

        I look forward to being of further assistance.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X