♥ 0 |
Hello Peter. I was hoping if making an indicator where lets say the market has closed for the day so I go on a 5 min chart, if I was to put my “crosshair” on 1:40PM, it would display the total volume for the day but only up to 1:40pm? I hopefully explained it properly. Thanks.
Marked as spam
|
Please log in to post questions.
Hi Pete, I have found some discrepancy from the volume output from your code as well as the system daily volume. I really cannot figure it out why there is such discrepancy, I am hoping you can give a hand please. Thanks (Please do let me know if you need a screenshot, as comment section seems cannot attach screenshot)
declare lower;
def newDay = GetDay() GetDay()[1];
rec sumOfVolume = CompoundValue(1, if newDay then volume else sumOfVolume[1] + volume, 0);
plot data = sumOfVolume;
AddLabel(1, “Today Vol (System): ” + volume(period = “DAY”), Color.WHITE);
The code is 100% correct. The problem is Thinkorswim is wrong. Believe that? Yeah, I believe it. To prove it, I just recorded the volume of each 15 bar in a spreadsheet. The total matches what is reported by the code I provided in my answer.
So the question now is, where is Thinkorswim getting their daily volume from? And why does it not match the volume they are reporting on the intraday charts? I suggest you report this issue to TDA support. Keep us posted on their response.
Thanks Pete! I will report this to TDA and see what they can do about it. Thanks again Pete! You are awesome!!