Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Programming with User-Adjustable ATM

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

    Strategy Programming with User-Adjustable ATM

    Hi everyone,

    I’m working on building a strategy in NinjaTrader and I’m looking for some guidance on how to structure it properly.

    What I’d like to achieve is this:
    • When a certain condition is met the strategy should open a new position. (I assume with EnterLongLimit() / EnterShortLimit() )
    • Once the trade is open, I want it to trigger an ATM strategy.
    • The ATM parameters (like profit target and stop loss will be set upfront) but the user will be able to adjust it directly from the chart, just like a normal ATM trade.

    I’m aware of the difference between NinjaScript strategies and ATM strategies, and I know that mixing them can be tricky. But I’m hoping there’s a way to initiate an ATM strategy from NinjaScript that still allows flexibility for the user to tweak the settings via the UI.

    Any examples, tips, or direction would be hugely appreciated. I’ve looked into AtmStrategyCreate() but I’m not sure how to keep the setup dynamic and interactive.

    Thanks in advance!

    #2
    Hello MattDavid,

    Thank you for your post.

    Through ATM Strategy Methods, your NinjaScript Strategy generates trade signals for an ATM Strategy, which would trigger an ATM Strategy/template.
    Because NinjaScript Strategies are only handling the entry/close signals, ATM Strategy methods like AtmStrategyCreate() can already accomplish what you have described.

    ATM parameters would depend on the template you have selected.
    ATM Strategies themselves are managed separately and appear on the Chart Trader. So they can be adjusted just like any other ATM Strategy.
    AtmStrategyCreate() will use the template you specify, so if you wish to adjust this template dynamically, you will need to save any changes you've made to a template with the same template name.

    ATM methods must be coded from within the NinjaScript Editor:Additionally, you may reference the SampleAtmStrategy script that is included in the platform.
    Testing this out on a chart will show you how you can manually adjust the ATM strategy from the UI on the chart, just like any other ATM strategy.

    Please let us know if we may be of any further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X