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 NullPointStrategies, Today, 05:17 AM
    0 responses
    51 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    129 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X