Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with trade exits

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

    Problems with trade exits

    Having a problem trying to figure out why my stratgey exits too soon sometimes

    It seems kind of random, I don't know how to debug it. Can someone help please?

    Thanks


    Please see attached
    Attached Files

    #2
    Hello fxmutual,

    What are you expecting your strategy to do and what are the results that you are getting?

    Is there a reproducible scenario where it will exit soon?

    When working with orders and their behavior, it is useful to use TraceOrders so you can trace orders placed, amended, and cancelled. For more information about TraceOrders you may view the following link.
    http://www.ninjatrader.com/support/f...ead.php?t=3627

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      That was just what I needed! Thanks a million!

      Ok, so know I know that the problem is at 4PM if I am in a trade it closes it automatically. Output says " Canceled order due to end of session handling".


      I don't have any sessions times defined. I am brand new, maybe later. Just want to get a simple one under my belt and move on.

      What do I need to do to?

      In "Session Manager"...my default session is "24/7. I am trading the EUR/USD with FXCM

      I have been searching but can't find anything that seem to reference this issue so far.

      Comment


        #4
        Hello fxmutual,

        The session that is applied to the time frame of your instrument would be applied to your strategy. One thing, as well you can change the Time in force (TIF) to be good until canceled (GTC) rather than just for the day. For example:

        protected override void Initialize()
        {
        // Sets the TIF to Good Til Canceled
        TimeInForce = Cbi.TimeInForce.Gtc;
        }

        http://www.ninjatrader.com/support/h...imeinforce.htm

        Note if you using this strategy on a simulator you would want to use the ExitOnClose property to be able to handle strategy generated orders at the close of the session. For example if you wanted to keep your orders you would set ExitOnClose = false.

        http://www.ninjatrader.com/support/h...xitonclose.htm

        Happy to be of further assistance.
        Last edited by NinjaTrader_JC; 07-31-2012, 01:25 PM.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        661 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        375 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X