Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    BertrandNinjaTrader Customer Service

    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).
          BertrandNinjaTrader Customer Service

          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
            BertrandNinjaTrader Customer Service

            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
                BertrandNinjaTrader Customer Service

                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().
                    BertrandNinjaTrader Customer Service

                    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.
                          BertrandNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by jpeep, 08-16-2020, 08:31 AM
                          17 responses
                          502 views
                          0 likes
                          Last Post notenufftime  
                          Started by ETFVoyageur, 05-07-2024, 07:05 PM
                          15 responses
                          124 views
                          0 likes
                          Last Post ETFVoyageur  
                          Started by esmall, Today, 07:14 PM
                          0 responses
                          9 views
                          0 likes
                          Last Post esmall
                          by esmall
                           
                          Started by Option Whisperer, 05-09-2024, 07:58 PM
                          6 responses
                          26 views
                          0 likes
                          Last Post Option Whisperer  
                          Started by rayyyu12, Today, 05:38 PM
                          0 responses
                          12 views
                          0 likes
                          Last Post rayyyu12  
                          Working...
                          X