Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy order with name "Close Position"

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

    #16
    I did walk-forward testing (on 4-9-10) again using a strategy created in the strategy wizard. I still got an erroneous "Close position" order submitted that ended up doubling and tripling my position in the wrong direction.

    The strategy is different, not a Stop and Reverse. It has exits that are different than the opposite entry direction. Could it be that this occurs when the exit (to close a position) and the entry (to open a position in the opposite direction) happen to occur on the same bar?

    Comment


      #17
      Hello,

      I will have someone reply to you on Monday. Thank you for your patience.
      DenNinjaTrader Customer Service

      Comment


        #18
        NTWolfe, this could happen if you issue duplicative orders - you would likely need to analyze what you do / issue with our TraceOrders feature -



        If you like you can also send a strategy exhibiting this to support at ninjatrader and my Attn and I will take a look here on my Market Replay.

        Thanks

        Comment


          #19
          It happened again today, could the strategy wizard be flawed when it creates a strategy. I don't think it is as I have unlocked the code created by the strategy wizard and there is nothing that is labelled "close positon" within the code, maybe it is the platform itself or the bar type, I don't know.

          What is the actual e-mail address I should send a copy of the strategy to?

          Once I add the TraceOrders code what do I do with the information it generates?

          One other thing:
          Under the options category in strategies there is a button for "On starting a real-time strategy" that gives the option to either "Wait until flat before executing live" or "Immediately submit live working historical orders". I use market orders and have the Immediately submit live working historical orders button checked. Could this be the reason for getting the extra "close position" order submitted along with my predefined exit order.
          Last edited by NTWolfe; 04-14-2010, 08:35 PM.

          Comment


            #20
            NTWolfe, you can contact me at support at ninjatrader dot com Attn Bertrand.

            Close Position is needed to reverse, for example when you short 1 contract to go net long 1 contract you need to buy 2, one to close the open short, the second to get you long then.

            Are you 100% sure you're synced up properly as you start trading it?



            Yes, if you select the 'Immediately Submit' option and do not take care to sync, the issue could easily show up, have you tried to WaitUntilFlat to then the next freshly generated entry from the strategy?

            TraceOrders info can be found here -


            Trace

            Comment


              #21
              This seems to have corrected the situation, today on live data I did not recieve the extra order "close position"

              For any others that may have the same issue:

              Under the options category in strategies there is a button for "On starting a real-time strategy" that gives the option to either "Wait until flat before executing live" or "Immediately submit live working historical orders". I use market orders and have the Immediately submit live working historical orders button checked. Switching it to "Wait until flat before executing live" seems to have stopped it on today's run through.

              Thank you for your patience Bertrand.

              Comment


                #22
                I allowed the strategy to run on live data today and got some pretty bizarre behavior (see attached photo), anyone ever seen anything like this?

                On this it still generated the infamous "close position" order and the sim 101 account was in sync (flat) before the strategy began to generate orders. This order still doubled the position in the wrong direction.

                One more question. I ran the same strategy on 4 different symbols. Two of these symbols submitted these erratic orders as seen on the photo, the other two submitted no orders at all. Does Ninjatrader only allow a certain number of symbols to be strategy-tested at the same time.?
                Attached Files

                Comment


                  #23
                  In reference to the two charts that had a strategy running but did not generate trades.

                  CL is one and SI is the other. Orders created in the stategy wizard are Market Orders (Enter Long or Enter Short).

                  However I noticed that even when trying to enter a market order manually it does not get filled. In Control Center under the Orders Tab in the column listed "State" it just continues to say "Working".

                  I am using the Sim101 account and a live data feed via Barchart.com.
                  Last edited by NTWolfe; 04-26-2010, 08:51 PM. Reason: add further information

                  Comment


                    #24
                    NTWolfe, there's no limit # of strategies you could monitor.

                    Are you getting live Level 1 data in the Control Center for the CL and SI expiries you choose to trade?

                    Comment


                      #25
                      No I checked and it is delayed data, thanks for your insight. Will update to real-time for those 2 symbols.

                      Comment


                        #26
                        You're welcome, please let me know how it goes then.

                        Comment


                          #27
                          Close Position

                          I am using NT 6.5 with a Zen-Fire data feed (real-time data). The strategy was created in Strategy Wizard, I am not a programmer. For the last 2 days I have allowed my strategy to run on about 5 different symbols. I am using Range charts. The Sim 101 account, and positions, are flat before starting the strategies (in sync). The orders are market orders.

                          This order with the name "Close Position" continues to get submitted at some point in the day which ends up doubling or tripling my position on successive entries.

                          This is what occurs: (Order Action, # contracts, Name of order)

                          1. Sell- it is a short Entry order 1 contract and the name is what I have created in my strategy "SE"
                          2. Buy- the next order submitted is a short Exit order for 1 contract and the name is "Close Position" (instead of "SX" which is the order that should be submitted according to the strategy.

                          At this point I am Flat as I should be position-wise. Next:

                          3. Buy- a long Entry order for 1 contract and the name is what I have created "LE"
                          4. Sell- an exit order for 1 contract and the name is what I have created in my strategy "LX"
                          5. Sell- a short Entry order for 1 contract and it is the "Close Positon" order (this is not part of my strategy)
                          6. Sell- another short Entry order, the correct one, for 1 contract at the same price as the previous order and it is what I have created in my strategy "SE"

                          At this point now I am short 2 contracts and this continues to happen throughout the day.


                          It is not part of my strategy, I simply have Long Entry/Exit and Short Entry/Exit orders.

                          I am at a loss as to why this happens.
                          Last edited by NTWolfe; 07-20-2010, 07:50 PM. Reason: add more info

                          Comment


                            #28
                            NTWolfe, could you please post the code you're using? If you have both ExitShort() and EnterShort() in your strategy, there could definitely be situations where you get short two contracts if the exit and entry are called on the same bar.
                            AustinNinjaTrader Customer Service

                            Comment


                              #29
                              Here is the code

                              To keep it simple I only used the Donchian Short and Quantity variables when running the strategy with real-time data, the other variables are not used.

                              I saved it as an MS Word document and added it to a zip file.


                              Last edited by NTWolfe; 08-04-2010, 06:27 AM. Reason: Update

                              Comment


                                #30
                                Could you please reattach the zip or send it directly to support at ninjatrader dot com? Thanks

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                648 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                369 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                109 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                573 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                575 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X