My question is, will this adddays function cross over the month
and how do i exclude weekends when I want to look back further the 5 working days or cross a weekend?
if (FirstTickOfBar && (ToTime(Time[0]) >= 143000 && ToTime(Time[0]) <= 210000))
{
timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, Time[0].Hour, Time[0].Minute, 0);
barsAgo =0;
VolumeData=0;
Volumeseries2.Set (Volume[0]+Volumeseries2[1]);
for (int x = 1; x <= 1; x++)
{
barsAgo = GetBar(timeOfInterest.AddDays(-x));
VolumeData=Volume[barsAgo]+VolumeData;
}
Volumeseries3.Set((VolumeData/1)+Volumeseries3[1]);

Comment