Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM and MarketPosition

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

    ATM and MarketPosition

    Hi ... I have 2 questions:

    1) I am executing an ATM strategy from within my ninjascript code. When it's active (ie, I'm in a trade) my Position.MarketPosition call says it's "Flat" when in fact I'm "Long". What am I doing wrong ... how do I check my current trade position using an ATM strategy?

    2) If an ATM strategy is executing and I issue an "ExitLong()" or "ExitShort()", will it cancel the ATM strategy?

    thanks

    #2
    Hello pman777,

    1. Could you either post in the forums or send an email to support [at] ninjatrader [dot] com (In the body put ATTN: JC with reference to this thread) with a copy of a toy* of your NinjaScript code replicating the behavior so that I may be of further assistance.

    2. Using an ATM Strategy you would want to use the AtmStrategyClose() method to exit target orders and positions. See the following link for more information about the AtmStrategyClose() method.
    http://www.ninjatrader.com/support/h...ategyclose.htm


    Happy to be of further assistance.

    *Toy - a basic version of code that is not necessarily the entire logic/conditions. Making it easier to identify lines of code.
    JCNinjaTrader Customer Service

    Comment


      #3
      thank you ... after I submitted the post I saw that the call I should be using is GetAtmStrategyMarketPosition(orderId) ... I should be OK!

      Comment


        #4
        Hello pman777,

        You are quite welcome and as aways, let us know if we can be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          Actually, I do have another question. When I run my strategy in regular trading mode (ie, issue trades via EnterLong()/EnterShort() ) my chart looks fine. I get my trades plotted as expected. However, when I run it in ATM Strategy mode, my executed trades are not plotted. I'm running in 'real time' using market replay, so it doesn't seem to be a historical data issue. Any guidance is appreciated. tx

          Comment


            #6
            Hello,

            The Strategy methods and ATM Strategy methods are not the same.

            A strategy will only show trades that were made from Strategy methods.

            If you are calling ATM Strategy methods from your NinjaScript strategy, the chart with the strategy will not show these trades.

            You would need to open a second chart and set Chart Trader to the account you are running the strategy and it will show the orders generated by the ATM Strategy.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

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