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 twitch251, Today, 05:14 PM
      0 responses
      1 view
      0 likes
      Last Post twitch251  
      Started by robforee2, Today, 05:07 PM
      0 responses
      1 view
      0 likes
      Last Post robforee2  
      Started by blar58, Today, 03:16 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Melissa  
      Started by alcorr247, Today, 02:52 PM
      2 responses
      7 views
      0 likes
      Last Post robforee2  
      Started by Radano, Today, 02:30 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X