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 Barry Milan, Today, 10:35 PM
                  1 response
                  6 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by WeyldFalcon, 12-10-2020, 06:48 PM
                  14 responses
                  1,427 views
                  0 likes
                  Last Post Handclap0241  
                  Started by DJ888, Yesterday, 06:09 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by jeronymite, 04-12-2024, 04:26 PM
                  3 responses
                  40 views
                  0 likes
                  Last Post jeronymite  
                  Started by bill2023, Today, 08:51 AM
                  2 responses
                  16 views
                  0 likes
                  Last Post bill2023  
                  Working...
                  X