Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue using BuySellPressure and BuySellVolume

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

    Issue using BuySellPressure and BuySellVolume

    I tried the examples from:



    And I get errors:
    Buy sell volume relies on bid/ask tick updates expecting Calculate "On Each Tick"

    I did it exactly like the examples and then I tried other ways as well with no luck. I tried setting the indicator to Calculate.OnEachTick. I tried setting Tick Replay on the data, etc.

    Thank you in advance.

    #2
    Hello jalley,

    It looks like that help guide sample shows State.SetDefaults however this would need to be set later in State.DataLoaded:

    Code:
    else if (State == State.DataLoaded)
    {
        BuySellPressure().Calculate = Calculate.OnEachTick;
    }
    You otherwise need to set your main scripts Calculate to OnEachTick as well.

    I will forward this to be changed in the help guide.

    I look forward to being of further assistance.

    Comment


      #3
      I did this change but now the values from both buy and sell are coming back always at 50

      Comment


        #4
        Hello jalley,

        Do you currently have TickReplay enabled or are you testing going forward in reatlime? Without tick replay this indicator cannot calculate historically because it uses OnMarketData.

        I see values when using TickReplay.

        I look forward to being of further assistance.

        Comment


          #5
          Using it real time

          Comment


            #6
            Hello jalley,

            You may need to use 1 BarsAgo or more to retrieve data from the indicator in that use case depending on the primary series. Using mis-matched Calculate settings is generally not suggested as the indicator is normally supposed to inherit from the parent. Without the same calculate the data may not be present in the plot when you try to read it from the parent. Another alternative here is to just use Calculate.OnEachTick from the parent indicator.

            I look forward to being of further assistance.

            Comment


              #7
              I tried the 1 BarsAgo... Still giving 50 for both sides

              Comment


                #8
                Hello jalley,

                Yes you may need to loop back further depending on the series used. In general using mis-matched Calculate settings is not good practice because it complicates finding the data. I would suggest running the parent script as OnEachTick calculation to match the child so they process the same. If the parent script needs to simulate OnBarClose you could use IsFirstTickOfBar to achieve that.



                I look forward to being of further assistance.

                Comment


                  #9
                  I'm still having trouble with this one. Could you possibly post a quick simple example of using it? I cannot get it to display a value other than always 50 for each.

                  Thank you in advance!

                  Comment


                    #10
                    Hello jalley,

                    The sample from the help guide is all that I tried and I can see a result as long as its in real time or with TickReplay on. The chart I used was a 1 minute

                    As i mentioned I needed to use 1 BarsAgo to see a result based on the discrepancy on calculate modes. I have attached a quick sample. You could try it on a 1 minute chart with tick replay enabled.


                    I look forward to being of further assistance.
                    Attached Files

                    Comment


                      #11
                      I did the example, it only works 1 time and then I have to clear NT8 cache or change number of days in data series for it to work again. It always is throwing this error:

                      Failed to call 'Add' method: System.NullReferenceException: Object reference not set to an instance of an object at NinjaTraderDataBarsSeries.GetTime(Int32 index) ........

                      If I hit refresh it generates this line each time in the Log. Using example as given.

                      Comment


                        #12
                        Hello jalley,

                        I am not seeing that on my end, you should not need to clear the cache or change the number of days but simply hit f5 to reload.

                        Is there a specific use case which you can provide so I can try to reproduce what you are seeing?

                        I am using a 1 minute ES chart with tick replay, I can hit f5 over and over and see the prints.

                        I look forward to being of further assistance.

                        Comment


                          #13
                          Hi Jesse,

                          I want to thank you for your assistance. It must be something peculiar to my machine because it works fine for 1 time but as soon as I refresh it prints only 50 with no decimal. Before I refresh, it had correctly printed the right values. I might move on to a different indicator to get the values. I also have a weird problem with exporting scripts hanging on the save dialog. I think I'll just reinstall NT8 and try and if I have further issues, I'll repost.

                          Comment


                            #14
                            Hello jalley,

                            Yes that could be corrupt data or something with the installation causing that. It would likely be best to try doing an uninstall then reinstall to refresh the files. I would also suggest to try and re download the data or try a different instrument which you have not loaded data for to see if that test passes. That could help narrow down what the problem is or what steps are required to see the problem.

                            Please let me know if I can be of additional assistance.

                            Comment


                              #15
                              Reloading fixed the issue! Thanks again for your help!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              571 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              330 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              101 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              548 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              549 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X