Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RemoveLastBar

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

    RemoveLastBar

    Please someone help me on making an own RemoveLastBar in the custom bar type. I have a custom bar type that uses RemoveLastBar and as I have read in NT help guide Tick Replay doesn't work when bar type is using RemoveLastBar and I really need to use Tick Replay on my indicator that runs on my custom bar type. I tried adding 1 tick as secondary dataseries but it's not really the same with Tick Replay, Tick Replay is more close to real-time event.

    #2
    Hello luxurious_04,

    Unfortunately, it will not be possible to use TickReplay with a bar type that uses RemoveLastBar().


    I will submit a feature request on your behalf for the NinjaTrader Development to consider allowing this.

    Once I have a tracking ID for this I will post in this thread for future reference.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yeah I know that ChelseaB, I am asking for help on making own RemoveLastBar function. I will turn off the NT RemoveLastBar function so that I can turn on the Tick Replay. If you can give me some tips or guide on how to create own RemoveLastBar function I would appreciate it. Thanks.

      Comment


        #4
        Hello luxurious_04,

        I'm responding on behalf of Chelsea who is out of the office today.

        We do not have any examples for creating your own RemoveLastBar method, and I do not think this would be the best way to workaround the limitation between Tick Replay and RemoveLastBar's function.

        The BarsType logic would have to be modified so it does not modify the previous bar (not just avoid using RemoveLastBar.) This could be highly subjective on the BarsType that is the basis for your study. If your BarsType is Renko based, it may be worthwhile to investigate third party Renko Bars like UniRenko that do not use RemoveLastBar.

        If these are not as easy to accomplish, I may suggest to reconsider using the single tick data series in the indicator to avoid using Tick Replay. Our Order Flow+ tools use a single tick data series for volume analysis, and is much more performant than using Tick Replay. There are minor historical discrepancies that can be seen with Tick based bars when there are ticks of the same timestamp, but such discrepancies are mostly seen with small tick based bars. The performance benefits usually outweigh the rare visual anomaly.

        I have attached a template that demonstrates taking a Multi Time Frame approach with an indicator as is done in our OrderFlow tools. The attached BuySellPressureOneTick can be compared against our BuySellPressure indicator that comes stock with NinjaTrader.

        If you have a lifetime license, another option to consider would be to add a Volumetric bar to the script and use the Volumetric Data Access methods for analysis. Since these the Volumetric BarsType accesses these values directly through the BarsType, and are not unrolled into OnBarUpdate, the discrepancies seen taking the Multi Time Frame approach are not encountered. The attached VolumetricTestBuySellPressure indicator demonstrates how BuySellPressure can be recreated using Volumetric Data Access methods.

        The ticket ID for supporting RemoveLastBar Ticket Replay is SFT-1097.

        Please let us know if there is anything else we can do to help.
        Attached Files
        JimNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jim View Post
          Hello luxurious_04,

          I'm responding on behalf of Chelsea who is out of the office today.

          We do not have any examples for creating your own RemoveLastBar method, and I do not think this would be the best way to workaround the limitation between Tick Replay and RemoveLastBar's function.
          with the
          The BarsType logic would have to be modified so it does not modify the previous bar (not just avoid using RemoveLastBar.) This could be highly subjective on the BarsType that is the basis for your study. If your BarsType is Renko based, it may be worthwhile to investigate third party Renko Bars like UniRenko that do not use RemoveLastBar.

          If these are not as easy to accomplish, I may suggest to reconsider using the single tick data series in the indicator to avoid using Tick Replay. Our Order Flow+ tools use a single tick data series for volume analysis, and is much more performant than using Tick Replay. There are minor historical discrepancies that can be seen with Tick based bars when there are ticks of the same timestamp, but such discrepancies are mostly seen with small tick based bars. The performance benefits usually outweigh the rare visual anomaly.

          I have attached a template that demonstrates taking a Multi Time Frame approach with an indicator as is done in our OrderFlow tools. The attached BuySellPressureOneTick can be compared against our BuySellPressure indicator that comes stock with NinjaTrader.

          If you have a lifetime license, another option to consider would be to add a Volumetric bar to the script and use the Volumetric Data Access methods for analysis. Since these the Volumetric BarsType accesses these values directly through the BarsType, and are not unrolled into OnBarUpdate, the discrepancies seen taking the Multi Time Frame approach are not encountered. The attached VolumetricTestBuySellPressure indicator demonstrates how BuySellPressure can be recreated using Volumetric Data Access methods.

          The ticket ID for supporting RemoveLastBar Ticket Replay is SFT-1097.

          Please let us know if there is anything else we can do to help.
          Jim,

          Could you please give some more details on how to use the above "OneTickMultiSeriesTemplate" indicator. For example I have an indicator "DeltaV1" that only works on "Tick Replay" but which I want the historical data displayed when I load it ... how do I do this with the "OneTickMultiSeriesTemplate".

          Lolu

          Comment


            #6
            Hello omololu,

            Please compare the the BuySellPressureOneTick script against the BuySellPressure indicator that comes built in with NinjaTrader.

            The built in indicator uses OnMarketData and checks Bid/Ask volume whenever there has been a Last tick. The BuySellPressureOneTick indicator uses BarsArray[1].GetBid and BarsArray[1].GetAsk to get the best bid/ask that associated with that tick. Volume is retrieved with BarsArray[1].GetVolume.

            What Tick Replay would do with OnMarketData is handled in OnBarUpdate taking this multi time frame approach.

            We look forward to assisting.
            JimNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jim View Post
              Hello omololu,

              Please compare the the BuySellPressureOneTick script against the BuySellPressure indicator that comes built in with NinjaTrader.

              The built in indicator uses OnMarketData and checks Bid/Ask volume whenever there has been a Last tick. The BuySellPressureOneTick indicator uses BarsArray[1].GetBid and BarsArray[1].GetAsk to get the best bid/ask that associated with that tick. Volume is retrieved with BarsArray[1].GetVolume.

              What Tick Replay would do with OnMarketData is handled in OnBarUpdate taking this multi time frame approach.

              We look forward to assisting.
              Hi Jim,

              Yes, I did compare the BuySellPressureOneTick script and NT in-built BuySellPressure indicator. I actually installed the BuySellPressureOneTick script and observed its working; but I can't seem to understand the role the "OneTickMultiSeriesTemplate" indicator is playing in all these. Please, explain. Is it mandatory that the "OneTickMultiSeriesTemplate" indicator be installed for the BuySellPressureOneTick script to work ?

              Omololu

              Comment


                #8
                Hello Omololu,

                The BuySellPrressureOneTick indicator is built taking the approach that OneTickMultiSeriesTemplate takes. The OneTickMultiSeriesTemplate indicator is not used in BuySellPrressureOneTick and is not needed for BuySellPrressureOneTick to work.

                Let me know if you have any additional questions.
                JimNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Jim View Post
                  Hello Omololu,

                  The BuySellPrressureOneTick indicator is built taking the approach that OneTickMultiSeriesTemplate takes. The OneTickMultiSeriesTemplate indicator is not used in BuySellPrressureOneTick and is not needed for BuySellPrressureOneTick to work.

                  Let me know if you have any additional questions.
                  Hi Jim,

                  I have successfully test-driven the BuySellPressureOneTick and the OneTickMultiSeriesTemplate indicators. However, I'm not able to reference the BuySellPressureOneTick "buys" and "sells" variables from another indicator as follows;

                  double value = (((DEMA(DEMA(BuySellPressureOneTick().buys,period),Period)[0] - DEMA(DEMA(BuySellPressureOneTick().sells,period),Period)[0]*-1))*10)/(((DEMA(DEMA(BuySellPressureOneTick().buys,period),Period)[0] + DEMA(DEMA(BuySellPressureOneTick().sells,period),Period)[0]*-1))*10)*100;

                  The compile error message is shown in the attached screenshot.

                  Meanwhile, could you please do me a favor by converting the NT8 in-built VolumeUpDown indicator to "VolumeUpDownOneTick" just as you did for BuySellPressureOneTick. I'm attaching the VolumeUpDown indicator for ease of reference.

                  Regards.

                  Lolu



                  Click image for larger version  Name:	BuySellPressureErrors.png Views:	0 Size:	51.0 KB ID:	1097350



                  @VolumeUpDown.cs

                  Last edited by omololu; 04-30-2020, 05:01 AM.

                  Comment


                    #10
                    Hello omololu,

                    You are accessing a private property from an external script instead of referencing the plots. Please reference the BuyPressure and SellPressure plots instead. I have attached an example.

                    VolumeUpDown is not a Tick Replay indicator that would use OnMarketData to generate plots so the OneTick approach would not be applicable here.

                    We look forward to assisting.
                    Attached Files
                    JimNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Jim View Post
                      Hello omololu,

                      You are accessing a private property from an external script instead of referencing the plots. Please reference the BuyPressure and SellPressure plots instead. I have attached an example.

                      VolumeUpDown is not a Tick Replay indicator that would use OnMarketData to generate plots so the OneTick approach would not be applicable here.

                      We look forward to assisting.
                      Thanks Jim.

                      I'll test-drive the strategy and let you know how I'm faring.

                      Lolu

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by aussugardefender, Today, 01:07 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post aussugardefender  
                      Started by pvincent, 06-23-2022, 12:53 PM
                      14 responses
                      238 views
                      0 likes
                      Last Post Nyman
                      by Nyman
                       
                      Started by TraderG23, 12-08-2023, 07:56 AM
                      9 responses
                      384 views
                      1 like
                      Last Post Gavini
                      by Gavini
                       
                      Started by oviejo, Today, 12:28 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post oviejo
                      by oviejo
                       
                      Started by pechtri, 06-22-2023, 02:31 AM
                      10 responses
                      125 views
                      0 likes
                      Last Post Leeroy_Jenkins  
                      Working...
                      X