Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose phantom issue

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

    ExitOnClose phantom issue

    I initiated a strategy, to find that it 'entered' trades several weeks ago. The strategy is running in simulation mode, and began at -$45000 of unrealized profit.

    Is this previous order simply a function of running a strategy in simulation mode ?

    Also-- does ExitOnClose close orders on any certain date/time ? Or will orders be held indefinitely until exiting if ExitOnClose=false ?
    Last edited by Faspomy; 10-29-2008, 07:48 AM.

    #2
    Faspomy,

    When you start a strategy and it has a virtual position it is just tracking the position of what you would have if you were running that strategy live against a real account.

    ExitOnClose happens at the end of each session. If you have this turned off your orders will stay open until you close it.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      When you start a strategy and it has a virtual position it is just tracking the position of what you would have if you were running that strategy live against a real account.
      Okay, but that won't draw-down a live account ? I just want to make sure.

      Comment


        #4
        Not sure what you mean by "draw-down a live account". Can you please clarify? Thank you.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Not sure what you mean by "draw-down a live account". Can you please clarify? Thank you.

          ControlCenter, Strategies Tab,

          when initiating a strategy, shows a number of positions (previously opened) and unrealized and realized balances. Some of the balances are drawn-down considerably at the start of the strategy.

          I would like to only see the number of positions made since the strategy began (no previous data), and only the balances created since the strategy was started.

          Will this be the case in Live mode (versus simulated mode) ? Or is there another way to turn this feature off ?
          Last edited by Faspomy; 10-29-2008, 10:33 AM.

          Comment


            #6
            Nope. They will behave exactly the same as you are experiencing right now. If you want to not have your strategy perform historical trades you will want to add this condition at the top of your OnBarUpdate() method in your strategy:

            Code:
            if (Historical)
                 return;
            This line will prevent your strategy from running on old data and will only run going forward. It will also prevent backtesting.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thank you again Josh.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              580 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              335 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              102 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              554 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              552 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X