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

Using the "High" Order Fill Resolution

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

    Using the "High" Order Fill Resolution

    I have written a strategy for NT8 that uses both the 1-minute and 3-minute data series for the same instrument. I would like to backtest this strategy using the "High" Order Fill Resolution but I come up with the following error message:

    "High" order fill resolution is only available for single-series strategies. For multi-series strategies, please program directly into your strategy the more granular resolution you would like to simulate order fills with."

    Since I am new to editing strategies, could you tell me what exactly I need to add to the strategy to run the High resolution? Thanks for your help.

    LarryRay

    #2
    Hello LarryRay,

    Thanks for your post.

    What High Order fill does is automatically add a data series of whatever you select for the fill processing. What happens is your code places an order but the order does not fill until the next bar. If you want the order to fill sooner you need a more granular series which is what high order fill can provide.

    You would need to add a data series to your code of whatever you would have selected for the high order fill processing. In the OnBarUpdate, when that series calls onBarUpdate() you would need to return; For example:

    if (BarsInProgress == 2) return;

    BarsInProgress 0 is the chart bars
    BarsInProgress 1 is the first added dataseries.
    BarsInProgress 2 would be the high order fill bars you add.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      Thank you Paul for your explanation. I will go ahead and modify my strategy as you suggested.

      LarryRay

      Comment


        #4
        Hi i have the same issue when i try to create a strategy. Can you please explain how i add the data series that is needed for High resulution order fill. I cant find it in the strategy builder

        Comment


          #5
          Hello All,

          The code must be unlocked and edited through the editor to use the special order entry methods that take a BarsInProgress index. In my example script, the one tick series is BarsInProgress == 1.

          Below are the special order entry methods used in the modified script:

          EnterShort(int barsInProgressIndex, int quantity, string signalName)
          EnterLongint barsInProgressIndex, int quantity, string signalName)

          I have attached a modification of the SampleMACrossover strategy that will place its orders on a 1 tick series. Use AddDataSeries() to add the one tick series in State.Configure.

          See here for instructions on importing the strategy:


          Please let us know if we can assist further.
          Attached Files
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            Hi _ChrisL, I wanted to test your strategy from above with the mode HiFillResolution, since only the following error message comes:

            Click image for larger version

Name:	Screenshot_5.jpg
Views:	1039
Size:	323.6 KB
ID:	1156765


            This is the same error message I get in my own strategy. what am I doing wrong?
            sidlercom80
            NinjaTrader Ecosystem Vendor - Sidi Trading

            Comment


              #7
              Hi sidler thanks for your reply.

              This means you have an extra data series in the script and will not be able to use high order fill resolution through the user interface. You will need to add a 1 tick series to your strategy with AddDataSeries then submit your order upon that series using the special overload that takes a BarsInProgressIndex e.g.

              EnterLongLimit(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double limitPrice, string signalName)

              So if your 1 tick series was the third added data series, barsInProgressIndex will = 2.

              Our colleague Chelsea has also made an informative post on intrabar granularity here:

              https://ninjatrader.com/support/foru...ive#post773377

              Best regards,
              -ChrisL
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                Yes I already understood that, but why does your script from above not work? or is it not suitable for "High" Order Fill Resolution?

                Post #5 TickSeriesMACross.zip (2.8 KB, 92 views)
                Last edited by sidlercom80; 05-20-2021, 09:52 AM.
                sidlercom80
                NinjaTrader Ecosystem Vendor - Sidi Trading

                Comment


                  #9
                  Hi sidler, thanks for your reply.

                  No, it will not work with high order fill resolution set. It is already adding a 1 tick data series and it is already using that series to submit the order.

                  Best regards.
                  Chris L.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NRITV, Today, 01:15 PM
                  2 responses
                  8 views
                  0 likes
                  Last Post NRITV
                  by NRITV
                   
                  Started by frankthearm, Today, 09:08 AM
                  7 responses
                  31 views
                  0 likes
                  Last Post NinjaTrader_Clayton  
                  Started by maybeimnotrader, Yesterday, 05:46 PM
                  5 responses
                  26 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by quantismo, Yesterday, 05:13 PM
                  2 responses
                  19 views
                  0 likes
                  Last Post quantismo  
                  Started by adeelshahzad, Today, 03:54 AM
                  5 responses
                  33 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Working...
                  X