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 bortz, 11-06-2023, 08:04 AM
            47 responses
            1,607 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            9 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            19 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            6 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            15 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X