Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose

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

    ExitOnClose

    Hi,

    In general on NT, positions taken on futures contracts are usually exitted on close unless coded otherwise.

    How is that dealt with in FX which trades 24*7?
    And if you only wanted positions to be exitted on Friday evening ahead of the weekend, how would you code that?

    Regards

    kaywai

    #2
    Hello,

    Positions only exit on close if you set that to true when you start your strategy.

    This is based on the session template in use. Therefor you would need to change the session template you using to close at the correct time you would want this to close at.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      If I use <<instrument settings>> for the session template and the setting is "forex" and i have not indicated "exitonclose = true" in Initialize(), why, during backtesting on historical data is it exitting on close?

      Comment


        #4
        kaywai, have you tried setting ExitOnClose = false in Initialize()?
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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