I am writing an indicator in which I need the current days volume so if I run my indicator anytime before the close such as 8:45am then it would give me the total daily volume from 8:30 to 8:45 or if run at 12noon, then it would give total volume from 8:30 to 12 noon.
A little restriction here is that for some reasons I can only get bars using GetBar method in my indicator and I was able to get the latest bar with this method but prices of that bar were not matching the chart values. Attached is the sample indicator which I was using to achieve this.
Please advise how can I get the bar values that is not fully constructed yet.
Thanks,
Comment