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 DanielTynera, Today, 01:14 AM
        0 responses
        2 views
        0 likes
        Last Post DanielTynera  
        Started by yertle, 04-18-2024, 08:38 AM
        9 responses
        40 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by techgetgame, Yesterday, 11:42 PM
        0 responses
        12 views
        0 likes
        Last Post techgetgame  
        Started by sephichapdson, Yesterday, 11:36 PM
        0 responses
        2 views
        0 likes
        Last Post sephichapdson  
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,615 views
        0 likes
        Last Post aligator  
        Working...
        X