I am trying to write a indicator that gives me total volume from a specific time. For example, I want to execute a trade when total volume exceeds 80,000 counting from 2:00 PM. I was given a code to start with but I am in need of some help. below is the code that I was given. I think that code reset volume after 2:00 pm and I now need to get total volume. Any help will be appreciated.
Thanks
// int volumeSum = 0;
protected override void OnBarUpdate()
{
if (ToTime(Time[0]) > 140000)
{
volumeSum += Volume[0];
Print(volumeSum);
}
}
Comment