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

Indicator issue with BuySellTick

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

    Indicator issue with BuySellTick

    There was a indicator that was provided via the NT support staff for buy/sell tick data usage here: https://ninjatrader.com/support/foru...dwhileinactive

    The issue that is being seen is that if you setup Tick Replay on the chart and set the chart to Bars and bars to load it has an issue with the Update method:

    The actual error is as follows:
    Code:
    2022-03-03 22:40:45:566|3|4|Indicator 'BuySellVolumeOneTick': Error on calling 'Update' method on bar 1032: Object reference not set to an instance of an object.
    2022-03-03 23:05:29:092|3|4|Indicator 'BuySellVolumeOneTick': Error on calling 'Update' method on bar 1000: Object reference not set to an instance of an object.
    2022-03-03 23:05:41:238|3|4|Indicator 'BuySellVolumeOneTick': Error on calling 'Update' method on bar 1000: Object reference not set to an instance of an object.
    Pressing F5 will sometimes cause it to do the similar erroring - eventually it will process but it will randomly fail and give a similar error as above.

    #2
    Hello WHICKED,

    Bars To Load will affect all added data series, so you will need to have BarsToLoad reflect a high enough value where there will be enough ticks to form a primary bar.

    I updated the example in Brandon's post and tested 1000 Bars To Load with Tick Replay on a ES 03-22 1 minute chart with Tick Replay, and did not get an error.

    Also, you shouldn't be using this sort of indicator on a Tick Replay chart. The purpose of using the OneTick approach is so you do not have to use Tick Replay on the chart. Regardless, I am not seeing errors when I test Tick Replay with the updated example.
    JimNinjaTrader Customer Service

    Comment


      #3
      I updated the example in Brandon's post and tested 1000 Bars To Load with Tick Replay on a ES 03-22 1 minute chart with Tick Replay, and did not get an error.
      What do you mean by this statement?

      Comment


        #4
        Hello WHICKED,

        When I test the updated script with Tick Replay, I do not get an error.

        I get formed historical bars for just the 1000 bars of tick data that was loaded with the indicator. (Screenshot attached.)

        So even though it would not be advised to use an indicator like this with Tick Replay, or with BarsToLoad, I am not getting any errors.

        Please re-download the script from Brandon's link if you do not get the same results.
        Attached Files
        JimNinjaTrader Customer Service

        Comment


          #5
          When I test the updated script with Tick Replay, I do not get an error.
          which updated script?

          Comment


            #6
            Hello WHICKED,

            I am referring to the "BuySellVolumeOneTick" example you brought up in this thread.

            I updated the example in Brandon's post
            Post here.

            I do not get errors with Bars To Load and Tick Replay with the updated example. (Please re-download the "BuySellVolumeOneTickExample.zip" file and import to get the updated version.)
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by frankthearm, Today, 09:08 AM
            7 responses
            27 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by NRITV, Today, 01:15 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by maybeimnotrader, Yesterday, 05:46 PM
            5 responses
            24 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by quantismo, Yesterday, 05:13 PM
            2 responses
            16 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