Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

exit on session close is missing in Strategy Analyzer

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

    exit on session close is missing in Strategy Analyzer

    Hello,

    I was wondering, why can I put "Exit on session close" second value when running strategy live (or in replay mode) - but I cannot set it when running strategy from Strategy Analyzer (the text field won't show in strategy analyzer although I can check the "Checkbox" to exit on session close in both cases...)?

    Is there a reason for it - or is it a bug? What if I want to "BackTest" but let's say exit an hour before session closes in Strategy Analyzer (and live as well)? Of course I can change that property programmatically within a script, but though there should be a parameter for it as well when displaying in Strategy Analyzer.

    Thanks

    #2
    Hello music_p13,
    Thanks for your post.

    ExitOnSessionCloseSeconds is a real time property only and will not work in a backtest. Please see the following link for more information: https://ninjatrader.com/support/help...oseseconds.htm

    If you want to emulate this exit 30 seconds before the session close I would add a 30 second series to the strategy and then base some exit logic on that series.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thanks, I was also thinking about it...

      As a follow up question - how can I know programmatically when the session will end (at least for historical data)? Example - I want to exit 1 hour before session closes, but I want it to work on some other days including trading days that have different trading hours (like holidays or pre-holidays)? How to determine End of Session time at the beginning of each new session day (ex, on the first tick of the session start)? That way I can dynamically modify my actual position close time based on End of current session time minus 1 hour for example...

      Thanks

      Comment


        #4
        music_p13,

        You could use ActualSessionEnd for the end session time: https://ninjatrader.com/support/help...sessionend.htm

        For historical data you would need to construct and store your own session iterator object based on the bars series array you want to use. Here is the help guide for the session iterator object: https://ninjatrader.com/support/help...oniterator.htm
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        0 responses
        5 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        11 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        5 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X