Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is this solved: limitation for ExitOnClose working "live" ?

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

    Is this solved: limitation for ExitOnClose working "live" ?

    Hi ninjas,

    Cause I'm about to initiate operation with my Algo, I was just reading any possible issues to be aware of.

    I've just read this thread:


    and I wonder if I go in a standard forex session 24/7 might have some problems as written there? I mean: if I select in the strategy "Exit on close" would be that good enough or had I code my own exit on close strategy?

    Thanks

    #2
    Hello pstrusi,

    While, a 24/7 session template will work better, you still may experience the same limitation that Bertrand was talking about in the thread that you linked.

    So you may want to code your own exits to make sure that your strategy is exiting when you would like it to.

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      A simple loop like this, should do the job:

      while (ToTime(Time[0]) >= 165955 && ToTime(Time[0]) <= 170500)
      {
      ExitLong(); ExitShort(); // Close positions and do nothing more
      }
      // From here continue the Algo

      Comment


        #4
        Hello pstrusi,

        You do not have to do it in a loop, but yes that would work.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        118 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        166 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        85 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        130 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        89 views
        0 likes
        Last Post PaulMohn  
        Working...
        X