Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Start time

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

    Start time

    I am trying to use the start and finish time function when running my strategies however it seems that even if I set the start time more than 30 minutes from the current time the strategy still starts straight away. Has anyone else had this problem? I have downloaded the latest version of 6.5 (v3).

    #2
    Not sure I follow. You can not set session start/end time programmatically but only by the properties dialog.

    Comment


      #3
      Maybe this reference sample can be of some use: http://www.ninjatrader-support.com/v...ead.php?t=3226
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Sorry, I may not have explained myself properly. In the properties section you can set the start and finish time, correct? even if I set it to start later than the current time by any amount the strategy enters orders as soon as I press start and not waiting until the actual time I entered to start.

        Comment


          #5
          Correct, the strategy will start after session start.

          Comment


            #6
            I am trying to test a strategy and it seems to be ignoring the start time and starting immediately, regardless of how late I set the start time (and I am setting it in local time)

            Comment


              #7
              Not sure I follow. Please make sure there is data to backtest and debug your strategy as per here: http://www.ninjatrader-support.com/v...ead.php?t=3418

              Comment


                #8
                the strategy works fine. Here is an example.

                The current time is 5pm. I set it to start at 19:00. As soon as I press start though it begins trading immediately, even though it is before 19:00.

                Comment


                  #9
                  Please make sure you familiar with the "Historical" concept (search docs for "Historical").

                  To avoid that your strategy trades on historical data add this to your OnBarUpdate method:
                  Code:
                  if (Historical)
                      return;

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by alifarahani, Today, 09:40 AM
                  4 responses
                  21 views
                  0 likes
                  Last Post alifarahani  
                  Started by gentlebenthebear, Today, 01:30 AM
                  3 responses
                  16 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by PhillT, Today, 02:16 PM
                  2 responses
                  7 views
                  0 likes
                  Last Post PhillT
                  by PhillT
                   
                  Started by Kaledus, Today, 01:29 PM
                  3 responses
                  11 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by frankthearm, Yesterday, 09:08 AM
                  14 responses
                  47 views
                  0 likes
                  Last Post NinjaTrader_Clayton  
                  Working...
                  X