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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            44 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            58 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            35 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            95 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            59 views
            0 likes
            Last Post PaulMohn  
            Working...
            X