Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with premature termination of the session

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

    Problem with premature termination of the session

    Good afternoon! Please tell me how I can avoid placing an order if the session ends earlier. How do I determine the end time of a session programmatically? At the moment my robot is working in unmanaged mode and when the session ends before the set settings it tries to place an order until it reaches the deposit limit

    #2
    Hello Papercut110,

    Thanks for your post.

    You can access and use the "session Iterator" to pull the next session's Open/close times.

    References:

    All session iterator methods and properties: https://ninjatrader.com/support/help...oniterator.htm

    Actual session begin: https://ninjatrader.com/support/help...ssionbegin.htm

    Actual session end: https://ninjatrader.com/support/help...sessionend.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello NinjaTrader_PaulH, thanks for the hint, but will this work on market replay?

      Comment


        #4
        Hello Papercut110,

        Thanks for your reply.

        Yes.

        All instruments have defined trading hours and all trading days that are "scheduled" to be less than full trading days are also defined in the database. When the session iterator is run it will access that information which you can then create your logic to react to.


        Paul H.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_PaulH, Great, thanks, I'll try!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by yodaler, Today, 06:12 PM
          0 responses
          2 views
          0 likes
          Last Post yodaler
          by yodaler
           
          Started by op1031, Today, 05:16 PM
          0 responses
          1 view
          0 likes
          Last Post op1031
          by op1031
           
          Started by fscabrera03, Today, 01:18 PM
          1 response
          11 views
          0 likes
          Last Post fscabrera03  
          Started by BottomShark77, Today, 12:20 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by bowling, Today, 06:16 AM
          3 responses
          29 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Working...
          X