How to pull the volume number TOS is getting?

Flookiee

New member
I'm trying to use volume to write my own scripts but I noticed just using the volume constant does not pull the same number that TOS is getting. As you can see here, the default volume column and my "TestVolume" column are not getting the same value.

PJgYBP1.png


This formula is the closest I could get it

FkoEhvJ.png


Does anyone know how TOS is getting this number so I can do the same?
These screenshots were taken pre-market at around 7:45 EST. Do I have to do something special because of the time?
 

Tweak155

New member
I'm not sure I'm clear on the issue, but the "volume" function is per bar. So volume[1] + volume is previous bar plus current bar. The watchlist shows a total volume excluding pre market (I believe, I don't use it).

To get the current total volume, try TotalSum(volume).
 

Flookiee

New member
Sorry if I wasn't clear. Basically I just want to be able to pull that same volume they are using so that I can use that number to make calculations in other scripts for things like relative volume.

This is what the TotalSum gives me

cC7QfDO.png
 

Similar threads

Top