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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X