Again, I'm having trouble with a study.
The premise is simple.
Recording today's total volume traded between a specified time range and comparing it with the same previous day traded volume during the same specified time range.
So far so good. The formula below does just that.
The thing is, I want today's reading to indicate the difference of traded volume when compared to yesterday's traded volume at that same time.
So, if today, at 10:05 AM, the ES has already traded 115.882 futures, what is the difference in %, when compared to yesterday's same time?
I can say that this Friday, at 10:05 AM we had traded 129% more volume than the previous day at that same time.
Simply said, I want to know in realtime the trade volume difference when compared to yesterday's traded volume?
How can I program and insert that in the formula below?
Can anyone help me?
Code: Select all
if BarType >= 2 then
MyVolume = Volume
MyVolume = Ticks;
if date <> date then begin
resetVol = false;
if time > startTime and resetVol = false then begin
resetVol = true;
prevVolume = todayVolume;
todayVolume = 0;
if time > startTime and time < endTime then begin
todayVolume = todayVolume + myVolume;