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

'Break at EOD' & 'Exit on session close' parameter to avoid open trades overnight

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

    'Break at EOD' & 'Exit on session close' parameter to avoid open trades overnight

    Hi,

    Is my understanding of the following correct?

    If 'Break at EOD' is checked FALSE and if a candle does not complete before the end of the day then the candle will continue through to the next day until it closes. If 'Break at EOD' is checked TRUE then the candle will close at the end of the day and a new candle will open at the start of the next day. If a strategy has an open trade at the EOD the 'Break at EOD' parameter has no means to close this open trade at EOD.

    If 'Exit on session close' is checked FALSE and if a strategy has an open trade at the end of the session then the strategy will not execute an order to close the open trade at the end of the session and the strategy will remain in a position through to the next session. If 'Exit on session close' is checked TRUE and if the strategy has an open trade at the end of the session then the strategy will execute an order to close the trade at the end of the session and the strategy would therefore be flat going into the next session.

    The time periods for the session will be determined by the template selected in the 'Trading hours' drop down menu for the strategy.

    The reason I'm seeking clarification is that I want to ensure that my strategies do not hold open trades overnight as I do not want to incur maintenance margin on my account. If I use the 'Exit on session close' parameter checked TRUE then will the strategy send an order to close the trade at the open of the last bar of the session or the close of the last bar of the session?

    Thanks,

    Neil

    #2
    Hello Neil,

    Thanks for your post.

    Yes, it seems that your understanding of these properties is correct.

    If you prefer the bar to satisfy to completion before creating a new bar, regardless of the time of day, you could have the Break At EOD property disabled.

    When the Break At EOD property is enabled, NinjaTrader will break its bars on each new end of day session. From the help guide: "With Break at EOD enabled, your bars are ensured to have a known starting point of which to give you a consistent, repeatable chart. This is especially important for bar types that are not based on time such as Volume and Tick based charts. However, for other bar types such as Range, Point and Figure, or others which are built around price action, enabling this property may cause bars to complete before their criteria has been satisfied."

    See this help guide for more information about Break At EOD and examples: https://ninjatrader.com/support/help...eak_at_eod.htm

    The Exit On Session Close property sets if the strategy will cancel all strategy-generated orders on all strategy instruments and close all open strategy positions at the close of ANY session for multi-time frame/multi-instrument strategies. The number of seconds before the actual session end time is determined by the number of seconds set for Exit On Session Close Seconds. Exit On Session Close Seconds is calculated based on the Trading Hours End of Day property set in the strategy's Trading Hours template. Trading Hour Templates are set up to contain the session start and end times of a specific market or instrument.

    When the Exit On Session Close property is disabled (unchecked) then NinjaTrader will not cancel all strategy-generated orders at the end of the trading session.

    If the Exit On Session Close property is enabled (checked) then NinjaTrader will cancel all strategy-generated orders at the end of the trading session.

    Exit On Session Close: https://ninjatrader.com/support/help...sestrategy.htm

    Please see this forum thread also for more information about Exit On Session Close and a strategy example demonstrating preventing entry after Exit On Session Close: https://forum.ninjatrader.com/forum/...ose#post100666
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
    6 responses
    26 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by PaulMohn, Today, 02:06 AM
    1 response
    2 views
    0 likes
    Last Post PaulMohn  
    Started by Mindset, Today, 01:27 AM
    0 responses
    4 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by EB Worx, 03-07-2023, 05:05 AM
    4 responses
    97 views
    1 like
    Last Post cls71
    by cls71
     
    Started by patricia70, 11-23-2020, 10:17 AM
    17 responses
    548 views
    1 like
    Last Post PaulMohn  
    Working...
    X