Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managing ATM execution within ninjascript

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

    Managing ATM execution within ninjascript

    hi ... I am writing a strategy that executes an ATM strategy upon meeting certain conditions. I need to ensure that I don't have more than one ATM strategy running at a given time. So I need help to know how to check to see if an existing ATM is running, and, if so, how to cancel it before executing a new one. Any advice is greatly appreciated. tx

    #2
    pman,

    I am happy to assist you.

    The SampleATMStrategy that comes with NinjaTrader as an example has a section that does this. Have you looked at this example or are you asking what part of it does this?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      thank you for your response ... i did review the example but i'm still not sure how to identify if an existing ATM strategy is running

      Comment


        #4
        pman,

        Essentially that example code tracks the ID of the ATM strategy. It resets it to be a empty string when it detects that the ATM strategy closed. atmStrategyId is how it tracks if there is an active ATM strategy or not.

        Code:
        else if (atmStrategyId.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId) == Cbi.MarketPosition.Flat)
        				atmStrategyId = string.Empty;
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          thanks ... will test that!

          Comment

          Latest Posts

          Collapse

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