Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy limit order is not filled

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

    #16
    Please do this:

    Email in compressed format

    - The historical data
    - Your strategy
    - An image of your backtest dialog settings to reproduce whats described in post #13

    Send to our support email address attention to Ray.
    RayNinjaTrader Customer Service

    Comment


      #17
      Thanks.

      It is working as expected. If you look at the executions tab, you will see the order was filled on 9/20/07 at 10:33 AM against the 1 minute series. What happens is when NT plots an execution it finds the first bar where the time stamp will not be exceeded. So, the execution time stamp is greater than the daily bar time stamp of 9/20/07 12:00 AM and thus it gets plotted on the next bar.

      I will put this on our list to review if it can be improved.
      RayNinjaTrader Customer Service

      Comment


        #18
        Hi Ray,

        thanks a lot for the investigation. An please consider to trace the order execution in the output log since TraceOrders is set to true (only the order placement is logged).

        Should have had a look at the executions tab too but somehow it was out of my mind.

        As next step I will reinsert the time limit for the order/position, let's see how that works.

        Thanks
        Ralph

        Comment


          #19
          Hi Ray,

          some more questions regarding this testcase:

          1) ExitOnClose has to be located in OnBarUpdate(), it's not recognized when placing it in Initialize()?

          2) Removing the ExitOnClose statement from the testcase prevents the order from execution the next day (I checked it this time with the execuions tab). Does that mean that the order is first submitted under if(BarsInProgress==0) {...} and then cancelled immediately after that (and not the next day as suggested in the output log)?

          3) What is best practice to submit the order at the end of the trading day valid just for the next trading day for this testcase? Of course I want to backtest in the 1 minute timeframe. Could I implement something like that:
          if (BarsInProgress == 0) {
          if (ExitOnClose == true) ExitOnClose == false;
          if (EntryOrder != null) CancelOrder(EntryOrder);
          EnterLongLimit(1, true, 1, Price, "Buy limit");
          }
          OnExecution() {
          Test EntryOrder and reset if appropriate;
          }

          Regards
          Ralph

          Comment


            #20
            1) Its overriddent by the parameter in the strategy dialog which is hidden from view (but still there) when daily bars is selected. That's why I suggested setting it on 1st call to OnBarUpdate().

            2) You placed the order on close of 9/19 against the 1 min series, when 1 minute series gets to 9/20/ 12 AM, it triggers end of session handling giving you the result of it being cancelled right away

            3) You could try that
            RayNinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_Ray View Post
              1) Its overriddent by the parameter in the strategy dialog which is hidden from view (but still there) when daily bars is selected...
              What about unhide ExitOnClose for daily bars? It is still meaningful for multi-timeframe strategies like this and it would be meaningful for daily-bars-only strategies: True: Orders are valid and positions are kept open until closed by the program, False: Ordes are cancelled at the end of next daily bar and positions are closed with the daily close price.

              Regards
              Ralph

              Comment


                #22
                We are reviewing that.
                RayNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                600 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                347 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                558 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                558 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X