Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsInProgress Order Expiration

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

    BarsInProgress Order Expiration

    Hello

    I have a strategy running on 15minute bars.
    Recently, I've added an underlying 1 minute bar with

    Add(PeriodType.Minute,1); in Initialize();

    In the OnBarUpdate() i've added

    if(BarsInProgress != 0)
    return;

    With this, absolutely nothing should change.

    BUT, orders added in the 15minute bar gets cancelled by the 1minute bar ... This shouldn't happen. What can i do ?

    #2
    This would be expected behavior, they will expire on the next OnBarUpdate() call with the managed approach. You would either need to

    a) resubmit until filled
    b) submit with liveUntilCancelled set to 'true' in the advanced order method overload

    Comment


      #3
      how to clear or remove the order filled on the chart. thanks

      hi,
      please let me know how to clear the order has filled on the chart.
      thanks

      Comment


        #4
        Is there any supported method to running a recurrent timer inside a strategy ?

        Is the classic .NET timer alright ?

        Comment


          #5
          tinale, in the future we would appreciate you starting a separate, new thread on your new question / topic. Thanks.

          You can remove the execution from display under the PlotExecutions section in your DataSeries dialog box for each chart, or you would need to reset the sim account / database to physically remove it from NT's tracking (under Tools > Options > Data).

          Comment


            #6
            Originally posted by zark.be View Post
            Is there any supported method to running a recurrent timer inside a strategy ?

            Is the classic .NET timer alright ?
            You can work with this example posted here - http://www.ninjatrader.com/support/f...ead.php?t=5965

            Comment


              #7
              Works like a charm.

              Whats with the 100 events limitation ?

              **NT** Error on triggering custom event for strategy 'NFV8__USD_NOK/1251ca02a0ed4498861b90d68505696d': More than 100 subsequent user events

              Comment


                #8
                Great, here's some background on that item you ran into - http://ninjatrader.com/support/forum...ad.php?t=16359

                Comment


                  #9
                  Okay, so basically you count the number of method calls in a onbarupdate to avoid users creating infinite recusions.

                  You really should mention that limitation in the documentation.
                  Any way to reset that counter (for power users who know how to code and won't create infinite loops) ?

                  Comment


                    #10
                    Correct, will request to have it added to our docs. What you would need to work with is the MaxProcessedEvents property in the script Initialize().

                    Comment


                      #11
                      thanks for reply.
                      what is Kinetick ninja Trader, EOD ( free end of user).....please tell details about this.how to comparable with Ninja trader 7 COQ
                      Thanks

                      Comment


                        #12
                        EOD Kinetick ninia trader

                        ]thanks for reply.
                        what is Kinetick ninja Trader, EOD ( free end of user).....please tell details about this.how to compare with Ninja trader 7 COQ
                        Thanks

                        Comment


                          #13
                          Please post your question in a new thread and we will take it from there. Thanks.

                          Comment

                          Latest Posts

                          Collapse

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