Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy question

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

    #31
    I have another question about orderID and atmStrategyId. If they are checked, additional orders should not be executed? The sample strategy just keeps entering orders.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #32
      eDanny,

      That does not happen on my end. On the sample strategy it will enter once and then in the Output Window as long as that strategy is active it will keep printing things like this:

      The current ATM Strategy market position is: Flat
      The current ATM Strategy position quantity is: 0
      The current ATM Strategy average price is: 0
      The current ATM Strategy Unrealized PnL is: 0
      The entry order average fill price is: 0
      The entry order filled amount is: 0
      The entry order order state is: Working
      The current ATM Strategy market position is: Flat
      The current ATM Strategy position quantity is: 0
      The current ATM Strategy average price is: 0
      The current ATM Strategy Unrealized PnL is: 0

      If it prints that it will never enter continuously.
      Josh P.NinjaTrader Customer Service

      Comment


        #33
        Grrr, every time I tried it, multiple entries have occured, starting with those tests yesterday.

        Ok, quit my other strategy so output window isn't cluttered and trying again.
        Last edited by eDanny; 01-28-2009, 12:20 PM.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #34
          I see the constant output whereas my strategy only prints that type of status when in a position.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #35
            The constant output should occur as you are in a position. As you are in a position the sample should never enter a new entry.
            Josh P.NinjaTrader Customer Service

            Comment


              #36
              If my strategy is running on two charts with the same instruments, how can I check to see if there is an open position on one chart to prevent another entry? Got a feeling there is no way to tell.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #37
                No way to tell.
                Josh P.NinjaTrader Customer Service

                Comment


                  #38
                  Originally posted by eDanny View Post
                  If my strategy is running on two charts with the same instruments, how can I check to see if there is an open position on one chart to prevent another entry? Got a feeling there is no way to tell.
                  I would suggest you break your code into states for example so in your code it deals with multi signals happening at once and you are not falling back on anything other than your code

                  Code:
                  //method 1
                  if(XXX || YY && openorder == false)
                  {
                  method1 = (true);
                  }
                  Then do something like this
                  Code:
                      if (method1 == true && openorder == false) 
                  {
                  atmStrategyId = GetAtmStrategyUniqueId();
                  orderId = GetAtmStrategyUniqueId();
                  AtmStrategyCreate(Action.Sell, OrderType.Limit, Close[0], 0, TimeInForce.Day, orderId, "ATMTemplate", atmStrategyId);
                  openorder = (true);
                  }
                  Remember to set your variables back to a reset state once your account is flat again.

                  Side note this is an example ONLY.

                  Hope that helps.
                  CiRioN

                  Comment


                    #39
                    Don't believe that would do anything since the strategy on another chart would not know openorder=true.
                    eDanny
                    NinjaTrader Ecosystem Vendor - Integrity Traders

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    624 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    359 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    562 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    567 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X