Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Buys / Sells volume in the default indicator BuySellVolume

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

    Accessing Buys / Sells volume in the default indicator BuySellVolume

    Can i know how to access Buys / Sells volume in the default indicator BuySellVolume.

    The value i get is always Zero, I use market replay to test it.
    Can i know why ??

    But when i Used the default BuySellVolume, it did actually have the value to plot out the line.

    Below is my indicator that access Buys from BuySellVolume indicator.
    Attached Files

    #2
    Tempo needs to be set to calconeachtick

    Comment


      #3
      I see.
      Then is it only work for historical data ??

      Comment


        #4
        Hello cincai,

        This is a realtime only indicator which would need OnEachTick.

        To access the data in realtime you could do that by just calling the indicator, your parent indicator also needs to be OnEachTick:
        Print(BuySellVolume().Sells[0]);

        Because of how the indicator sets the plot data it may work more in your benefit to just extract the code used and then re use that code in your script.

        I look forward to being of further assistance.

        Comment


          #5
          I have change to OnEachTick on my file.
          But I noticed that it only able to execute to show me result during real time data ??

          Can i know why ??
          Attached Files

          Comment


            #6
            Hello cincai,

            Right, I had mentioned that. If you wanted to use this in also for historical it would be best to just include that type of logic in your script instead of trying to access the plot data through the indicator. The indicator uses OnMarketData to calculate the volume, while that would work with tick replay enabled it would still produce 0's in historical if called from another script. Including this logic in your script directly would be the way around that but would still require using TickRelay for OnMarketData to be called historically.


            I look forward to being of further assistance.


            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            81 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            42 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            64 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            68 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            55 views
            0 likes
            Last Post CarlTrading  
            Working...
            X