How to pull the volume number TOS is getting?

F

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.



This formula is the closest I could get it



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?
 
T

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).
 
F

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

 
T

Tweak155

New member
Hmmm yeah, I can't get the # to line up exactly myself. I see what you're looking for now, but always seems to be off slightly as I try different approaches.
 
F

Flookiee

New member
@BenTen Any Ideas on how I could do this? It seems like it should be fairly simple but I can't seem to figure out how to get that same volume number that TOS is getting
 

Similar threads

Top