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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        59 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X