Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy from code

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

    ATM strategy from code

    Goal: I want to create dynamic ATM strategies from within an automated strategy.

    Problems:
    - ATM strategy is not and will not be a saved template previously used. Currently, the only way I see to call an ATM strategy is use its string name as a parameter.
    - According to the documentation, if the ATM strategy is not entered correctly, it may not cancel correctly possibly leaving stray orders.

    Questions:
    1) Is it possible to call the ATM form, adjust all of the values, then submit the form just like clicking ok?
    2) If #1 is not possible, what about AtmStrategy = new AtmStrategy() { ...intialize all of the properties };
    3) With either of these methods, will the atm strategy currently named "<Custom>" get renamed then tracked correctly by NT? I assume that underneath, NT checks for the atm name "<Custom>" then changes that to the next psuedo atm and inserts that into the .sdb
    4) Are there specific events that I would need to hook up to for this to work properly?

    Reasons/Why:
    My strategy is a harmonic pattern strategy which calculates target1, target2, and initial stoploss based on the size and type of pattern. Once target1 is achieved, the ATM should move the initial stoploss to the entry price.

    #2
    To paraphrase, which function and/or object should I call that will cascade all of the appropriate NT functionality just like the values were manually entered on the ATM form?

    Comment


      #3
      Hello jasonnator,

      There is not a way to dynamically create an Atm Strategy from a NinjaScript Strategy in this manner. A pre-saved template is required.

      If you are wanting more complex logic, do not use Atm Strategies from the NinjaScript Strategy and control the entries, breakeven, and trail logic within the code directly.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hello jasonnator,

        Atm Strategies can be made on the SuperDOM or within Chart Trader.

        I am including a few links to the NinjaTrader YouTube channel training vidoes on this.

        ATM Level 1 - https://www.youtube.com/watch?v=lvLc...DD7105&index=9
        ATM Level 2 - https://www.youtube.com/watch?v=_wEs...DD7105&index=6

        As well as the help guide.

        Tutorial 1 - http://www.ninjatrader.com/support/h...y_example_.htm
        Tutorial 2 - http://www.ninjatrader.com/support/h...y_example2.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        71 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        43 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        25 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        28 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        56 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X