Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnSessionCloseSeconds doesn't work with conditional input

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

    ExitOnSessionCloseSeconds doesn't work with conditional input

    Hello,

    I wanted to also optimize ExitOnSessionCloseSeconds, with not just default 30 seconds, but XOSC * 60 (variable multiplied by seconds in a minute).

    Yet it doesn't work, no matter what number I input at XOSC, it always exits at the same time.

    Can this be manipulated? And if default method is not able to achieve it, maybe there's a way to get session end time value, so I could check, like Time[0] > EndTime - XOSC *60, then it would exit.

    #2
    Hello UltraNIX,

    Thank you for your note.

    Are you seeing this in a backtest, or on real time data? ExitOnSessionCloseSeconds is a real time only property and wouldn't have any effect when running the strategy on historical data, such as in a Strategy Analyzer backtest or on historical data on a chart.

    That being said, it is possible to modify this based on a variable. I'm attaching an example script that will override any user input setting for this in State.Configure by using a variable * 60.

    This will only work in real time, so you can either test on a live chart using the Sim101 account or using Market Replay data with the Playback connection.

    Please let us know if we may be of further assistance to you.

    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Yes, I was trying to run it on Historical data. I will try to test it on Market Replay data. Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by facuevasm, Today, 07:28 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ballston, Today, 06:32 AM
      0 responses
      7 views
      0 likes
      Last Post ballston  
      Started by Lando Calrissian, Today, 07:30 AM
      0 responses
      1 view
      0 likes
      Last Post Lando Calrissian  
      Started by Leeroy_Jenkins, Today, 03:45 AM
      0 responses
      13 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by sinpeople, Today, 04:38 AM
      0 responses
      10 views
      0 likes
      Last Post sinpeople  
      Working...
      X