Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Flatten by account automatically in NT8

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

    Flatten by account automatically in NT8

    Hi,

    Is there a way to set up an automatically flatten everything at the EOD for a particular account in NT8? I want to run a trading strategy where all positions are closed at the EOD however will not always be in front of the screen to do it.

    I have read the manual but could not spot it.

    Thanks
    Robbo

    #2
    Hello Robbo,

    Thanks for your post and welcome to the NinjaTrader forums!

    When you apply the strategy, in the "Order handling" parameters you can set the ExitOnClose to true and the ExitOnClose seconds to close all positions and orders at however many seconds before the end of session. By default the ExitOnClose is set to true and the ExitOnClose seconds is set to 30 meaning that 30 seconds before the end of the session the ExitOnClose will close positions and close any open orders created by the strategy. Caution: If you have changed the trading hours of the dataseries this may impact when ExitOnClose functions as the ExitOnClose relates to the trading hours assigned to the data series.
    Reference: http://ninjatrader.com/support/helpG...t_strategy.htm

    In addition, under Tools>Options>Trading you have the ability to "autoclose" all instruments, or specific instruments, at a specified time. Reference: http://ninjatrader.com/support/helpG...ns_trading.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    6 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    41 views
    0 likes
    Last Post alifarahani  
    Working...
    X